Commit 7494294d authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Introduce wined3d_device_context_set_rasterizer_state().

parent a5916c05
......@@ -1780,21 +1780,9 @@ struct wined3d_depth_stencil_state * CDECL wined3d_device_get_depth_stencil_stat
void CDECL wined3d_device_set_rasterizer_state(struct wined3d_device *device,
struct wined3d_rasterizer_state *rasterizer_state)
{
struct wined3d_state *state = device->cs->c.state;
struct wined3d_rasterizer_state *prev;
TRACE("device %p, rasterizer_state %p.\n", device, rasterizer_state);
prev = state->rasterizer_state;
if (prev == rasterizer_state)
return;
if (rasterizer_state)
wined3d_rasterizer_state_incref(rasterizer_state);
state->rasterizer_state = rasterizer_state;
wined3d_device_context_emit_set_rasterizer_state(&device->cs->c, rasterizer_state);
if (prev)
wined3d_rasterizer_state_decref(prev);
wined3d_device_context_set_rasterizer_state(&device->cs->c, rasterizer_state);
}
struct wined3d_rasterizer_state * CDECL wined3d_device_get_rasterizer_state(struct wined3d_device *device)
......@@ -2150,6 +2138,26 @@ void CDECL wined3d_device_context_set_depth_stencil_state(struct wined3d_device_
wined3d_depth_stencil_state_decref(prev);
}
void CDECL wined3d_device_context_set_rasterizer_state(struct wined3d_device_context *context,
struct wined3d_rasterizer_state *rasterizer_state)
{
struct wined3d_state *state = context->state;
struct wined3d_rasterizer_state *prev;
TRACE("context %p, rasterizer_state %p.\n", context, rasterizer_state);
prev = state->rasterizer_state;
if (prev == rasterizer_state)
return;
if (rasterizer_state)
wined3d_rasterizer_state_incref(rasterizer_state);
state->rasterizer_state = rasterizer_state;
wined3d_device_context_emit_set_rasterizer_state(context, rasterizer_state);
if (prev)
wined3d_rasterizer_state_decref(prev);
}
void CDECL wined3d_device_set_vertex_shader(struct wined3d_device *device, struct wined3d_shader *shader)
{
TRACE("device %p, shader %p.\n", device, shader);
......
......@@ -170,6 +170,7 @@
@ cdecl wined3d_device_context_set_blend_state(ptr ptr ptr long)
@ cdecl wined3d_device_context_set_constant_buffer(ptr long long ptr)
@ cdecl wined3d_device_context_set_depth_stencil_state(ptr ptr long)
@ cdecl wined3d_device_context_set_rasterizer_state(ptr ptr)
@ cdecl wined3d_device_context_set_shader(ptr long ptr)
@ cdecl wined3d_output_find_closest_matching_mode(ptr ptr)
......
......@@ -2555,6 +2555,8 @@ void __cdecl wined3d_device_context_set_constant_buffer(struct wined3d_device_co
enum wined3d_shader_type type, unsigned int idx, struct wined3d_buffer *buffer);
void __cdecl wined3d_device_context_set_depth_stencil_state(struct wined3d_device_context *context,
struct wined3d_depth_stencil_state *depth_stencil_state, unsigned int stencil_ref);
void __cdecl wined3d_device_context_set_rasterizer_state(struct wined3d_device_context *context,
struct wined3d_rasterizer_state *rasterizer_state);
void __cdecl wined3d_device_context_set_shader(struct wined3d_device_context *context,
enum wined3d_shader_type type, struct wined3d_shader *shader);
......
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