1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-21 13:29:26 +01:00

[d3d9] Only change vertex offset draw parameters when necessary

... Only change it when the vertex data is actually dynamically uploaded.
This commit is contained in:
Robin Kertels 2024-06-21 12:34:08 +02:00 committed by Philip Rebohle
parent e9fc071d95
commit 3145020a62

View File

@ -5307,12 +5307,14 @@ namespace dxvk {
m_flags.set(D3D9DeviceFlag::DirtyVertexBuffers); m_flags.set(D3D9DeviceFlag::DirtyVertexBuffers);
} }
if (dynamicSysmemVBOs) {
// Change the draw call parameters to reflect the changed vertex buffers // Change the draw call parameters to reflect the changed vertex buffers
if (NumIndices != 0) { if (NumIndices != 0) {
BaseVertexIndex = -FirstVertexIndex; BaseVertexIndex = -FirstVertexIndex;
} else { } else {
FirstVertexIndex = 0; FirstVertexIndex = 0;
} }
}
if (dynamicSysmemIBO) { if (dynamicSysmemIBO) {
if (unlikely(iboUPBufferSize == 0)) { if (unlikely(iboUPBufferSize == 0)) {