wined3d: Use the command stream state in wined3d_cs_exec_draw().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2017-02-28 06:11:58 +01:00 committed by Alexandre Julliard
parent 6823abd521
commit a7560cf695
1 changed files with 4 additions and 4 deletions

View File

@ -581,7 +581,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
{
struct wined3d_state *state = &cs->device->state;
struct wined3d_state *state = &cs->state;
const struct wined3d_cs_draw *op = data;
unsigned int i;
@ -592,11 +592,11 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
device_invalidate_state(cs->device, STATE_BASEVERTEXINDEX);
}
if (cs->state.gl_primitive_type != op->primitive_type)
if (state->gl_primitive_type != op->primitive_type)
{
if (cs->state.gl_primitive_type == GL_POINTS || op->primitive_type == GL_POINTS)
if (state->gl_primitive_type == GL_POINTS || op->primitive_type == GL_POINTS)
device_invalidate_state(cs->device, STATE_POINT_ENABLE);
cs->state.gl_primitive_type = op->primitive_type;
state->gl_primitive_type = op->primitive_type;
}
draw_primitive(cs->device, state, op->base_vertex_idx, op->start_idx,