summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/nir/nir_lower_viewport_transform.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_lower_viewport_transform.c b/src/compiler/nir/nir_lower_viewport_transform.c
index 94b54524ab7..4bbc88d75f5 100644
--- a/src/compiler/nir/nir_lower_viewport_transform.c
+++ b/src/compiler/nir/nir_lower_viewport_transform.c
@@ -56,7 +56,8 @@ nir_lower_viewport_transform(nir_shader *shader)
continue;
nir_variable *var = nir_intrinsic_get_var(intr, 0);
- if (var->data.location != VARYING_SLOT_POS)
+ if (var->data.mode != nir_var_shader_out ||
+ var->data.location != VARYING_SLOT_POS)
continue;
nir_builder b;