• Advertisement
Sign in to follow this  

Weird Observation with Depth/Stencil States

This topic is 2046 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So, I'm creating a DepthStencil state to disable both depth testing and depth writing.

Setup is completely standard, and setting a breakpoint on the creation code confirms that the values are going in:[code] D3D11_DEPTH_STENCIL_DESC ddesc;

ddesc.DepthEnable = FALSE;
ddesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ZERO;[/code]
Creation succeeds, but if I then do a GetDesc on the created state, I get the following:[code] ddesc.DepthEnable = FALSE;
ddesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;[/code]
Also, if at runtime, I set the state, do GetDepthStencilState, then GetDesc, I also get the above - again with the D3D11_DEPTH_WRITE_MASK_ALL. PIX also tells me that it has D3D11_DEPTH_WRITE_MASK_ALL.

Running with AMD GPU Perf Studio confirms that writes to the depth buffer are happening, but this page - [url="http://msdn.microsoft.com/en-us/library/windows/desktop/bb205120%28v=vs.85%29.aspx"]http://msdn.microsoft.com/en-us/library/windows/desktop/bb205120%28v=vs.85%29.aspx[/url] - indicates that this is not normal or expected behaviour - it should be answering "No" to "Is Depth Write enabled?" and earlying-out. Clearly it's not, and this is measurable as a quite significant performance decrease (did I mention that it's in a performance-sensitive part of the code - drawing fullscreen quads for post-processing filters).

What gives?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement