mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
Fix numRows calculation in D3D12 texture zoo
This commit is contained in:
@@ -359,6 +359,7 @@ int4 main(float4 pos : SV_Position, uint samp : SV_SampleIndex) : SV_Target0
|
||||
src.PlacedFootprint.Footprint.Height = std::max(1, dim.y >> m);
|
||||
src.PlacedFootprint.Footprint.Depth = std::max(1, dim.z >> m);
|
||||
|
||||
bool block = false;
|
||||
switch(src.PlacedFootprint.Footprint.Format)
|
||||
{
|
||||
case DXGI_FORMAT_BC1_TYPELESS:
|
||||
@@ -384,11 +385,15 @@ int4 main(float4 pos : SV_Position, uint samp : SV_SampleIndex) : SV_Target0
|
||||
case DXGI_FORMAT_BC7_UNORM_SRGB:
|
||||
src.PlacedFootprint.Footprint.Width = AlignUp(src.PlacedFootprint.Footprint.Width, 4U);
|
||||
src.PlacedFootprint.Footprint.Height = AlignUp(src.PlacedFootprint.Footprint.Height, 4U);
|
||||
block = true;
|
||||
break;
|
||||
}
|
||||
|
||||
UINT numRows = src.PlacedFootprint.Footprint.Height * src.PlacedFootprint.Footprint.Depth;
|
||||
|
||||
if(block)
|
||||
numRows /= 4U;
|
||||
|
||||
for(UINT r = 0; r < numRows; r++)
|
||||
{
|
||||
memcpy(CurBuf + CurOffset + D3D12_TEXTURE_DATA_PITCH_ALIGNMENT * r,
|
||||
|
||||
Reference in New Issue
Block a user