From 17429a22a6026dc6601fc8e9ae4f0daecb30079a Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 15 Sep 2016 21:02:37 -0700 Subject: [PATCH] nir: Add a nop intrinsic This intrinsic has no destination, no sources, no variables, and can be eliminated. In other words, it does nothing and will always get deleted by dead code elimination. However, it does provide a quick-and-easy way to temporarily tag a particular location in a NIR shader. Signed-off-by: Jason Ekstrand Reviewed-by: Kenneth Graunke Cc: "12.0" (cherry picked from commit 7697b4b98b155c818811709becdb408772371538) [Emil Velikov: resolve trivial conflicts] Signed-off-by: Emil Velikov Conflicts: src/compiler/nir/nir_intrinsics.h --- src/compiler/nir/nir_intrinsics.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/nir/nir_intrinsics.h b/src/compiler/nir/nir_intrinsics.h index 6a9744104a5..947906045e6 100644 --- a/src/compiler/nir/nir_intrinsics.h +++ b/src/compiler/nir/nir_intrinsics.h @@ -41,6 +41,8 @@ #define ARR(...) { __VA_ARGS__ } +INTRINSIC(nop, 0, ARR(0), false, 0, 0, 0, xx, xx, xx, + NIR_INTRINSIC_CAN_ELIMINATE) INTRINSIC(load_var, 0, ARR(0), true, 0, 1, 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE) INTRINSIC(store_var, 1, ARR(0), false, 0, 1, 1, WRMASK, xx, xx, 0)