mesa/src
Andres Gomez 9f13d0c64b glsl: ignore all but the rightmost layout-qualifier-name
When a layout contains a duplicated layout-qualifier-name in a single
declaration, only the last occurrence should be taken into account.

From page 59 (page 65 of the PDF) of the GLSL 4.40 spec:

  " More than one layout qualifier may appear in a single
    declaration. Additionally, the same layout-qualifier-name can
    occur multiple times within a layout qualifier or across multiple
    layout qualifiers in the same declaration. When the same
    layout-qualifier-name occurs multiple times, in a single
    declaration, the last occurrence overrides the former
    occurrence(s)."

Consider this example:

  " #version 150
    #extension GL_ARB_enhanced_layouts: enable

    layout(max_vertices=2, max_vertices=3) out;
    layout(max_vertices=3) out;"

Although different values for "max_vertices" results in a compilation
error. The above code is valid because max_vertices=2 is ignored.

When merging qualifiers in an ast_type_qualifier, we now simply ignore
new appearances of a same layout-qualifier-name if the
"is_single_layout_merge" parameter is true, this works because the GLSL
parser processes qualifiers from right to left.

Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
2016-11-25 13:18:30 +02:00
..
amd radv: Don't generate radv_timestamp.h 2016-11-24 19:25:03 +01:00
compiler glsl: ignore all but the rightmost layout-qualifier-name 2016-11-25 13:18:30 +02:00
egl egl/x11: store xcb_screen_t *screen instead of int screen 2016-11-22 15:13:41 +00:00
gallium clover: Restore support for LLVM <= 3.9. 2016-11-24 16:40:29 -08:00
gbm gbm: request correct version of the DRI2_FENCE extension 2016-11-22 15:56:44 +00:00
getopt Introduce .editorconfig 2016-08-31 17:06:54 -07:00
glx dri: make use of loader_get_extensions_name(..) helper 2016-11-15 18:15:16 +00:00
gtest Introduce .editorconfig 2016-08-31 17:06:54 -07:00
hgl glapi/hgl: remove the final user of _glapi_check_table() 2016-10-06 15:03:46 +01:00
intel anv/state: if enabled, use anisotropic filtering also with VK_FILTER_NEAREST 2016-11-25 08:20:28 +01:00
loader loader: automake: whitespace cleanup 2016-11-21 14:46:40 +00:00
mapi mesa: add missing CONTEXT_ROBUST_ACCESS enum 2016-10-27 07:06:41 +03:00
mesa mesa/getteximage: Add validation of target to glGetTextureImage 2016-11-24 08:24:07 +01:00
util util: import CRC32 implementation from gallium 2016-11-22 18:05:51 +01:00
vulkan/wsi wsi: fix VK_INCOMPLETE for vkGetSwapchainImagesKHR 2016-11-16 09:17:34 +10:00
Makefile.am amd: flatten amd/common makefile structure 2016-11-15 20:04:37 +00:00
SConscript scons: put the generated git_sha1.h file in top-level src/ directory 2016-06-17 10:33:00 -06:00