wined3d: Make the adapter responsible for flushes.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1174c894e8
commit
65164450d6
|
@ -5105,6 +5105,16 @@ static void adapter_gl_destroy_query(struct wined3d_query *query)
|
|||
wined3d_cs_destroy_object(query->device->cs, wined3d_query_gl_destroy_object, query);
|
||||
}
|
||||
|
||||
static void adapter_gl_flush_context(struct wined3d_context *context)
|
||||
{
|
||||
struct wined3d_context_gl *context_gl = wined3d_context_gl(context);
|
||||
|
||||
TRACE("context_gl %p.\n", context_gl);
|
||||
|
||||
if (context_gl->valid)
|
||||
context_gl->gl_info->gl_ops.gl.p_glFlush();
|
||||
}
|
||||
|
||||
static const struct wined3d_adapter_ops wined3d_adapter_gl_ops =
|
||||
{
|
||||
adapter_gl_destroy,
|
||||
|
@ -5132,6 +5142,7 @@ static const struct wined3d_adapter_ops wined3d_adapter_gl_ops =
|
|||
adapter_gl_destroy_sampler,
|
||||
adapter_gl_create_query,
|
||||
adapter_gl_destroy_query,
|
||||
adapter_gl_flush_context,
|
||||
};
|
||||
|
||||
static BOOL wined3d_adapter_gl_init(struct wined3d_adapter_gl *adapter_gl,
|
||||
|
|
|
@ -773,6 +773,11 @@ static void adapter_vk_destroy_query(struct wined3d_query *query)
|
|||
TRACE("query %p.\n", query);
|
||||
}
|
||||
|
||||
static void adapter_vk_flush_context(struct wined3d_context *context)
|
||||
{
|
||||
TRACE("context %p.\n", context);
|
||||
}
|
||||
|
||||
static const struct wined3d_adapter_ops wined3d_adapter_vk_ops =
|
||||
{
|
||||
adapter_vk_destroy,
|
||||
|
@ -800,6 +805,7 @@ static const struct wined3d_adapter_ops wined3d_adapter_vk_ops =
|
|||
adapter_vk_destroy_sampler,
|
||||
adapter_vk_create_query,
|
||||
adapter_vk_destroy_query,
|
||||
adapter_vk_flush_context,
|
||||
};
|
||||
|
||||
static unsigned int wined3d_get_wine_vk_version(void)
|
||||
|
|
|
@ -1008,12 +1008,11 @@ void wined3d_cs_emit_draw_indirect(struct wined3d_cs *cs, GLenum primitive_type,
|
|||
|
||||
static void wined3d_cs_exec_flush(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
struct wined3d_context_gl *context_gl;
|
||||
struct wined3d_context *context;
|
||||
|
||||
context_gl = wined3d_context_gl(context_acquire(cs->device, NULL, 0));
|
||||
if (context_gl->valid)
|
||||
context_gl->gl_info->gl_ops.gl.p_glFlush();
|
||||
context_release(&context_gl->c);
|
||||
context = context_acquire(cs->device, NULL, 0);
|
||||
cs->device->adapter->adapter_ops->adapter_flush_context(context);
|
||||
context_release(context);
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_flush(struct wined3d_cs *cs)
|
||||
|
|
|
@ -2582,6 +2582,11 @@ static void adapter_no3d_destroy_query(struct wined3d_query *query)
|
|||
TRACE("query %p.\n", query);
|
||||
}
|
||||
|
||||
static void adapter_no3d_flush_context(struct wined3d_context *context)
|
||||
{
|
||||
TRACE("context %p.\n", context);
|
||||
}
|
||||
|
||||
static const struct wined3d_adapter_ops wined3d_adapter_no3d_ops =
|
||||
{
|
||||
adapter_no3d_destroy,
|
||||
|
@ -2609,6 +2614,7 @@ static const struct wined3d_adapter_ops wined3d_adapter_no3d_ops =
|
|||
adapter_no3d_destroy_sampler,
|
||||
adapter_no3d_create_query,
|
||||
adapter_no3d_destroy_query,
|
||||
adapter_no3d_flush_context,
|
||||
};
|
||||
|
||||
static void wined3d_adapter_no3d_init_d3d_info(struct wined3d_adapter *adapter, unsigned int wined3d_creation_flags)
|
||||
|
|
|
@ -2816,6 +2816,7 @@ struct wined3d_adapter_ops
|
|||
HRESULT (*adapter_create_query)(struct wined3d_device *device, enum wined3d_query_type type,
|
||||
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);
|
||||
};
|
||||
|
||||
/* The adapter structure */
|
||||
|
|
Loading…
Reference in New Issue