Module: wine Branch: master Commit: 392a724fc9fb59d4b82adbca3652962832db87e8 URL: https://gitlab.winehq.org/wine/wine/-/commit/392a724fc9fb59d4b82adbca3652962...
Author: Elizabeth Figura zfigura@codeweavers.com Date: Fri May 3 16:20:30 2024 -0500
wined3d: Invalidate the vertex shader when WINED3D_FFP_PSIZE is toggled.
---
dlls/d3d9/tests/visual.c | 2 +- dlls/wined3d/glsl_shader.c | 4 +++- dlls/wined3d/wined3d_private.h | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 600a6296c70..d1020339db0 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -12332,7 +12332,7 @@ static void test_pointsize(void) ok(color != 0xff00ffff, "Got unexpected color 0x%08x at (64, 64).\n", color); }
- todo_wine_if (j == 10) + todo_wine_if (j == 10 || (j == 11 && i == 10)) { color = get_readback_color(&rb, 63, 64); ok(color == 0xff00ffff, "Got unexpected color 0x%08x at (63, 64).\n", color); diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index ea79e0361e0..463dbf47fd6 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -11759,6 +11759,7 @@ static void glsl_vertex_pipe_vdecl(struct wined3d_context *context, struct wined3d_context_gl *context_gl = wined3d_context_gl(context); const struct wined3d_gl_info *gl_info = context_gl->gl_info; BOOL specular = !!(context->stream_info.use_map & (1u << WINED3D_FFP_SPECULAR)); + BOOL point_size = !!(context->stream_info.use_map & (1u << WINED3D_FFP_PSIZE)); BOOL diffuse = !!(context->stream_info.use_map & (1u << WINED3D_FFP_DIFFUSE)); BOOL normal = !!(context->stream_info.use_map & (1u << WINED3D_FFP_NORMAL)); const BOOL legacy_clip_planes = needs_legacy_glsl_syntax(gl_info); @@ -11799,7 +11800,7 @@ static void glsl_vertex_pipe_vdecl(struct wined3d_context *context, * normal presence changes. */ if (!shader_glsl_full_ffp_varyings(gl_info) || (state->render_states[WINED3D_RS_COLORVERTEX] && (diffuse != context->last_was_diffuse || specular != context->last_was_specular)) - || normal != context->last_was_normal) + || normal != context->last_was_normal || point_size != context->last_was_point_size) context->shader_update_mask |= 1u << WINED3D_SHADER_TYPE_VERTEX;
if (use_ps(state) @@ -11824,6 +11825,7 @@ static void glsl_vertex_pipe_vdecl(struct wined3d_context *context, context->last_was_diffuse = diffuse; context->last_was_specular = specular; context->last_was_normal = normal; + context->last_was_point_size = point_size; }
static void glsl_vertex_pipe_vs(struct wined3d_context *context, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 67ddf6f88cd..85badd3b2c3 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1907,12 +1907,12 @@ struct wined3d_context DWORD update_unordered_access_view_bindings : 1; DWORD update_compute_unordered_access_view_bindings : 1; DWORD update_primitive_type : 1; - DWORD update_patch_vertex_count : 1; DWORD last_was_rhw : 1; /* True iff last draw_primitive was in xyzrhw mode. */ DWORD last_was_vshader : 1; DWORD last_was_diffuse : 1; DWORD last_was_specular : 1; DWORD last_was_normal : 1; + DWORD last_was_point_size : 1; DWORD last_was_ffp_blit : 1; DWORD last_was_blit : 1; DWORD last_was_dual_source_blend : 1; @@ -1927,7 +1927,8 @@ struct wined3d_context DWORD destroyed : 1; DWORD destroy_delayed : 1; DWORD update_multisample_state : 1; - DWORD padding : 24; + DWORD update_patch_vertex_count : 1; + DWORD padding : 23;
DWORD clip_distance_mask : 8; /* WINED3D_MAX_CLIP_DISTANCES, 8 */