What are the valid DepthBuffer Texture formats in DirectX 11? And which are also valid for a staging resource?
- by sebf
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?