From 8e62bd52f8296a220bd4542abd6fdcdfc41a388c Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 23 Feb 2015 23:47:00 -0800 Subject: nir: Introduce nir_intrinsic_discard_if. This is a conditional discard, which takes a boolean source. Note that we don't generate ir_discard::condition today, so this shouldn't break drivers (since none implement this intrinsic yet). Signed-off-by: Kenneth Graunke Reviewed-by: Connor Abbott Reviewed-by: Matt Turner Reviewed-by: Eric Anholt --- src/glsl/nir/nir_intrinsics.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/glsl/nir/nir_intrinsics.h') diff --git a/src/glsl/nir/nir_intrinsics.h b/src/glsl/nir/nir_intrinsics.h index d94866c8597..3bf102fc15c 100644 --- a/src/glsl/nir/nir_intrinsics.h +++ b/src/glsl/nir/nir_intrinsics.h @@ -68,6 +68,8 @@ INTRINSIC(interp_var_at_offset, 1, ARR(2), true, 0, 1, 0, #define BARRIER(name) INTRINSIC(name, 0, ARR(), false, 0, 0, 0, 0) BARRIER(discard) +/** A conditional discard, with a single boolean source. */ +INTRINSIC(discard_if, 1, ARR(1), false, 0, 0, 0, 0) INTRINSIC(emit_vertex, 0, ARR(), false, 0, 0, 1, 0) INTRINSIC(end_primitive, 0, ARR(), false, 0, 0, 1, 0) -- cgit v1.2.3