wined3d: Make the adapter responsible for draws.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e46b69475b
commit
95b66030bb
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue