mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-05 01:24:14 +01:00
Revert "[d3d9] Only use direct buffer mapping for DYNAMIC buffers"
This reverts commit 1850819483
.
This commit is contained in:
parent
6f87ccdafc
commit
5a1ebfa4ee
@ -67,7 +67,11 @@ namespace dxvk {
|
|||||||
if (m_desc.Pool != D3DPOOL_DEFAULT)
|
if (m_desc.Pool != D3DPOOL_DEFAULT)
|
||||||
return D3D9_COMMON_BUFFER_MAP_MODE_BUFFER;
|
return D3D9_COMMON_BUFFER_MAP_MODE_BUFFER;
|
||||||
|
|
||||||
if (!(m_desc.Usage & D3DUSAGE_DYNAMIC))
|
// CSGO keeps vertex buffers locked across multiple frames and writes to it. It uses them for drawing without unlocking first.
|
||||||
|
// Tests show that D3D9 DEFAULT + USAGE_DYNAMIC behaves like a directly mapped buffer even when unlocked.
|
||||||
|
// DEFAULT + WRITEONLY does not behave like a directly mapped buffer EXCEPT if its locked at the moment.
|
||||||
|
// That's annoying to implement so we just always directly map DEFAULT + WRITEONLY.
|
||||||
|
if (!(m_desc.Usage & (D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY)))
|
||||||
return D3D9_COMMON_BUFFER_MAP_MODE_BUFFER;
|
return D3D9_COMMON_BUFFER_MAP_MODE_BUFFER;
|
||||||
|
|
||||||
// Tests show that DISCARD does not work for pure SWVP devices.
|
// Tests show that DISCARD does not work for pure SWVP devices.
|
||||||
|
Loading…
Reference in New Issue
Block a user