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 <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 7697b4b98b)
[Emil Velikov: resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

Conflicts:
	src/compiler/nir/nir_intrinsics.h
This commit is contained in:
Jason Ekstrand 2016-09-15 21:02:37 -07:00 committed by Emil Velikov
parent d8d7de3b29
commit 17429a22a6

View file

@ -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)