summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-06-20 23:41:11 -0700
committerJason Ekstrand <[email protected]>2016-06-21 16:45:25 -0700
commit295e03c980a7ff6dde77abcb6bbfa2f8d015323b (patch)
treefb58399a97a4ba69ec2a254e2974d2d2ddcb2c2a /src/compiler
parent40013c50333caf7a4a66204ac29695aad0d9b06d (diff)
spirv: Use the system value version of gl_FrontFace
SPIR-V treats it as an input but NIR wants the system value. This shouldn't have been too much of a surprise given that we have to do the same conversion in the GLSL IR to NIR pass. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/spirv/vtn_variables.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index 61fc184a692..fe2494ba3b3 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -839,8 +839,8 @@ vtn_get_builtin_location(struct vtn_builder *b,
assert(*mode == nir_var_shader_in);
break;
case SpvBuiltInFrontFacing:
- *location = VARYING_SLOT_FACE;
- assert(*mode == nir_var_shader_in);
+ *location = SYSTEM_VALUE_FRONT_FACE;
+ set_mode_system_value(mode);
break;
case SpvBuiltInSampleId:
*location = SYSTEM_VALUE_SAMPLE_ID;