summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ast_function.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-04-14 16:25:58 +1000
committerTimothy Arceri <[email protected]>2017-04-24 12:08:14 +1000
commiteb8aa93c03ee89ffd3041d41b6293e4b282b6ce6 (patch)
treee2ac2c3d8c104d67be6384b38c66c33ef1bb7c6c /src/compiler/glsl/ast_function.cpp
parentaa021d50c0a81b2d067a3c3aa7eb9789b91caa4b (diff)
glsl: disable varying packing for varying used by interpolateAt*
Currently the NIR backends depend on GLSL IR copy propagation to fix up the interpolateAt* function params after varying packing changes the shader input to a global. It's possible copy propagation might not always do what we need it too, and we also shouldn't depend on optimisations to do this type of thing for us. I'm not sure if the same is true for TGSI, but the following commit should re-enable packing for most cases in a safer way, so we just disable it everywhere. No change in shader-db for i965 (BDW) Acked-by: Elie Tournier <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ast_function.cpp')
-rw-r--r--src/compiler/glsl/ast_function.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/glsl/ast_function.cpp b/src/compiler/glsl/ast_function.cpp
index 9f03f321483..1b90937ec8c 100644
--- a/src/compiler/glsl/ast_function.cpp
+++ b/src/compiler/glsl/ast_function.cpp
@@ -235,6 +235,8 @@ verify_parameter_modes(_mesa_glsl_parse_state *state,
formal->name);
return false;
}
+
+ val->variable_referenced()->data.must_be_shader_input = 1;
}
/* Verify that 'out' and 'inout' actual parameters are lvalues. */