Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/device.c | 19 +++++++++++++++---- dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 2 ++ 3 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index e578e51de68..9c37cd97db9 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2409,6 +2409,18 @@ void CDECL wined3d_device_context_draw(struct wined3d_device_context *context, u 0, start_vertex, vertex_count, start_instance, instance_count, false); }
+void CDECL wined3d_device_context_draw_indexed(struct wined3d_device_context *context, int base_vertex_index, + unsigned int start_index, unsigned int index_count, unsigned int start_instance, unsigned int instance_count) +{ + struct wined3d_state *state = context->state; + + TRACE("context %p, base_vertex_index %d, start_index %u, index_count %u, start_instance %u, instance_count %u.\n", + context, base_vertex_index, start_index, index_count, start_instance, instance_count); + + wined3d_device_context_emit_draw(context, state->primitive_type, state->patch_vertex_count, + base_vertex_index, start_index, index_count, 0, 0, true); +} + void CDECL wined3d_device_set_vertex_shader(struct wined3d_device *device, struct wined3d_shader *shader) { TRACE("device %p, shader %p.\n", device, shader); @@ -4486,8 +4498,7 @@ void CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *device,
TRACE("device %p, start_idx %u, index_count %u.\n", device, start_idx, index_count);
- wined3d_device_context_emit_draw(&device->cs->c, state->primitive_type, state->patch_vertex_count, - state->base_vertex_index, start_idx, index_count, 0, 0, true); + wined3d_device_context_draw_indexed(&device->cs->c, state->base_vertex_index, start_idx, index_count, 0, 0); }
void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device *device, @@ -4498,8 +4509,8 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device TRACE("device %p, start_idx %u, index_count %u, start_instance %u, instance_count %u.\n", device, start_idx, index_count, start_instance, instance_count);
- wined3d_device_context_emit_draw(&device->cs->c, state->primitive_type, state->patch_vertex_count, - state->base_vertex_index, start_idx, index_count, start_instance, instance_count, true); + wined3d_device_context_draw_indexed(&device->cs->c, state->base_vertex_index, + start_idx, index_count, start_instance, instance_count); }
void CDECL wined3d_device_draw_indexed_primitive_instanced_indirect(struct wined3d_device *device, diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 087a6bead13..bae5a6d42f0 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -167,6 +167,7 @@ @ cdecl wined3d_device_validate_device(ptr ptr)
@ cdecl wined3d_device_context_draw(ptr long long long long) +@ cdecl wined3d_device_context_draw_indexed(ptr long long long long long) @ cdecl wined3d_device_context_dispatch(ptr long long long) @ cdecl wined3d_device_context_dispatch_indirect(ptr ptr long) @ cdecl wined3d_device_context_set_blend_state(ptr ptr ptr long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 3316d6f6653..ee02914b0fe 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2562,6 +2562,8 @@ void __cdecl wined3d_device_context_dispatch_indirect(struct wined3d_device_cont struct wined3d_buffer *buffer, unsigned int offset); void __cdecl wined3d_device_context_draw(struct wined3d_device_context *context, unsigned int start_vertex, unsigned int vertex_count, unsigned int start_instance, unsigned int instance_count); +void __cdecl wined3d_device_context_draw_indexed(struct wined3d_device_context *context, int base_vertex_index, + unsigned int start_index, unsigned int index_count, unsigned int start_instance, unsigned int instance_count); void __cdecl wined3d_device_context_set_blend_state(struct wined3d_device_context *context, struct wined3d_blend_state *state, const struct wined3d_color *blend_factor, unsigned int sample_mask); void __cdecl wined3d_device_context_set_constant_buffer(struct wined3d_device_context *context,