summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2017-01-07 12:55:17 -0800
committerKenneth Graunke <[email protected]>2017-01-07 13:05:37 -0800
commit42699e12711668a142b7acf11c168cf4301c1295 (patch)
tree900e07735f082ea5243d717971994cf5d9d201c9 /src/compiler/glsl
parent5a165b4086d0bb2fab26ebae3d78e2732eeb8f57 (diff)
glsl: Make is_fixed_function_array actually check for varyings.
We can't check VARYING_SLOT_* locations until we've determined that the variable is actually a varying. Fixes assert failures in drivers which actually use this path, such as radeonsi and i915. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99314 Signed-off-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r--src/compiler/glsl/ir_set_program_inouts.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/glsl/ir_set_program_inouts.cpp b/src/compiler/glsl/ir_set_program_inouts.cpp
index 376d9c693fa..354b533bdcd 100644
--- a/src/compiler/glsl/ir_set_program_inouts.cpp
+++ b/src/compiler/glsl/ir_set_program_inouts.cpp
@@ -337,6 +337,10 @@ is_multiple_vertices(gl_shader_stage stage, ir_variable *var)
static bool
is_fixed_function_array(ir_variable *var)
{
+ if (var->data.mode != ir_var_shader_in &&
+ var->data.mode != ir_var_shader_out)
+ return false;
+
switch (var->data.location) {
case VARYING_SLOT_TESS_LEVEL_OUTER:
case VARYING_SLOT_TESS_LEVEL_INNER: