mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-14 22:29:15 +01:00
[d3d11] Only use updateBuffer for very small buffer updates
Otherwise we may end up with significant copy overhead on the CS thread.
This commit is contained in:
parent
ac9ed96457
commit
26381fd5df
@ -3572,8 +3572,9 @@ namespace dxvk {
|
|||||||
const void* pSrcData) {
|
const void* pSrcData) {
|
||||||
DxvkBufferSlice bufferSlice = pDstBuffer->GetBufferSlice(Offset, Length);
|
DxvkBufferSlice bufferSlice = pDstBuffer->GetBufferSlice(Offset, Length);
|
||||||
|
|
||||||
if (Length <= 65536) {
|
if (Length <= 1024 && !(Offset & 0x3) && !(Length & 0x3)) {
|
||||||
// The backend has special code paths for small buffer updates
|
// The backend has special code paths for small buffer updates,
|
||||||
|
// however both offset and size must be aligned to four bytes.
|
||||||
DxvkDataSlice dataSlice = AllocUpdateBufferSlice(Length);
|
DxvkDataSlice dataSlice = AllocUpdateBufferSlice(Length);
|
||||||
std::memcpy(dataSlice.ptr(), pSrcData, Length);
|
std::memcpy(dataSlice.ptr(), pSrcData, Length);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user