mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-22 07:54:15 +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 dstBuffer = static_cast<D3D11Buffer*>(pDstResource)->GetBufferSlice();
|
||||||
auto srcBuffer = static_cast<D3D11Buffer*>(pSrcResource)->GetBufferSlice();
|
auto srcBuffer = static_cast<D3D11Buffer*>(pSrcResource)->GetBufferSlice();
|
||||||
|
|
||||||
if (CopyFlags & D3D11_COPY_DISCARD)
|
|
||||||
DiscardBuffer(static_cast<D3D11Buffer*>(pDstResource));
|
|
||||||
|
|
||||||
VkDeviceSize dstOffset = DstX;
|
VkDeviceSize dstOffset = DstX;
|
||||||
VkDeviceSize srcOffset = 0;
|
VkDeviceSize srcOffset = 0;
|
||||||
VkDeviceSize regLength = srcBuffer.length();
|
VkDeviceSize regLength = srcBuffer.length();
|
||||||
@ -1174,9 +1171,6 @@ namespace dxvk {
|
|||||||
std::memcpy(reinterpret_cast<char*>(mappedSr.pData) + offset, pSrcData, size);
|
std::memcpy(reinterpret_cast<char*>(mappedSr.pData) + offset, pSrcData, size);
|
||||||
Unmap(pDstResource, 0);
|
Unmap(pDstResource, 0);
|
||||||
} else {
|
} else {
|
||||||
if (CopyFlags & D3D11_COPY_DISCARD)
|
|
||||||
DiscardBuffer(bufferResource);
|
|
||||||
|
|
||||||
DxvkDataSlice dataSlice = AllocUpdateBufferSlice(size);
|
DxvkDataSlice dataSlice = AllocUpdateBufferSlice(size);
|
||||||
std::memcpy(dataSlice.ptr(), pSrcData, size);
|
std::memcpy(dataSlice.ptr(), pSrcData, size);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user