wined3d: Do not record the GL primitive type in stateblocks.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7b18ff5abb
commit
e8e4fac959
|
@ -3449,11 +3449,9 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
|
||||||
TRACE("device %p, primitive_type %s\n", device, debug_d3dprimitivetype(primitive_type));
|
TRACE("device %p, primitive_type %s\n", device, debug_d3dprimitivetype(primitive_type));
|
||||||
|
|
||||||
gl_primitive_type = gl_primitive_type_from_d3d(primitive_type);
|
gl_primitive_type = gl_primitive_type_from_d3d(primitive_type);
|
||||||
prev = device->update_state->gl_primitive_type;
|
prev = device->state.gl_primitive_type;
|
||||||
device->update_state->gl_primitive_type = gl_primitive_type;
|
device->state.gl_primitive_type = gl_primitive_type;
|
||||||
if (device->recording)
|
if (gl_primitive_type != prev && (gl_primitive_type == GL_POINTS || prev == GL_POINTS))
|
||||||
device->recording->changed.primitive_type = TRUE;
|
|
||||||
else if (gl_primitive_type != prev && (gl_primitive_type == GL_POINTS || prev == GL_POINTS))
|
|
||||||
device_invalidate_state(device, STATE_POINT_ENABLE);
|
device_invalidate_state(device, STATE_POINT_ENABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -202,7 +202,6 @@ static void stateblock_savedstates_set_all(struct wined3d_saved_states *states,
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
/* Single values */
|
/* Single values */
|
||||||
states->primitive_type = 1;
|
|
||||||
states->indices = 1;
|
states->indices = 1;
|
||||||
states->material = 1;
|
states->material = 1;
|
||||||
states->viewport = 1;
|
states->viewport = 1;
|
||||||
|
@ -772,9 +771,6 @@ void CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock)
|
||||||
stateblock->state.transforms[transform] = src_state->transforms[transform];
|
stateblock->state.transforms[transform] = src_state->transforms[transform];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stateblock->changed.primitive_type)
|
|
||||||
stateblock->state.gl_primitive_type = src_state->gl_primitive_type;
|
|
||||||
|
|
||||||
if (stateblock->changed.indices
|
if (stateblock->changed.indices
|
||||||
&& ((stateblock->state.index_buffer != src_state->index_buffer)
|
&& ((stateblock->state.index_buffer != src_state->index_buffer)
|
||||||
|| (stateblock->state.base_vertex_index != src_state->base_vertex_index)
|
|| (stateblock->state.base_vertex_index != src_state->base_vertex_index)
|
||||||
|
@ -1045,19 +1041,6 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock)
|
||||||
&stateblock->state.transforms[stateblock->contained_transform_states[i]]);
|
&stateblock->state.transforms[stateblock->contained_transform_states[i]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stateblock->changed.primitive_type)
|
|
||||||
{
|
|
||||||
GLenum gl_primitive_type, prev;
|
|
||||||
|
|
||||||
if (device->recording)
|
|
||||||
device->recording->changed.primitive_type = TRUE;
|
|
||||||
gl_primitive_type = stateblock->state.gl_primitive_type;
|
|
||||||
prev = device->update_state->gl_primitive_type;
|
|
||||||
device->update_state->gl_primitive_type = gl_primitive_type;
|
|
||||||
if (gl_primitive_type != prev && (gl_primitive_type == GL_POINTS || prev == GL_POINTS))
|
|
||||||
device_invalidate_state(device, STATE_POINT_ENABLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stateblock->changed.indices)
|
if (stateblock->changed.indices)
|
||||||
{
|
{
|
||||||
wined3d_device_set_index_buffer(device, stateblock->state.index_buffer,
|
wined3d_device_set_index_buffer(device, stateblock->state.index_buffer,
|
||||||
|
|
|
@ -3101,7 +3101,6 @@ struct wined3d_saved_states
|
||||||
WORD vertexShaderConstantsI; /* WINED3D_MAX_CONSTS_I, 16 */
|
WORD vertexShaderConstantsI; /* WINED3D_MAX_CONSTS_I, 16 */
|
||||||
BOOL vs_consts_f[WINED3D_MAX_VS_CONSTS_F];
|
BOOL vs_consts_f[WINED3D_MAX_VS_CONSTS_F];
|
||||||
DWORD textures : 20; /* MAX_COMBINED_SAMPLERS, 20 */
|
DWORD textures : 20; /* MAX_COMBINED_SAMPLERS, 20 */
|
||||||
DWORD primitive_type : 1;
|
|
||||||
DWORD indices : 1;
|
DWORD indices : 1;
|
||||||
DWORD material : 1;
|
DWORD material : 1;
|
||||||
DWORD viewport : 1;
|
DWORD viewport : 1;
|
||||||
|
@ -3109,7 +3108,7 @@ struct wined3d_saved_states
|
||||||
DWORD pixelShader : 1;
|
DWORD pixelShader : 1;
|
||||||
DWORD vertexShader : 1;
|
DWORD vertexShader : 1;
|
||||||
DWORD scissorRect : 1;
|
DWORD scissorRect : 1;
|
||||||
DWORD padding : 4;
|
DWORD padding : 5;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct StageState {
|
struct StageState {
|
||||||
|
|
Loading…
Reference in New Issue