Sign in to follow this  
stu_pidd_cow

Programs going way too slow since moving to a new computer...

Recommended Posts

I recently moved over to using a new laptop and I have started a new project in visual studio 2012 but everything runs slower than it should. I tried profiling it with the VS profiler and it says that 99.38% of the time is spent in d3d11ref.dll. I have reinstalled the DirectX SDK. I tried an older project that worked fine on another computer and it was also running slow, so I don't think it has anything to do with my code. The laptop is quite good (i7 processor). The program I'm currently testing is just a basic game loop that opens up a blank window and does nothing to it. It does not interact with Direct3D (though D3D is included in the project, just no D3D code is run).

 

So is it the laptop or VS or have I setup D3D wrong or something else?

 

(I posted this in General Programming because I don't think it is a D3D-specific problem)

 

Thanks.

Edited by stu_pidd_cow

Share this post


Link to post
Share on other sites

I tried updating drivers but I still get the same result.

 

 

d3d11ref.dll is the reference device implementation for the D3D11 runtime. No wonder it's running so slow, you're rendering in software (with the reference driver, no less).

 

This would explain a lot. But how can I get it to use the hardware? I have run much more intensive games than this on the computer and they run fine, so I think it is safe to assume that hardware does work.

Share this post


Link to post
Share on other sites
 

I'm guessing that it's just your own programs that are having this issue?

 

Yeah, from what I can tell.

D3D_DRIVER_TYPE driverTypes[] =
{
	D3D_DRIVER_TYPE_HARDWARE,
	D3D_DRIVER_TYPE_REFERENCE,
};
unsigned int numDriverTypes = sizeof( driverTypes ) / sizeof( driverTypes[0] );

for( unsigned int driverTypeIndex = 0; driverTypeIndex < numDriverTypes; driverTypeIndex++ )
{
	D3D_DRIVER_TYPE D3DDriverType = driverTypes[driverTypeIndex];
	D3D_FEATURE_LEVEL level[] = { D3D_FEATURE_LEVEL_11_0 };
	hr = D3D11CreateDevice( NULL, D3DDriverType, NULL, createDeviceFlags, level, 1, D3D11_SDK_VERSION, &D3DDevice, NULL, &D3DContext );
	if( SUCCEEDED( hr ) )
		break;
}

So it seems D3D11CreateDevice fails when trying to use D3D_DRIVER_TYPE_HARDWARE but works with D3D_DRIVER_TYPE_REFERENCE. Not sure why though.

Edited by stu_pidd_cow

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this