Commit 574b7152 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Modify the query state in wined3d_cs_issue_query().

parent 3f3caa33
......@@ -2229,6 +2229,9 @@ static void wined3d_cs_issue_query(struct wined3d_device_context *context,
struct wined3d_cs *cs = wined3d_cs_from_context(context);
struct wined3d_cs_query_issue *op;
if (flags & WINED3DISSUE_END)
++query->counter_main;
op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_QUERY_ISSUE;
op->query = query;
......@@ -2236,6 +2239,11 @@ static void wined3d_cs_issue_query(struct wined3d_device_context *context,
wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT);
cs->queries_flushed = FALSE;
if (flags & WINED3DISSUE_BEGIN)
query->state = QUERY_BUILDING;
else
query->state = QUERY_SIGNALLED;
}
static void wined3d_cs_exec_preload_resource(struct wined3d_cs *cs, const void *data)
......
......@@ -5390,15 +5390,7 @@ void CDECL wined3d_device_context_issue_query(struct wined3d_device_context *con
{
TRACE("context %p, query %p, flags %#x.\n", context, query, flags);
if (flags & WINED3DISSUE_END)
++query->counter_main;
query->device->cs->c.ops->issue_query(context, query, flags);
if (flags & WINED3DISSUE_BEGIN)
query->state = QUERY_BUILDING;
else
query->state = QUERY_SIGNALLED;
}
struct wined3d_rendertarget_view * CDECL wined3d_device_context_get_rendertarget_view(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment