summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/link_varyings.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2016-04-03 00:48:03 -0700
committerKenneth Graunke <kenneth@whitecape.org>2016-04-10 19:03:06 -0700
commit26c56e24e700d0ab4c6499fea28328045b5e4b32 (patch)
tree983001d652f07e5100e05b5630818d8652dd7083 /src/compiler/glsl/link_varyings.cpp
parentce84a92df54c738d2c248716f0f673247d50e1a7 (diff)
downloadexternal_mesa3d-26c56e24e700d0ab4c6499fea28328045b5e4b32.zip
external_mesa3d-26c56e24e700d0ab4c6499fea28328045b5e4b32.tar.gz
external_mesa3d-26c56e24e700d0ab4c6499fea28328045b5e4b32.tar.bz2
glsl: Don't remove XFB-only varyings.
Consider the case of linking a program with both a vertex and fragment shader. The VS may compute output varyings that are intended for transform feedback, and not read by the fragment shader. In this case, var->data.is_unmatched_generic_inout will be true, but we still cannot eliminate the varyings. We need to also check !var->data.is_xfb_only. Fixes failures in ES31-CTS.gpu_shader5.fma_precision_*, which happen to use transform feedback in a way we apparently hadn't seen before. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Diffstat (limited to 'src/compiler/glsl/link_varyings.cpp')
-rw-r--r--src/compiler/glsl/link_varyings.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp
index e9d0067..87606be 100644
--- a/src/compiler/glsl/link_varyings.cpp
+++ b/src/compiler/glsl/link_varyings.cpp
@@ -488,7 +488,7 @@ remove_unused_shader_inputs_and_outputs(bool is_separate_shader_object,
* its value is used by other shader stages. This will cause the
* variable to have a location assigned.
*/
- if (var->data.is_unmatched_generic_inout) {
+ if (var->data.is_unmatched_generic_inout && !var->data.is_xfb_only) {
assert(var->data.mode != ir_var_temporary);
var->data.mode = ir_var_auto;
}