Why MRT rendering fails when the shaders run on the primary graphics card?

442 views Asked by At

I have a laptop with two graphics cards: the integrated Intel one and an NVidia GeForce 610M card. I use MRT to do some GPGPU tasks using Direct3D 11 (using D3D_FEATURE_LEVEL_11_0). I have problems with the blending (the graphics card should support post pixel shader blending), and a really strange behaviour.

If blending is enabled, windows is started having the integrated graphics card choosen as the preferred graphics card and running the rendering on the NVidia everything works as expected.

If blending is enabled, and windows is started having the NVidia graphics card choosen as the preferred graphics card and running the rendering on the Nvidia the graphics driver hangs; the d3d11 debug layer is enabled and working, but I don't get any errors.

If the blending is commented out everything works fine, but I need the blending. I tested these scenarios several times. I had to restart my computer after every change to the preferred graphics card.

My theory is that GeForce M610 is not good enough for handling both windows and my application (Windows uses itself its resources), thats why the program hangs when I use the second scenario; but I suspect this too unstable to be actually correct. How could I write stable applications if the graphics card API says that D3D_FEATURE_LEVEL_11_0 is supported, then it hangs? What should I do to prevent this? Am I wrong with my theory?

The hang occurs during the Map call.

    D3D11_TEXTURE3D_DESC td = {};
texture->GetDesc(&td);
td.BindFlags = 0;
td.Usage = D3D11_USAGE_STAGING;
td.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
result.resize(td.Width * td.Height * td.Depth);

CComPtr<ID3D11Texture3D> tex3d;
HRESULT hr = device->CreateTexture3D(&td, nullptr, &tex3d);
if(FAILED(hr))
{
    throw hr;
}

D3D11_MAPPED_SUBRESOURCE ms = {};
context->CopyResource(tex3d, texture);
0

There are 0 answers