Skip to content

Commit

Permalink
[d3d9] Handle null IBO when uploading data for draw
Browse files Browse the repository at this point in the history
  • Loading branch information
K0bin authored and misyltoad committed Feb 20, 2024
1 parent f254afb commit c5a37d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/d3d9/d3d9_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2669,7 +2669,7 @@ namespace dxvk {

if (unlikely(!PrimitiveCount))
return S_OK;

bool dynamicSysmemVBOs;
bool dynamicSysmemIBO;
uint32_t indexCount = GetVertexCount(PrimitiveType, PrimitiveCount);
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit c5a37d4

Please sign in to comment.