SetDepthStencilSurface BUG?

Started by
3 comments, last by Aladdina 19 years, 8 months ago
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?
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.
[sub]My spoon is too big.[/sub]
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.
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.
[sub]My spoon is too big.[/sub]
I also think so, DISCARD always brings us performance improving.

This topic is closed to new replies.

Advertisement