Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/wined3d/adapter_gl.c | 1 + dlls/wined3d/adapter_vk.c | 7 +++++++ dlls/wined3d/cs.c | 2 +- dlls/wined3d/directx.c | 7 +++++++ dlls/wined3d/wined3d_private.h | 2 ++ 5 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 343dfff0eea..29496f2556e 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -5101,6 +5101,7 @@ static const struct wined3d_adapter_ops wined3d_adapter_gl_ops = .adapter_create_query = adapter_gl_create_query, .adapter_destroy_query = adapter_gl_destroy_query, .adapter_flush_context = adapter_gl_flush_context, + .adapter_draw_primitive = draw_primitive, .adapter_dispatch_compute = dispatch_compute, .adapter_clear_uav = adapter_gl_clear_uav, }; diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index 7c635620867..b6a0eea7852 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -1414,6 +1414,12 @@ static void adapter_vk_flush_context(struct wined3d_context *context) TRACE("context %p.\n", context); }
+static void adapter_vk_draw_primitive(struct wined3d_device *device, + const struct wined3d_state *state, const struct wined3d_draw_parameters *parameters) +{ + FIXME("device %p, state %p, parameters %p.\n", device, state, parameters); +} + static void adapter_vk_dispatch_compute(struct wined3d_device *device, const struct wined3d_state *state, const struct wined3d_dispatch_parameters *parameters) { @@ -1457,6 +1463,7 @@ static const struct wined3d_adapter_ops wined3d_adapter_vk_ops = .adapter_create_query = adapter_vk_create_query, .adapter_destroy_query = adapter_vk_destroy_query, .adapter_flush_context = adapter_vk_flush_context, + .adapter_draw_primitive = adapter_vk_draw_primitive, .adapter_dispatch_compute = adapter_vk_dispatch_compute, .adapter_clear_uav = adapter_vk_clear_uav, }; diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 930351d092c..85e696d4d19 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -888,7 +888,7 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data) } state->gl_patch_vertices = op->patch_vertex_count;
- draw_primitive(cs->device, state, &op->parameters); + cs->device->adapter->adapter_ops->adapter_draw_primitive(cs->device, state, &op->parameters);
if (op->parameters.indirect) { diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 40221ab7dee..b6a9b502d82 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2843,6 +2843,12 @@ static void adapter_no3d_flush_context(struct wined3d_context *context) TRACE("context %p.\n", context); }
+static void adapter_no3d_draw_primitive(struct wined3d_device *device, + const struct wined3d_state *state, const struct wined3d_draw_parameters *parameters) +{ + ERR("device %p, state %p, parameters %p.\n", device, state, parameters); +} + static void adapter_no3d_dispatch_compute(struct wined3d_device *device, const struct wined3d_state *state, const struct wined3d_dispatch_parameters *parameters) { @@ -2886,6 +2892,7 @@ static const struct wined3d_adapter_ops wined3d_adapter_no3d_ops = .adapter_create_query = adapter_no3d_create_query, .adapter_destroy_query = adapter_no3d_destroy_query, .adapter_flush_context = adapter_no3d_flush_context, + .adapter_draw_primitive = adapter_no3d_draw_primitive, .adapter_dispatch_compute = adapter_no3d_dispatch_compute, .adapter_clear_uav = adapter_no3d_clear_uav, }; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index a5d22600013..a7983b31b7d 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3031,6 +3031,8 @@ struct wined3d_adapter_ops void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_query **query); void (*adapter_destroy_query)(struct wined3d_query *query); void (*adapter_flush_context)(struct wined3d_context *context); + void (*adapter_draw_primitive)(struct wined3d_device *device, const struct wined3d_state *state, + const struct wined3d_draw_parameters *parameters); void (*adapter_dispatch_compute)(struct wined3d_device *device, const struct wined3d_state *state, const struct wined3d_dispatch_parameters *parameters); void (*adapter_clear_uav)(struct wined3d_context *context,