summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan A. Suarez Romero <jasuarez@igalia.com>2017-06-22 12:47:57 +0200
committerAndres Gomez <agomez@igalia.com>2017-07-12 19:32:09 +0300
commitc36c8ec52808eb55bf1517a7beaaacc955c1e612 (patch)
tree7c00e5575a5ef366967c1d51b733c2679ef28834
parent7bcb63457ba9a696ff023a3871baf61c3d1bbd05 (diff)
glsl: do not call link_xfb_stride_layout_qualifiers() for fragment shaders
xfb only applies to the latest stage before the fragment shader, so there is no need to invoke it in the fragment shader. Fixes: KHR-GL45.enhanced_layouts.xfb_stride_of_empty_list KHR-GL45.enhanced_layouts.xfb_stride_of_empty_list_and_api v2: do reset only if shaders provide an explicit stride v3: do not call link_xfb_stride_layout_qualifiers() for fragment shaders (Timothy) Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> (cherry picked from commit 860919a3b237386cba5b2951ae520bf6734fd17e) [Andres Gomez: resolve trivial conflicts] Signed-off-by: Andres Gomez <agomez@igalia.com>
-rw-r--r--src/compiler/glsl/linker.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 7ace01dd9d3..97eca769155 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -2221,8 +2221,10 @@ link_intrastage_shaders(void *mem_ctx,
link_tes_in_layout_qualifiers(prog, gl_prog, shader_list, num_shaders);
link_gs_inout_layout_qualifiers(prog, gl_prog, shader_list, num_shaders);
link_cs_input_layout_qualifiers(prog, gl_prog, shader_list, num_shaders);
- link_xfb_stride_layout_qualifiers(ctx, prog, linked, shader_list,
- num_shaders);
+
+ if (linked->Stage != MESA_SHADER_FRAGMENT)
+ link_xfb_stride_layout_qualifiers(ctx, prog, linked, shader_list,
+ num_shaders);
populate_symbol_table(linked);