[d3d9] Handle null IBO when uploading data for draw

This commit is contained in:
Robin Kertels 2024-02-20 20:53:19 +01:00
parent 9491b56beb
commit e468f89b9e
No known key found for this signature in database
GPG Key ID: 3824904F14D40757
1 changed files with 2 additions and 2 deletions

View File

@ -2667,7 +2667,7 @@ namespace dxvk {
if (unlikely(!PrimitiveCount))
return S_OK;
bool dynamicSysmemVBOs;
bool dynamicSysmemIBO;
uint32_t indexCount = GetVertexCount(PrimitiveType, PrimitiveCount);
@ -5137,7 +5137,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;