Jump to content
  • Advertisement
Sign in to follow this  

ClearDepthStencilView doesn't clear the stencil buffer

This topic is 1765 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

The call in my application to ID3D11DeviceContext::ClearDepthStencilView (with D3D11_CLEAR_STENCIL as the flag) doesn't clear the stencil buffer. Stencil operations work fine, but the stencil buffer is cleared to 0xff after every buffer swap regardless of the passed value. What could be causing this?

 

EDIT: The 0xff is from another call to the same function earlier in the code, but then why does that call work and the other doesn't?

Edited by liggxibbler

Share this post


Link to post
Share on other sites
Advertisement

What are you using to verify the stencil buffer isn't being cleared?

Have you tried running with the D3D11 Debug Layer turned on to see if it's giving you any warnings or errors?

 

If you're passing through a valid DepthStencilView with a stencil 'channel' I can't think of any reason it wouldn't be clearing besides the very unlikely event of a driver bug / hardware failure (but we're a long way from proving that to be the case).

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!