mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-21 16:20:39 +02:00
nir/gather_info: allow terminate() in non-PS
RADV will use terminate() to end ray-tracing shaders. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21736>
This commit is contained in:
parent
842b8f14f4
commit
3073810397
1 changed files with 6 additions and 9 deletions
|
|
@ -540,17 +540,14 @@ 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:
|
||||
/* 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_terminate:
|
||||
case nir_intrinsic_terminate_if:
|
||||
assert(shader->info.stage == MESA_SHADER_FRAGMENT);
|
||||
shader->info.fs.uses_discard = true;
|
||||
/* Freedreno uses discard_if() to end GS invocations that don't produce
|
||||
* a vertex and RADV uses terminate() to end ray-tracing shaders,
|
||||
* so only set uses_discard for fragment shaders.
|
||||
*/
|
||||
if (shader->info.stage == MESA_SHADER_FRAGMENT)
|
||||
shader->info.fs.uses_discard = true;
|
||||
break;
|
||||
|
||||
case nir_intrinsic_interp_deref_at_centroid:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue