From 1850819483a1a5e061da18c8bfd615988af3b316 Mon Sep 17 00:00:00 2001 From: Robin Kertels Date: Thu, 25 May 2023 23:45:24 +0200 Subject: [PATCH] [d3d9] Only use direct buffer mapping for DYNAMIC buffers Tests show that buffers with just D3DUSAGE_WRITEONLY are uploaded on Unlock. --- src/d3d9/d3d9_common_buffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d3d9/d3d9_common_buffer.cpp b/src/d3d9/d3d9_common_buffer.cpp index 40b406b8b..efa2530fa 100644 --- a/src/d3d9/d3d9_common_buffer.cpp +++ b/src/d3d9/d3d9_common_buffer.cpp @@ -62,7 +62,7 @@ namespace dxvk { if (m_desc.Pool != D3DPOOL_DEFAULT) return D3D9_COMMON_BUFFER_MAP_MODE_BUFFER; - if (!(m_desc.Usage & (D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY))) + if (!(m_desc.Usage & D3DUSAGE_DYNAMIC)) return D3D9_COMMON_BUFFER_MAP_MODE_BUFFER; // Tests show that DISCARD does not work for pure SWVP devices.