What are the valid DepthBuffer Texture formats in DirectX 11? And which are also valid for a staging resource?

Posted by sebf on Game Development See other posts from Game Development or by sebf
Published on 2012-04-03T13:06:02Z Indexed on 2012/04/03 17:44 UTC
Read the original article Hit count: 385

Filed under:
|
|

I am trying to read the contents of the depth buffer into main memory so that my CPU side code can do Some Stuff™ with it.

I am attempting to do this by creating a staging resource which can be read by the CPU, which I will copy the contents of the depth buffer into before reading it. I keep encountering errors however, because of, I believe, incompatibilities between the resource format and the view formats.

Threads like these lead me to believe it is possible in DX11 to access the depth buffer as a resource, and that I can create a resource with a typeless format and have it interpreted in the view as another, but I cannot get it to work.

What are the valid formats for the resource to be used as the depth buffer? Which of these are also valid for a CPU accessible staging resource?

© Game Development or respective owner

Related posts about directx11

Related posts about depth-buffer