Zebediah Figura : wined3d: Pass a wined3d_device_context to wined3d_device_get_primitive_type().
Alexandre Julliard
julliard at winehq.org
Wed Apr 21 15:57:55 CDT 2021
Module: wine
Branch: master
Commit: 5cd23ae872fc407d3edd2d2c08b97f32628d880a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5cd23ae872fc407d3edd2d2c08b97f32628d880a
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Tue Apr 20 19:53:57 2021 -0500
wined3d: Pass a wined3d_device_context to wined3d_device_get_primitive_type().
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3d11/device.c | 7 ++++---
dlls/wined3d/device.c | 8 ++++----
dlls/wined3d/wined3d.spec | 2 +-
include/wine/wined3d.h | 4 ++--
4 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index c2d2ccd0259..ee6ecd2c29c 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -1900,14 +1900,14 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetShader(ID3D11DeviceCo
static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetPrimitiveTopology(ID3D11DeviceContext1 *iface,
D3D11_PRIMITIVE_TOPOLOGY *topology)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
enum wined3d_primitive_type primitive_type;
unsigned int patch_vertex_count;
TRACE("iface %p, topology %p.\n", iface, topology);
wined3d_mutex_lock();
- wined3d_device_get_primitive_type(device->wined3d_device, &primitive_type, &patch_vertex_count);
+ wined3d_device_context_get_primitive_type(context->wined3d_context, &primitive_type, &patch_vertex_count);
wined3d_mutex_unlock();
d3d11_primitive_topology_from_wined3d_primitive_type(primitive_type, patch_vertex_count, topology);
@@ -5259,7 +5259,8 @@ static void STDMETHODCALLTYPE d3d10_device_IAGetPrimitiveTopology(ID3D10Device1
TRACE("iface %p, topology %p.\n", iface, topology);
wined3d_mutex_lock();
- wined3d_device_get_primitive_type(device->wined3d_device, (enum wined3d_primitive_type *)topology, NULL);
+ wined3d_device_context_get_primitive_type(device->immediate_context.wined3d_context,
+ (enum wined3d_primitive_type *)topology, NULL);
wined3d_mutex_unlock();
}
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 623f969d690..bf4c37756a7 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4500,13 +4500,13 @@ void CDECL wined3d_device_context_set_primitive_type(struct wined3d_device_conte
state->patch_vertex_count = patch_vertex_count;
}
-void CDECL wined3d_device_get_primitive_type(const struct wined3d_device *device,
+void CDECL wined3d_device_context_get_primitive_type(const struct wined3d_device_context *context,
enum wined3d_primitive_type *primitive_type, unsigned int *patch_vertex_count)
{
- const struct wined3d_state *state = device->cs->c.state;
+ const struct wined3d_state *state = context->state;
- TRACE("device %p, primitive_type %p, patch_vertex_count %p.\n",
- device, primitive_type, patch_vertex_count);
+ TRACE("context %p, primitive_type %p, patch_vertex_count %p.\n",
+ context, primitive_type, patch_vertex_count);
*primitive_type = state->primitive_type;
if (patch_vertex_count)
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 54f93e87679..203ffd67b89 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -77,7 +77,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_primitive_type(ptr ptr ptr)
@ cdecl wined3d_device_get_ps_resource_view(ptr long)
@ cdecl wined3d_device_get_ps_sampler(ptr long)
@ cdecl wined3d_device_get_raster_status(ptr long ptr)
@@ -163,6 +162,7 @@
@ cdecl wined3d_device_context_get_depth_stencil_view(ptr)
@ cdecl wined3d_device_context_get_index_buffer(ptr ptr ptr)
@ cdecl wined3d_device_context_get_predication(ptr ptr)
+@ cdecl wined3d_device_context_get_primitive_type(ptr 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 3e31de44711..de96ff0601b 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2408,8 +2408,6 @@ struct wined3d_device_context * __cdecl wined3d_device_get_immediate_context(str
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);
-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,
UINT idx);
struct wined3d_sampler * __cdecl wined3d_device_get_ps_sampler(const struct wined3d_device *device, UINT idx);
@@ -2555,6 +2553,8 @@ struct wined3d_buffer * __cdecl wined3d_device_context_get_index_buffer(const st
enum wined3d_format_id *format, unsigned int *offset);
struct wined3d_query * __cdecl wined3d_device_context_get_predication(struct wined3d_device_context *context,
BOOL *value);
+void __cdecl wined3d_device_context_get_primitive_type(const struct wined3d_device_context *context,
+ enum wined3d_primitive_type *primitive_topology, unsigned int *patch_vertex_count);
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(
More information about the wine-cvs
mailing list