Module: wine Branch: master Commit: 03321ea66a6d47b44dff9e8f302ae1e5a918531e URL: https://gitlab.winehq.org/wine/wine/-/commit/03321ea66a6d47b44dff9e8f302ae1e...
Author: Matteo Bruni mbruni@codeweavers.com Date: Thu Jul 13 21:14:52 2023 +0200
d3d9: Don't do instanced draws in DrawPrimitive() and DrawPrimitiveUP().
On Windows this behavior is hardware dependent. Setting instance_count to 0 makes all our d3d versions consistent in this regard and avoids triggering the FIXME() in wined3d:draw_primitive_immediate_mode().
---
dlls/d3d9/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 1267dc8fca1..31dffbf4b60 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -3176,7 +3176,7 @@ static HRESULT WINAPI d3d9_device_DrawPrimitive(IDirect3DDevice9Ex *iface, wined3d_primitive_type_from_d3d(primitive_type), 0);
/* Instancing is ignored for non-indexed draws. */ - wined3d_device_context_draw(device->immediate_context, start_vertex, vertex_count, 0, 1); + wined3d_device_context_draw(device->immediate_context, start_vertex, vertex_count, 0, 0);
d3d9_rts_flag_auto_gen_mipmap(device); wined3d_mutex_unlock(); @@ -3274,7 +3274,7 @@ static HRESULT WINAPI d3d9_device_DrawPrimitiveUP(IDirect3DDevice9Ex *iface, wined3d_device_apply_stateblock(device->wined3d_device, device->state);
/* Instancing is ignored for non-indexed draws. */ - wined3d_device_context_draw(device->immediate_context, vb_pos / stride, vtx_count, 0, 1); + wined3d_device_context_draw(device->immediate_context, vb_pos / stride, vtx_count, 0, 0);
wined3d_stateblock_set_stream_source(device->state, 0, NULL, 0, 0); d3d9_rts_flag_auto_gen_mipmap(device);