mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 12:42:34 +01:00
D3D12: Fixed texture update crash. (#3560)
This commit is contained in:
committed by
GitHub
parent
6d8e61b16a
commit
f4b6bc79e2
@@ -5876,10 +5876,7 @@ namespace bgfx { namespace d3d12
|
|||||||
D3D12_RANGE readRange = { 0, 0 };
|
D3D12_RANGE readRange = { 0, 0 };
|
||||||
DX_CHECK(staging->Map(0, &readRange, (void**)&dstData) );
|
DX_CHECK(staging->Map(0, &readRange, (void**)&dstData) );
|
||||||
|
|
||||||
for (uint32_t ii = 0, height = numRows; ii < height; ++ii)
|
bx::memCopy(dstData, rowPitch, srcData, srcpitch, rectpitch, numRows);
|
||||||
{
|
|
||||||
bx::memCopy(&dstData[ii*rowPitch], &srcData[ii*srcpitch], srcpitch);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (NULL != temp)
|
if (NULL != temp)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user