wined3d: Regenerate FFP replacement VS on changes to the normal attribute in the vertex declaration.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
08be561fbf
commit
d2d8d8f13e
|
@ -8068,6 +8068,7 @@ static void glsl_vertex_pipe_vdecl(struct wined3d_context *context,
|
||||||
const struct wined3d_state *state, DWORD state_id)
|
const struct wined3d_state *state, DWORD state_id)
|
||||||
{
|
{
|
||||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||||
|
BOOL normal = !!(context->stream_info.use_map & (1u << WINED3D_FFP_NORMAL));
|
||||||
BOOL transformed = context->stream_info.position_transformed;
|
BOOL transformed = context->stream_info.position_transformed;
|
||||||
BOOL wasrhw = context->last_was_rhw;
|
BOOL wasrhw = context->last_was_rhw;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
@ -8093,7 +8094,8 @@ static void glsl_vertex_pipe_vdecl(struct wined3d_context *context,
|
||||||
/* Because of settings->texcoords, we have to regenerate the vertex
|
/* Because of settings->texcoords, we have to regenerate the vertex
|
||||||
* shader on a vdecl change if there aren't enough varyings to just
|
* shader on a vdecl change if there aren't enough varyings to just
|
||||||
* always output all the texture coordinates. */
|
* always output all the texture coordinates. */
|
||||||
if (gl_info->limits.glsl_varyings < wined3d_max_compat_varyings(gl_info))
|
if (gl_info->limits.glsl_varyings < wined3d_max_compat_varyings(gl_info)
|
||||||
|
|| normal != context->last_was_normal)
|
||||||
context->shader_update_mask |= 1u << WINED3D_SHADER_TYPE_VERTEX;
|
context->shader_update_mask |= 1u << WINED3D_SHADER_TYPE_VERTEX;
|
||||||
|
|
||||||
if (use_ps(state)
|
if (use_ps(state)
|
||||||
|
@ -8112,6 +8114,7 @@ static void glsl_vertex_pipe_vdecl(struct wined3d_context *context,
|
||||||
}
|
}
|
||||||
|
|
||||||
context->last_was_vshader = use_vs(state);
|
context->last_was_vshader = use_vs(state);
|
||||||
|
context->last_was_normal = normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void glsl_vertex_pipe_vs(struct wined3d_context *context,
|
static void glsl_vertex_pipe_vs(struct wined3d_context *context,
|
||||||
|
|
|
@ -1175,6 +1175,7 @@ struct wined3d_context
|
||||||
DWORD last_was_rhw : 1; /* true iff last draw_primitive was in xyzrhw mode */
|
DWORD last_was_rhw : 1; /* true iff last draw_primitive was in xyzrhw mode */
|
||||||
DWORD last_was_pshader : 1;
|
DWORD last_was_pshader : 1;
|
||||||
DWORD last_was_vshader : 1;
|
DWORD last_was_vshader : 1;
|
||||||
|
DWORD last_was_normal : 1;
|
||||||
DWORD namedArraysLoaded : 1;
|
DWORD namedArraysLoaded : 1;
|
||||||
DWORD numberedArraysLoaded : 1;
|
DWORD numberedArraysLoaded : 1;
|
||||||
DWORD last_was_blit : 1;
|
DWORD last_was_blit : 1;
|
||||||
|
@ -1185,17 +1186,17 @@ struct wined3d_context
|
||||||
DWORD current : 1;
|
DWORD current : 1;
|
||||||
DWORD destroyed : 1;
|
DWORD destroyed : 1;
|
||||||
DWORD valid : 1;
|
DWORD valid : 1;
|
||||||
DWORD use_immediate_mode_draw : 1;
|
|
||||||
DWORD texShaderBumpMap : 8; /* MAX_TEXTURES, 8 */
|
DWORD texShaderBumpMap : 8; /* MAX_TEXTURES, 8 */
|
||||||
DWORD lastWasPow2Texture : 8; /* MAX_TEXTURES, 8 */
|
DWORD lastWasPow2Texture : 8; /* MAX_TEXTURES, 8 */
|
||||||
DWORD fixed_function_usage_map : 8; /* MAX_TEXTURES, 8 */
|
DWORD fixed_function_usage_map : 8; /* MAX_TEXTURES, 8 */
|
||||||
DWORD lowest_disabled_stage : 4; /* Max MAX_TEXTURES, 8 */
|
DWORD lowest_disabled_stage : 4; /* Max MAX_TEXTURES, 8 */
|
||||||
|
DWORD use_immediate_mode_draw : 1;
|
||||||
DWORD rebind_fbo : 1;
|
DWORD rebind_fbo : 1;
|
||||||
DWORD needs_set : 1;
|
DWORD needs_set : 1;
|
||||||
DWORD hdc_is_private : 1;
|
DWORD hdc_is_private : 1;
|
||||||
DWORD hdc_has_format : 1; /* only meaningful if hdc_is_private */
|
DWORD hdc_has_format : 1; /* only meaningful if hdc_is_private */
|
||||||
DWORD update_shader_resource_bindings : 1;
|
DWORD update_shader_resource_bindings : 1;
|
||||||
DWORD padding : 15;
|
DWORD padding : 14;
|
||||||
DWORD shader_update_mask;
|
DWORD shader_update_mask;
|
||||||
DWORD constant_update_mask;
|
DWORD constant_update_mask;
|
||||||
DWORD numbered_array_mask;
|
DWORD numbered_array_mask;
|
||||||
|
|
Loading…
Reference in New Issue