Sign in to follow this  
Aladdina

SetDepthStencilSurface BUG?

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this