summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/spirv')
-rw-r--r--src/compiler/spirv/vtn_variables.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index d55f81e5d34..4d1ec789cc3 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -975,8 +975,12 @@ vtn_get_builtin_location(struct vtn_builder *b,
set_mode_system_value(mode);
break;
case SpvBuiltInSampleMask:
- *location = SYSTEM_VALUE_SAMPLE_MASK_IN; /* XXX out? */
- set_mode_system_value(mode);
+ if (*mode == nir_var_shader_out) {
+ *location = FRAG_RESULT_SAMPLE_MASK;
+ } else {
+ *location = SYSTEM_VALUE_SAMPLE_MASK_IN;
+ set_mode_system_value(mode);
+ }
break;
case SpvBuiltInFragDepth:
*location = FRAG_RESULT_DEPTH;