freedreno/ir3: Fix clipvertex with GS+tess
authorRob Clark <robdclark@chromium.org>
Mon, 17 Oct 2022 17:25:10 +0000 (10:25 -0700)
committerMarge Bot <emma+marge@anholt.net>
Wed, 19 Oct 2022 12:23:40 +0000 (12:23 +0000)
If we have both GS and tess, GS is the stage we should run lower_clip_vs
on.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19100>

src/freedreno/ir3/ir3_nir.c

index f9a35d3..8cc2920 100644 (file)
@@ -647,12 +647,12 @@ lower_ucp_vs(struct ir3_shader_variant *so)
    if (!so->key.ucp_enables)
       return false;
 
-   gl_shader_stage last_geom_stage = MESA_SHADER_VERTEX;
+   gl_shader_stage last_geom_stage;
 
-   if (so->key.tessellation) {
-      last_geom_stage = MESA_SHADER_TESS_EVAL;
-   } else if (so->key.has_gs) {
+   if (so->key.has_gs) {
       last_geom_stage = MESA_SHADER_GEOMETRY;
+   } else if (so->key.tessellation) {
+      last_geom_stage = MESA_SHADER_TESS_EVAL;
    } else {
       last_geom_stage = MESA_SHADER_VERTEX;
    }