0 Replies Latest reply on Aug 14, 2013 10:44 PM by eddie

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

    eddie

      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.