Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/cs.c | 8 ++++++++ dlls/wined3d/device.c | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 8a78ad13dd2..11f2d7cd5c7 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -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) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 1b7fa29a65e..4361a0637db 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5377,15 +5377,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(