From 5cb4c5bd472afc949f7412abd55daec91b46d043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 17 Nov 2024 13:02:11 -0500 Subject: [PATCH] radeonsi: fix gl_FrontFace elimination when one side is culled Fixes: 55d81214c9d800c066 - radeonsi: replace gl_FrontFacing with a constant if one side is always culled Reviewed-by: Pierre-Eric Pelloux-Prayer (cherry picked from commit 51aa1d8381682789a666ed2e6575a79be7241f7a) Part-of: --- .pick_status.json | 2 +- src/gallium/drivers/radeonsi/si_state_shaders.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index c692dd1d22b..c5310a1d9ec 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -384,7 +384,7 @@ "description": "radeonsi: fix gl_FrontFace elimination when one side is culled", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "55d81214c9d800c0667337808a82143ebab17c1a", "notes": null diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.cpp b/src/gallium/drivers/radeonsi/si_state_shaders.cpp index f31f856905e..4403f6764b2 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.cpp +++ b/src/gallium/drivers/radeonsi/si_state_shaders.cpp @@ -2445,8 +2445,7 @@ void si_vs_ps_key_update_rast_prim_smooth_stipple(struct si_context *sctx) ps_key->ps.part.prolog.poly_stipple = rs->poly_stipple_enable; ps_key->ps.mono.poly_line_smoothing = rs->poly_smooth && sctx->framebuffer.nr_samples <= 1; ps_key->ps.mono.point_smoothing = 0; - ps_key->ps.opt.force_front_face_input = rs->force_front_face_input && - ps->info.uses_frontface; + ps_key->ps.opt.force_front_face_input = ps->info.uses_frontface ? rs->force_front_face_input : 0; } if (vs_key->ge.opt.kill_pointsize != old_kill_pointsize ||