mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Correctly handle CPU access to NPOT BCn textures on D3D11. Closes #2792
This commit is contained in:
@@ -7300,13 +7300,13 @@ void MapIntercept::Init(ID3D11Texture1D *tex, UINT sub, void *appMemory)
|
||||
|
||||
int mip = GetMipForSubresource(tex, sub);
|
||||
|
||||
// a row in block formats is a row of 4x4 blocks.
|
||||
if(IsBlockFormat(fmt))
|
||||
numRows /= 4;
|
||||
|
||||
numRows = RDCMAX(1, numRows >> mip);
|
||||
numSlices = RDCMAX(1, numSlices >> mip);
|
||||
|
||||
// a row in block formats is a row of 4x4 blocks.
|
||||
if(IsBlockFormat(fmt))
|
||||
numRows = AlignUp4(numRows) / 4;
|
||||
|
||||
if(IsYUVPlanarFormat(fmt))
|
||||
numRows = GetYUVNumRows(fmt, numRows);
|
||||
|
||||
@@ -7335,13 +7335,13 @@ void MapIntercept::Init(ID3D11Texture2D *tex, UINT sub, void *appMemory)
|
||||
|
||||
int mip = GetMipForSubresource(tex, sub);
|
||||
|
||||
// a row in block formats is a row of 4x4 blocks.
|
||||
if(IsBlockFormat(fmt))
|
||||
numRows /= 4;
|
||||
|
||||
numRows = RDCMAX(1, numRows >> mip);
|
||||
numSlices = RDCMAX(1, numSlices >> mip);
|
||||
|
||||
// a row in block formats is a row of 4x4 blocks.
|
||||
if(IsBlockFormat(fmt))
|
||||
numRows = AlignUp4(numRows) / 4;
|
||||
|
||||
if(IsYUVPlanarFormat(fmt))
|
||||
numRows = GetYUVNumRows(fmt, numRows);
|
||||
|
||||
@@ -7369,13 +7369,13 @@ void MapIntercept::Init(ID3D11Texture3D *tex, UINT sub, void *appMemory)
|
||||
|
||||
int mip = GetMipForSubresource(tex, sub);
|
||||
|
||||
// a row in block formats is a row of 4x4 blocks.
|
||||
if(IsBlockFormat(fmt))
|
||||
numRows /= 4;
|
||||
|
||||
numRows = RDCMAX(1, numRows >> mip);
|
||||
numSlices = RDCMAX(1, numSlices >> mip);
|
||||
|
||||
// a row in block formats is a row of 4x4 blocks.
|
||||
if(IsBlockFormat(fmt))
|
||||
numRows = AlignUp4(numRows) / 4;
|
||||
|
||||
if(IsYUVPlanarFormat(fmt))
|
||||
numRows = GetYUVNumRows(fmt, numRows);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user