[PATCH 3/5] wined3d: Pass a wined3d_device_context to wined3d_device_get_predication().

Zebediah Figura z.figura12 at gmail.com
Mon Apr 19 23:38:09 CDT 2021


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/d3d11/device.c       | 6 +++---
 dlls/wined3d/device.c     | 6 +++---
 dlls/wined3d/wined3d.spec | 2 +-
 include/wine/wined3d.h    | 3 ++-
 4 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index e58b02038c8..0226d26047d 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -1973,14 +1973,14 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetSamplers(ID3D11Device
 static void STDMETHODCALLTYPE d3d11_immediate_context_GetPredication(ID3D11DeviceContext1 *iface,
         ID3D11Predicate **predicate, BOOL *value)
 {
-    struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+    struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
     struct wined3d_query *wined3d_predicate;
     struct d3d_query *predicate_impl;
 
     TRACE("iface %p, predicate %p, value %p.\n", iface, predicate, value);
 
     wined3d_mutex_lock();
-    if (!(wined3d_predicate = wined3d_device_get_predication(device->wined3d_device, value)))
+    if (!(wined3d_predicate = wined3d_device_context_get_predication(context->wined3d_context, value)))
     {
         wined3d_mutex_unlock();
         *predicate = NULL;
@@ -5329,7 +5329,7 @@ static void STDMETHODCALLTYPE d3d10_device_GetPredication(ID3D10Device1 *iface,
     TRACE("iface %p, predicate %p, value %p.\n", iface, predicate, value);
 
     wined3d_mutex_lock();
-    if (!(wined3d_predicate = wined3d_device_get_predication(device->wined3d_device, value)))
+    if (!(wined3d_predicate = wined3d_device_context_get_predication(device->immediate_context.wined3d_context, value)))
     {
         wined3d_mutex_unlock();
         *predicate = NULL;
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 9590c7d7341..3461c099a5c 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4459,11 +4459,11 @@ void CDECL wined3d_device_set_predication(struct wined3d_device *device,
     wined3d_device_context_set_predication(&device->cs->c, predicate, value);
 }
 
-struct wined3d_query * CDECL wined3d_device_get_predication(struct wined3d_device *device, BOOL *value)
+struct wined3d_query * CDECL wined3d_device_context_get_predication(struct wined3d_device_context *context, BOOL *value)
 {
-    struct wined3d_state *state = device->cs->c.state;
+    struct wined3d_state *state = context->state;
 
-    TRACE("device %p, value %p.\n", device, value);
+    TRACE("context %p, value %p.\n", context, value);
 
     if (value)
         *value = state->predicate_value;
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 0a5cb608fc1..b008d192b8f 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -78,7 +78,6 @@
 @ cdecl wined3d_device_get_max_frame_latency(ptr)
 @ cdecl wined3d_device_get_npatch_mode(ptr)
 @ cdecl wined3d_device_get_pixel_shader(ptr)
-@ cdecl wined3d_device_get_predication(ptr ptr)
 @ cdecl wined3d_device_get_primitive_type(ptr ptr ptr)
 @ cdecl wined3d_device_get_ps_resource_view(ptr long)
 @ cdecl wined3d_device_get_ps_sampler(ptr long)
@@ -167,6 +166,7 @@
 @ cdecl wined3d_device_context_get_constant_buffer(ptr long long)
 @ cdecl wined3d_device_context_get_depth_stencil_state(ptr ptr)
 @ cdecl wined3d_device_context_get_depth_stencil_view(ptr)
+@ cdecl wined3d_device_context_get_predication(ptr ptr)
 @ cdecl wined3d_device_context_get_rasterizer_state(ptr)
 @ cdecl wined3d_device_context_get_rendertarget_view(ptr long)
 @ cdecl wined3d_device_context_get_sampler(ptr long long)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 61162819ede..bc26e794582 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2410,7 +2410,6 @@ struct wined3d_buffer * __cdecl wined3d_device_get_index_buffer(const struct win
 unsigned int __cdecl wined3d_device_get_max_frame_latency(const struct wined3d_device *device);
 float __cdecl wined3d_device_get_npatch_mode(const struct wined3d_device *device);
 struct wined3d_shader * __cdecl wined3d_device_get_pixel_shader(const struct wined3d_device *device);
-struct wined3d_query * __cdecl wined3d_device_get_predication(struct wined3d_device *device, BOOL *value);
 void __cdecl wined3d_device_get_primitive_type(const struct wined3d_device *device,
         enum wined3d_primitive_type *primitive_topology, unsigned int *patch_vertex_count);
 struct wined3d_shader_resource_view * __cdecl wined3d_device_get_ps_resource_view(const struct wined3d_device *device,
@@ -2561,6 +2560,8 @@ struct wined3d_buffer * __cdecl wined3d_device_context_get_constant_buffer(const
         enum wined3d_shader_type shader_type, unsigned int idx);
 struct wined3d_depth_stencil_state * __cdecl wined3d_device_context_get_depth_stencil_state(
         const struct wined3d_device_context *context, unsigned int *stencil_ref);
+struct wined3d_query * __cdecl wined3d_device_context_get_predication(struct wined3d_device_context *context,
+        BOOL *value);
 struct wined3d_rasterizer_state * __cdecl wined3d_device_context_get_rasterizer_state(
         struct wined3d_device_context *context);
 struct wined3d_rendertarget_view * __cdecl wined3d_device_context_get_rendertarget_view(
-- 
2.30.2




More information about the wine-devel mailing list