cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

eddie
Journeyman III

[DirectX9]use StretchRect to copy MSAA depth buffer to normal depth buffer

I've searched forum before posting this since it's quite possible someone must have encountered the same problem.

Here is the link I found with similarity: http://devgurus.amd.com/message/869839#869839

It's quite old and ends without a concrete answer.

Since copy a MSAA depth stencil buffer to a None-MSAA depth stencil buffer using StretchRect is not defined by DirectX document( it does not make any sense most of time), I reckon that different vendor can define its behavior by itself.

The problem is, on my Radeon HD 6670 card, sometimes it works fine and sometimes it doesn't. when it doesn't work, anything which needs to do depth comparison can not be drawn onto the render target bind with the None-MSAA depth stencil buffer.

I even find out the way to make it fail to work: Set MSAA render target as the active one, then shutdown upcoming draw calls, fianlly call EndScene and Present. In the next frame before BeginScene, StretchRect fails to work( no error from DirectX ). But if I keep those draw calls, it works fine. I've got really confused since I think they are irrelevant.

really needs some help, thanks.         

0 Likes
0 Replies