nir: Store gl_shader_stage in nir_shader.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 18 Aug 2015 08:48:34 +0000 (01:48 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 25 Aug 2015 18:12:35 +0000 (11:12 -0700)
commitd4d5b430a52aab148c8697deaedd8864e1749f3c
treeef0d69d5b22fb224bab921cb1b897935f9f3d62e
parentdfacae3a56463e2df3a67e245f868e9f2be64dcd
nir: Store gl_shader_stage in nir_shader.

This makes it easy for NIR passes to inspect what kind of shader they're
operating on.

Thanks to Michel Dänzer for helping me figure out where TGSI stores the
shader stage information.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/auxiliary/nir/tgsi_to_nir.c
src/glsl/nir/glsl_to_nir.cpp
src/glsl/nir/nir.c
src/glsl/nir/nir.h
src/mesa/program/prog_to_nir.c