diff options
Diffstat (limited to 'src/compiler/nir/nir_gather_info.c')
-rw-r--r-- | src/compiler/nir/nir_gather_info.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_gather_info.c b/src/compiler/nir/nir_gather_info.c index e80a65f19fd..f62adb6e1f4 100644 --- a/src/compiler/nir/nir_gather_info.c +++ b/src/compiler/nir/nir_gather_info.c @@ -290,8 +290,11 @@ gather_intrinsic_info(nir_intrinsic_instr *instr, nir_shader *shader, /* fallthrough: quads with helper lanes only might be discarded entirely */ case nir_intrinsic_discard: case nir_intrinsic_discard_if: - assert(shader->info.stage == MESA_SHADER_FRAGMENT); - shader->info.fs.uses_discard = true; + /* Freedreno uses the discard_if intrinsic to end GS invocations that + * don't produce a vertex, so we only set uses_discard if executing on + * a fragment shader. */ + if (shader->info.stage == MESA_SHADER_FRAGMENT) + shader->info.fs.uses_discard = true; break; case nir_intrinsic_interp_deref_at_centroid: |