mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +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:
parent
a78dc3b444
commit
19408f0ebe
@ -355,11 +355,11 @@ namespace dxvk {
|
|||||||
// Use map pointer from previous map operation. This
|
// Use map pointer from previous map operation. This
|
||||||
// way we don't have to synchronize with the CS thread
|
// way we don't have to synchronize with the CS thread
|
||||||
// if the map mode is D3D11_MAP_WRITE_NO_OVERWRITE.
|
// 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->pData = physicalSlice.mapPtr(0);
|
||||||
pMappedResource->RowPitch = physicalSlice.length();
|
pMappedResource->RowPitch = pResource->GetSize();
|
||||||
pMappedResource->DepthPitch = physicalSlice.length();
|
pMappedResource->DepthPitch = pResource->GetSize();
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user