Jump to content
  • Advertisement
Sign in to follow this  
Aladdina

SetDepthStencilSurface BUG?

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

whether I signed the flag D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL, it seems depth/stencil surface will be discarded when using DirectX9.0c debug version, on the contrary, release version will never discard any surface. Is it a bug?

Share this post


Link to post
Share on other sites
Advertisement
If by discard you mean blanks or fills it with junk data, keep in mind that D3D does that in debug mode so you can see clearly when something is invalid. It doesn't have to do it (in fact it takes a bit of time), it's just there to make you do the right thing in debug mode so it behaves correctly in release.

Share this post


Link to post
Share on other sites
Oh, I see. Thank a lot.

And the matter is when I remove the flag DISCARD, it still discard the surface in debug version, so I doubt it a bug.

Share this post


Link to post
Share on other sites
Actually, I was incorrect. Setting the flag is a good thing in release mode too: On some drivers discarding the z-buffer is a perf improvement. Look in the docs for info.

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!