d3d12: Fix copyToCellRamAndRelease copy size

This commit is contained in:
vlj 2015-05-29 00:59:03 +02:00 committed by Vincent Lejeune
parent 906146d8f6
commit 262d3d0755

View file

@ -1177,7 +1177,7 @@ void copyToCellRamAndRelease(void *dstAddress, ID3D12Resource *res, size_t rowPi
void *srcBuffer;
check(res->Map(0, nullptr, &srcBuffer));
for (unsigned row = 0; row < height; row++)
memcpy((char*)dstAddress + row * width, ((char*)srcBuffer) + row * rowPitch, width);
memcpy((char*)dstAddress + row * width * 4, (char*)srcBuffer + row * rowPitch, width * 4);
res->Unmap(0, nullptr);
res->Release();
}