[d3d9] Handle null IBO when uploading data for draw

This commit is contained in:
Robin Kertels 2024-02-20 20:53:19 +01:00 committed by Joshie
parent f254afb4fb
commit c5a37d443a
1 changed files with 2 additions and 2 deletions

View File

@ -2669,7 +2669,7 @@ namespace dxvk {
if (unlikely(!PrimitiveCount))
return S_OK;
bool dynamicSysmemVBOs;
bool dynamicSysmemIBO;
uint32_t indexCount = GetVertexCount(PrimitiveType, PrimitiveCount);
@ -5145,7 +5145,7 @@ namespace dxvk {
dynamicSysmemVBOs &= vbo == nullptr || vbo->IsSysmemDynamic();
}
D3D9CommonBuffer* ibo = GetCommonBuffer(m_state.indices);
bool dynamicSysmemIBO = NumIndices != 0 && ibo->IsSysmemDynamic();
bool dynamicSysmemIBO = NumIndices != 0 && ibo != nullptr && ibo->IsSysmemDynamic();
*pDynamicVBOs = dynamicSysmemVBOs;