This commit is contained in:
Branimir Karadžić
2025-11-01 21:53:14 -07:00
parent 3722e21525
commit bcf89eb860
2 changed files with 2 additions and 14 deletions

View File

@@ -1867,13 +1867,7 @@ namespace bgfx { namespace d3d11
uint32_t pitch = bx::uint32_min(srcPitch, dstPitch);
for (uint32_t yy = 0, height = srcHeight; yy < height; ++yy)
{
bx::memCopy(dst, src, pitch);
src += srcPitch;
dst += dstPitch;
}
bx::memCopy(dst, dstPitch, src, srcPitch, pitch, srcHeight);
m_deviceCtx->Unmap(texture.m_ptr, _mip);
}

View File

@@ -2002,13 +2002,7 @@ namespace bgfx { namespace d3d12
uint8_t* src;
readback->Map(0, NULL, (void**)&src);
for (uint32_t yy = 0, height = srcHeight; yy < height; ++yy)
{
bx::memCopy(dst, src, pitch);
src += srcPitch;
dst += dstPitch;
}
bx::memCopy(dst, dstPitch, src, srcPitch, pitch, srcHeight);
D3D12_RANGE writeRange = { 0, 0 };
readback->Unmap(0, &writeRange);