Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/cs.c | 10 +++++++--- dlls/wined3d/query.c | 2 +- dlls/wined3d/wined3d_private.h | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index bb11851c1be..ae4d97873a4 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -2213,16 +2213,18 @@ static void wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data) InterlockedIncrement(&query->counter_retrieved); }
-void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) +static void wined3d_cs_issue_query(struct wined3d_device_context *context, + struct wined3d_query *query, unsigned int flags) { + struct wined3d_cs *cs = wined3d_cs_from_context(context); struct wined3d_cs_query_issue *op;
- op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT); + op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT); op->opcode = WINED3D_CS_OP_QUERY_ISSUE; op->query = query; op->flags = flags;
- wined3d_device_context_submit(&cs->c, WINED3D_CS_QUEUE_DEFAULT); + wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); cs->queries_flushed = FALSE; }
@@ -2796,6 +2798,7 @@ static const struct wined3d_device_context_ops wined3d_cs_st_ops = wined3d_cs_st_push_constants, wined3d_cs_map, wined3d_cs_unmap, + wined3d_cs_issue_query, };
static BOOL wined3d_cs_queue_is_empty(const struct wined3d_cs *cs, const struct wined3d_cs_queue *queue) @@ -2919,6 +2922,7 @@ static const struct wined3d_device_context_ops wined3d_cs_mt_ops = wined3d_cs_mt_push_constants, wined3d_cs_map, wined3d_cs_unmap, + wined3d_cs_issue_query, };
static void poll_queries(struct wined3d_cs *cs) diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c index 1ef83891ddf..ed66794c757 100644 --- a/dlls/wined3d/query.c +++ b/dlls/wined3d/query.c @@ -507,7 +507,7 @@ HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags) if (flags & WINED3DISSUE_END) ++query->counter_main;
- wined3d_cs_emit_query_issue(query->device->cs, query, flags); + query->device->cs->c.ops->issue_query(&query->device->cs->c, query, flags);
if (flags & WINED3DISSUE_BEGIN) query->state = QUERY_BUILDING; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 4d5f4765f57..0af1258e355 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4692,6 +4692,7 @@ struct wined3d_device_context_ops unsigned int flags); HRESULT (*unmap)(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx); + void (*issue_query)(struct wined3d_device_context *context, struct wined3d_query *query, unsigned int flags); };
struct wined3d_device_context @@ -4737,7 +4738,6 @@ void wined3d_cs_emit_flush(struct wined3d_cs *cs) DECLSPEC_HIDDEN; void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN; void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain, const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, unsigned int swap_interval, DWORD flags) DECLSPEC_HIDDEN; -void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN; void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane) DECLSPEC_HIDDEN;