From: Juan A. Suarez Romero Date: Thu, 22 Jun 2017 10:47:57 +0000 (+0200) Subject: glsl: do not call link_xfb_stride_layout_qualifiers() for fragment shaders X-Git-Tag: upstream/18.1.0~8370 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=860919a3b237386cba5b2951ae520bf6734fd17e;p=platform%2Fupstream%2Fmesa.git 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 Signed-off-by: Juan A. Suarez Romero --- diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index adfa3b7..73ab8ff 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -2251,8 +2251,11 @@ 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); + link_bindless_layout_qualifiers(prog, gl_prog, shader_list, num_shaders); populate_symbol_table(linked);