I recently tested my DX11 app through PIX at work where I have a win7 workstation. Everything seemed to work. Now, when I try to do the same on my win8 workstation at home I get an error. Basically I cannot seem to get the back buffer from the swap chain on device creation. The code is:
HR(mSwapChain->ResizeBuffers(1, mRenderWindow->getClientAreaWidth(), mRenderWindow->getClientAreaHeight(), BACKBUFFERFORMAT, 0)); ID3D11Texture2D* backBuffer; HR(mSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), reinterpret_cast<void**>(&backBuffer))); HR(mD3DDevice->CreateRenderTargetView(backBuffer, 0, &mRenderTargetView)); ReleaseCOM(backBuffer);
The app crashes on the call to CreateRenderTargetView. The output is:
First-chance exception at 0x75C83858 (kernel32.dll) in Tankaroo.exe: 0xC0000005: Access violation reading location 0x00000500.
D3D11 CORRUPTION: ID3D11Device::CreateRenderTargetView: First parameter is corrupt! [ MISCELLANEOUS CORRUPTION #13: CORRUPTED_PARAMETER1]
First-chance exception at 0x75134B32 (KernelBase.dll) in Tankaroo.exe: 0x0000087D (parameters: 0x00000000, 0x008AD108, 0x008AC540).
Unhandled exception at 0x75134B32 (KernelBase.dll) in Tankaroo.exe: 0x0000087D (parameters: 0x00000000, 0x008AD108, 0x008AC540).
Everything seems to work well when not running through PIX. Any idea why this might be? The app is built using the VS2010 toolkit and the DX 2010 June SDK. I am not sure if this is because of win8, but that is my suspicion right now...