summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/link_varyings.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-08-30 22:51:25 -0700
committerKenneth Graunke <[email protected]>2016-09-01 11:24:17 -0700
commit9c562956f97cbb0698c0dc232eb594e7018a6c08 (patch)
treedbda4df3781b171004cd8cd314b52b28458a1975 /src/compiler/glsl/link_varyings.cpp
parent72b56e8b1ae34b4c10f822b704521ccd463270b3 (diff)
glsl: Only force varyings to be flat when varying packing.
Varying packing would like to mark certain variables as flat. This works as long as both sides of the interfaces are changed accordingly. However, with SSO, we disable varying packing on the outermost stages. We also disable varying packing for certain tessellation stages. With SSO, we operate on the producer and consumer separately. Checks based on the consumer stage and variable are risky, and can easily lead to altering one half of the interface between stages, breaking SSO pipeline IO validation. Just stop monkeying around with interpolation modes unless required for varying packing. There's no point. This also disables it in unsafe SSO cases. Fixes CTS tests: *.tessellation_shader.tessellation_control_to_tessellation_evaluation.gl_MaxPatchVertices_Position_PointSize Also fixes Piglit's spec/oes_geometry_shader/sso_validation: - user-defined-gs-input-not-in-block.shader_test - user-defined-gs-input-in-block.shader_test Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/compiler/glsl/link_varyings.cpp')
-rw-r--r--src/compiler/glsl/link_varyings.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp
index 1bce3e00207..1fad31087ec 100644
--- a/src/compiler/glsl/link_varyings.cpp
+++ b/src/compiler/glsl/link_varyings.cpp
@@ -1390,8 +1390,9 @@ varying_matches::record(ir_variable *producer_var, ir_variable *consumer_var)
(producer_var->type->contains_integer() ||
producer_var->type->contains_double());
- if (needs_flat_qualifier ||
- (consumer_stage != -1 && consumer_stage != MESA_SHADER_FRAGMENT)) {
+ if (!disable_varying_packing &&
+ (needs_flat_qualifier ||
+ (consumer_stage != -1 && consumer_stage != MESA_SHADER_FRAGMENT))) {
/* Since this varying is not being consumed by the fragment shader, its
* interpolation type varying cannot possibly affect rendering.
* Also, this variable is non-flat and is (or contains) an integer