nir: Add a halt instruction type

Graphics / Mesa 3D Graphics Library / Mesa - Jason Ekstrand [jlekstrand.net] - 25 November 2020 05:37 UTC

Halt is like a return for the entire shader or exit() if you prefer to think of it that way. Once an invocation hits a halt, it's 100% dead. Any writes to output variables which happened before the halt do, however, still apply.

630e54a08b7 nir: Add a halt instruction type
src/broadcom/compiler/nir_to_vir.c | 1 +
src/compiler/nir/nir.h | 17 +++++++++
src/compiler/nir/nir_control_flow.c | 55 ++++++++++++++++++++++++++++++
src/compiler/nir/nir_divergence_analysis.c | 3 ++
src/compiler/nir/nir_opt_dead_cf.c | 10 +++---
src/compiler/nir/nir_print.c | 4 +++
src/compiler/nir/nir_validate.c | 1 +
7 files changed, 87 insertions(+), 4 deletions(-)

Upstream: cgit.freedesktop.org


  • Share