Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/cs.c | 16 ++++++++-------- dlls/wined3d/device.c | 10 ++-------- dlls/wined3d/wined3d.spec | 1 + dlls/wined3d/wined3d_private.h | 3 --- include/wine/wined3d.h | 3 +++ 5 files changed, 14 insertions(+), 19 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index cbc97d3614a..ef3c0c76c14 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -1072,17 +1072,17 @@ void wined3d_device_context_emit_draw(struct wined3d_device_context *context, wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); }
-void wined3d_cs_emit_draw_indirect(struct wined3d_cs *cs, enum wined3d_primitive_type primitive_type, - unsigned int patch_vertex_count, struct wined3d_buffer *buffer, unsigned int offset, bool indexed) +void CDECL wined3d_device_context_draw_indirect(struct wined3d_device_context *context, + struct wined3d_buffer *buffer, unsigned int offset, bool indexed) { - const struct wined3d_d3d_info *d3d_info = &cs->c.device->adapter->d3d_info; - const struct wined3d_state *state = cs->c.state; + const struct wined3d_d3d_info *d3d_info = &context->device->adapter->d3d_info; + const struct wined3d_state *state = context->state; struct wined3d_cs_draw *op;
- op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT); + op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT); op->opcode = WINED3D_CS_OP_DRAW; - op->primitive_type = primitive_type; - op->patch_vertex_count = patch_vertex_count; + op->primitive_type = state->primitive_type; + op->patch_vertex_count = state->patch_vertex_count; op->parameters.indirect = TRUE; op->parameters.u.indirect.buffer = buffer; op->parameters.u.indirect.offset = offset; @@ -1091,7 +1091,7 @@ void wined3d_cs_emit_draw_indirect(struct wined3d_cs *cs, enum wined3d_primitive acquire_graphics_pipeline_resources(state, indexed, d3d_info); wined3d_resource_acquire(&buffer->resource);
- wined3d_device_context_submit(&cs->c, WINED3D_CS_QUEUE_DEFAULT); + wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); }
static void wined3d_cs_exec_flush(struct wined3d_cs *cs, const void *data) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 278bc8677e6..3b22f7b2086 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4484,12 +4484,9 @@ void CDECL wined3d_device_draw_primitive_instanced(struct wined3d_device *device void CDECL wined3d_device_draw_primitive_instanced_indirect(struct wined3d_device *device, struct wined3d_buffer *buffer, unsigned int offset) { - struct wined3d_state *state = device->cs->c.state; - TRACE("device %p, buffer %p, offset %u.\n", device, buffer, offset);
- wined3d_cs_emit_draw_indirect(device->cs, state->primitive_type, - state->patch_vertex_count, buffer, offset, false); + wined3d_device_context_draw_indirect(&device->cs->c, buffer, offset, false); }
void CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *device, UINT start_idx, UINT index_count) @@ -4516,12 +4513,9 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device void CDECL wined3d_device_draw_indexed_primitive_instanced_indirect(struct wined3d_device *device, struct wined3d_buffer *buffer, unsigned int offset) { - struct wined3d_state *state = device->cs->c.state; - TRACE("device %p, buffer %p, offset %u.\n", device, buffer, offset);
- wined3d_cs_emit_draw_indirect(device->cs, state->primitive_type, - state->patch_vertex_count, buffer, offset, true); + wined3d_device_context_draw_indirect(&device->cs->c, buffer, offset, true); }
HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device, diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index bae5a6d42f0..918e9e253cc 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -168,6 +168,7 @@
@ 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_draw_indirect(ptr ptr 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/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index e9e73da9f25..db6b6488e59 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4735,9 +4735,6 @@ void wined3d_cs_emit_clear_unordered_access_view_uint(struct wined3d_cs *cs, struct wined3d_unordered_access_view *view, const struct wined3d_uvec4 *clear_value) DECLSPEC_HIDDEN; void wined3d_cs_emit_copy_uav_counter(struct wined3d_cs *cs, struct wined3d_buffer *dst_buffer, unsigned int offset, struct wined3d_unordered_access_view *uav) DECLSPEC_HIDDEN; -void wined3d_cs_emit_draw_indirect(struct wined3d_cs *cs, enum wined3d_primitive_type primitive_type, - unsigned int patch_vertex_count, struct wined3d_buffer *buffer, - unsigned int offset, bool indexed) DECLSPEC_HIDDEN; void wined3d_cs_emit_flush(struct wined3d_cs *cs) DECLSPEC_HIDDEN; void wined3d_cs_emit_generate_mipmaps(struct wined3d_cs *cs, struct wined3d_shader_resource_view *view) DECLSPEC_HIDDEN; void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index ee02914b0fe..18dab157834 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -26,6 +26,7 @@ #ifndef __WINE_WINED3D_H #define __WINE_WINED3D_H
+#include <stdbool.h> #include "wine/list.h"
#define WINED3D_OK S_OK @@ -2564,6 +2565,8 @@ void __cdecl wined3d_device_context_draw(struct wined3d_device_context *context, 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_draw_indirect(struct wined3d_device_context *context, + struct wined3d_buffer *buffer, unsigned int offset, bool indexed); 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,