1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-01 16:24:12 +01:00

[d3d11] Fix reported RowPitch/DepthPitch for mapped buffers

Some games rely on this being the exact buffer size.
This commit is contained in:
Philip Rebohle 2018-09-17 07:45:05 +02:00
parent a78dc3b444
commit 19408f0ebe
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -355,11 +355,11 @@ namespace dxvk {
// Use map pointer from previous map operation. This
// way we don't have to synchronize with the CS thread
// if the map mode is D3D11_MAP_WRITE_NO_OVERWRITE.
const DxvkPhysicalBufferSlice physicalSlice = pResource->GetMappedSlice();
DxvkPhysicalBufferSlice physicalSlice = pResource->GetMappedSlice();
pMappedResource->pData = physicalSlice.mapPtr(0);
pMappedResource->RowPitch = physicalSlice.length();
pMappedResource->DepthPitch = physicalSlice.length();
pMappedResource->RowPitch = pResource->GetSize();
pMappedResource->DepthPitch = pResource->GetSize();
return S_OK;
}