nir: Only do gl_FrontFacing workaround in glsl_to_nir for the FS.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 6 Mar 2015 09:24:30 +0000 (01:24 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 9 Mar 2015 03:04:02 +0000 (20:04 -0700)
commit8dcc1f2c10b3dc6ded38e7a6c302f60061ba587c
treecd60e01f499248d331e23afd668be741f40be541
parentc6f2abe67e38c52361a1d342dca6ec5ed7747913
nir: Only do gl_FrontFacing workaround in glsl_to_nir for the FS.

Vertex shaders can have shader inputs where location happens to be
VARYING_SLOT_FACE.  Without predicating this on the shader stage,
we suddenly end up with load_front_face intrinsics in vertex shaders,
which is nonsensical.

Fixes spec/arb_vertex_buffer_object/pos-array when using NIR for VS.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/glsl/nir/glsl_to_nir.cpp