On Sat, 27 Mar 2021 at 20:34, Zebediah Figura <z.figura12(a)gmail.com> wrote:
@@ -2698,6 +2703,13 @@ static HRESULT WINAPI d3d8_device_DrawIndexedPrimitiveUP(IDirect3DDevice8 *iface
wined3d_mutex_lock();
+ if (!device->stateblock_state->index_buffer) + { + wined3d_mutex_unlock(); + WARN("Index buffer not set, returning D3D_OK.\n"); + return D3D_OK; + } + That's wrong; d3d8_device_DrawIndexedPrimitiveUP() uses the indices passed as "index_data", not the currently bound index buffer.
@@ -3267,6 +3271,13 @@ static HRESULT WINAPI d3d9_device_DrawIndexedPrimitiveUP(IDirect3DDevice9Ex *ifa return D3DERR_INVALIDCALL; }
+ if (!device->stateblock_state->index_buffer) + { + wined3d_mutex_unlock(); + WARN("Called without a valid index buffer set.\n"); + return D3DERR_INVALIDCALL; + } + Likewise.