From 88456957fb05ef2e67012a6f30f66565c0ba2bf1 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 7 Apr 2021 21:19:59 -0500 Subject: [PATCH] wined3d: Pass a wined3d_device_context to wined3d_cs_emit_generate_mipmaps(). Signed-off-by: Zebediah Figura Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/cs.c | 7 ++++--- dlls/wined3d/view.c | 2 +- dlls/wined3d/wined3d_private.h | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index fb8411b3048..16a8385c0b4 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -2650,17 +2650,18 @@ static void wined3d_cs_exec_generate_mipmaps(struct wined3d_cs *cs, const void * wined3d_resource_release(view->resource); } -void wined3d_cs_emit_generate_mipmaps(struct wined3d_cs *cs, struct wined3d_shader_resource_view *view) +void wined3d_device_context_emit_generate_mipmaps(struct wined3d_device_context *context, + struct wined3d_shader_resource_view *view) { struct wined3d_cs_generate_mipmaps *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_GENERATE_MIPMAPS; op->view = view; wined3d_resource_acquire(view->resource); - wined3d_device_context_submit(&cs->c, WINED3D_CS_QUEUE_DEFAULT); + wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); } static void wined3d_cs_emit_stop(struct wined3d_cs *cs) diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c index f0833ff9e49..d386ebe1866 100644 --- a/dlls/wined3d/view.c +++ b/dlls/wined3d/view.c @@ -1423,7 +1423,7 @@ void CDECL wined3d_shader_resource_view_generate_mipmaps(struct wined3d_shader_r return; } - wined3d_cs_emit_generate_mipmaps(view->resource->device->cs, view); + wined3d_device_context_emit_generate_mipmaps(&view->resource->device->cs->c, view); } ULONG CDECL wined3d_unordered_access_view_incref(struct wined3d_unordered_access_view *view) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 38f19b21fbf..5fee3bf14aa 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4730,7 +4730,6 @@ void wined3d_cs_emit_clear_rendertarget_view(struct wined3d_cs *cs, struct wined void wined3d_cs_emit_clear_unordered_access_view_uint(struct wined3d_cs *cs, struct wined3d_unordered_access_view *view, const struct wined3d_uvec4 *clear_value) DECLSPEC_HIDDEN; void wined3d_cs_emit_flush(struct wined3d_cs *cs) DECLSPEC_HIDDEN; -void wined3d_cs_emit_generate_mipmaps(struct wined3d_cs *cs, struct wined3d_shader_resource_view *view) 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; @@ -4788,6 +4787,8 @@ void wined3d_device_context_emit_draw(struct wined3d_device_context *context, enum wined3d_primitive_type primitive_type, unsigned int patch_vertex_count, int base_vertex_idx, unsigned int start_idx, unsigned int index_count, unsigned int start_instance, unsigned int instance_count, bool indexed) DECLSPEC_HIDDEN; +void wined3d_device_context_emit_generate_mipmaps(struct wined3d_device_context *context, + struct wined3d_shader_resource_view *view) DECLSPEC_HIDDEN; void wined3d_device_context_emit_set_blend_state(struct wined3d_device_context *context, struct wined3d_blend_state *state, const struct wined3d_color *blend_factor, unsigned int sample_mask) DECLSPEC_HIDDEN;