Search Issue Tracker

Fixed in 2017.2.0f3

Fixed in 5.6.X, 2017.1.X



Found in


Issue ID




D3D11 errors when debugging with Visual Studio and Camera having HDR enabled and depth-only clear



To reproduce:

1. Download attached "D3D errors with hdr RT and depth-only" project.
2. Open Visual Studio.
3. Open Unity.exe trough visual studio by going to File->Open->Project/Solution.
4. In solution explorer right click on Unity and go to properties.
5. In Arguments Section add the following argument: -force-d3d11-debug
6. Press Start to debug the process.
7. When Unity loads up, open downloaded project.
8. Notice Output window in visual studio.

Expected result: No errors appear in the output.
Actual result: D3D11 ERROR appears in the output.

Reproduced with: 2017.3.0a1, 2017.2.0b4, 2017.1.0p2, 5.6.2p4, 5.6.0p4.
Not reproduced with: 5.6.0p3. 5.5.4p1.
Regression introduced in: 5.6.0p4.

Notes: Happens when enabling atleast one of these option on Camera component : Allow HDR, Allow MSAA or changing Clear Flags to Depth only option.

-D3D11 ERROR: ID3D11DeviceContext::OMSetRenderTargets: The RenderTargetView at slot 0 is not compatible with the DepthStencilView. DepthStencilViews may only be used with RenderTargetViews if the effective dimensions of the Views are equal, as well as the Resource types, multisample count, and multisample quality. The RenderTargetView at slot 0 has (w:256,h:256,as:1), while the Resource is a Texture2D with (mc:1,mq:0). The DepthStencilView has (w:256,h:256,as:1), while the Resource is a Texture2D with (mc:2,mq:0). [ STATE_SETTING ERROR #388: OMSETRENDERTARGETS_INVALIDVIEW]

Verified with 2017.2.0b9

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.