Commit 5cd23ae8 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Pass a wined3d_device_context to wined3d_device_get_primitive_type().

parent ea5041c6
......@@ -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();
}
......
......@@ -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)
......
......@@ -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)
......
......@@ -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(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment