mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
[d3d11] Ignore D3D11_COPY_DISCARD
Various truck simulations are broken and set this on every CopySubresourceRegion call, which, if we were to implement DiscardBuffer for non-mappable resources again, would break them. This flag seemingly has no effect on native D3D11.
This commit is contained in:
parent
a7c21a617c
commit
53fca5143f
@ -351,9 +351,6 @@ namespace dxvk {
|
||||
auto dstBuffer = static_cast<D3D11Buffer*>(pDstResource)->GetBufferSlice();
|
||||
auto srcBuffer = static_cast<D3D11Buffer*>(pSrcResource)->GetBufferSlice();
|
||||
|
||||
if (CopyFlags & D3D11_COPY_DISCARD)
|
||||
DiscardBuffer(static_cast<D3D11Buffer*>(pDstResource));
|
||||
|
||||
VkDeviceSize dstOffset = DstX;
|
||||
VkDeviceSize srcOffset = 0;
|
||||
VkDeviceSize regLength = srcBuffer.length();
|
||||
@ -1174,9 +1171,6 @@ namespace dxvk {
|
||||
std::memcpy(reinterpret_cast<char*>(mappedSr.pData) + offset, pSrcData, size);
|
||||
Unmap(pDstResource, 0);
|
||||
} else {
|
||||
if (CopyFlags & D3D11_COPY_DISCARD)
|
||||
DiscardBuffer(bufferResource);
|
||||
|
||||
DxvkDataSlice dataSlice = AllocUpdateBufferSlice(size);
|
||||
std::memcpy(dataSlice.ptr(), pSrcData, size);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user