nir/divergence: handle load_primitive_id in GS
authorRhys Perry <pendingchaos02@gmail.com>
Mon, 14 Oct 2019 16:03:07 +0000 (17:03 +0100)
committerRhys Perry <pendingchaos02@gmail.com>
Tue, 14 Jan 2020 11:29:44 +0000 (11:29 +0000)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2323>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2323>

src/compiler/nir/nir_divergence_analysis.c

index 9b8f9cb6349f185e2334d48ef18f8b933d1f67ba..397015263e1f348bd54c04f3eb7c429aded4c737 100644 (file)
@@ -157,6 +157,8 @@ visit_intrinsic(bool *divergent, nir_intrinsic_instr *instr,
          is_divergent = !(options & nir_divergence_single_patch_per_tcs_subgroup);
       else if (stage == MESA_SHADER_TESS_EVAL)
          is_divergent = !(options & nir_divergence_single_patch_per_tes_subgroup);
+      else if (stage == MESA_SHADER_GEOMETRY)
+         is_divergent = true;
       else
          unreachable("Invalid stage for load_primitive_id");
       break;