mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-09 13:51:31 +00:00
In GetTextureData() handle MS textures as if they were arrays
* Client code is expected to handle this and request arrayIdx N for the Nth sample (possibly offset if it's an array of MS textures).
This commit is contained in:
1 parent
cf2511727b
commit
1c77f6d27e
1 file changed
+15
-1
@@ -2074,6 +2074,17 @@ byte *D3D11DebugManager::GetTextureData(ResourceId id, uint32_t arrayIdx, uint32
|
||||
desc.MiscFlags = 0;
|
||||
desc.Usage = D3D11_USAGE_STAGING;
|
||||
|
||||
bool wasms = false;
|
||||
|
||||
if(desc.SampleDesc.Count > 1)
|
||||
{
|
||||
desc.ArraySize *= desc.SampleDesc.Count;
|
||||
desc.SampleDesc.Count = 1;
|
||||
desc.SampleDesc.Quality = 0;
|
||||
|
||||
wasms = true;
|
||||
}
|
||||
|
||||
ID3D11Texture2D *d = NULL;
|
||||
|
||||
mips = desc.MipLevels ? desc.MipLevels : CalcNumMips(desc.Width, desc.Height, 1);
|
||||
@@ -2094,7 +2105,10 @@ byte *D3D11DebugManager::GetTextureData(ResourceId id, uint32_t arrayIdx, uint32
|
||||
|
||||
bytesize = GetByteSize(desc.Width, desc.Height, 1, desc.Format, mip);
|
||||
|
||||
m_pImmediateContext->CopyResource(UNWRAP(WrappedID3D11Texture2D, d), wrapTex->GetReal());
|
||||
if(wasms)
|
||||
CopyTex2DMSToArray(UNWRAP(WrappedID3D11Texture2D, d), wrapTex->GetReal());
|
||||
else
|
||||
m_pImmediateContext->CopyResource(UNWRAP(WrappedID3D11Texture2D, d), wrapTex->GetReal());
|
||||
}
|
||||
else if(WrappedID3D11Texture3D::m_TextureList.find(id) != WrappedID3D11Texture3D::m_TextureList.end())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user