mesa/src/compiler
Andres Gomez b27be186cb Revert "glsl: allow layout qualifier overrides with ARB_shading_language_420pack"
This reverts commit aaa69c79cd.

The commit was erroneous because the ast_layout_expression class is
meant to hold a list used for an after check that all the declared
values for a layout-qualifier-name are consistent.

Therefore, the check for the possibility of duplicated values was
previously fixed to happen much sooner, in the GLSL parser and the
merge of layout qualifiers, and the process_qualifier_constant method
only needs to check that the values are consistent.

By now, those layout-qualifier-name represented as a
ast_layout_expression are "max_vertices", "invocations", "vertices",
"local_size_[x|y|z]" and "xfb_stride".

From page 40 (page 46 of the PDF) of the GLSL 1.50 spec:

  " All geometry shader output layout declarations in a program must
    declare the same layout and same value for max_vertices."

From page 44 (page 50 of the PDF) of the GLSL 4.00 spec:

  " If an invocation count is declared, all such declarations must
    specify the same count."

From page 47 (page 53 of the PDF) of the GLSL 4.00 spec:

  " All tessellation control shader layout declarations in a program
    must specify the same output patch vertex count."

From page 60 (page 66 of the PDF) of the GLSL 4.30 spec:

  " Also, if such a layout qualifier is declared more than once in the
    same shader, all those declarations must set the same set of local
    work-group sizes and set them to the same values; otherwise a
    compile-time error results. If multiple compute shaders attached
    to a single program object declare local work-group size, the
    declarations must be identical; otherwise a link-time error
    results."

From page 73 (page 79 of the PDF) of the GLSL 4.40 spec:

  " While xfb_stride can be declared multiple times for the same
    buffer, it is a compile-time or link-time error to have different
    values specified for the stride for the same buffer."

Fixes GL44-CTS.enhanced_layouts.xfb_duplicated_stride

Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
2016-11-25 13:18:31 +02:00
..
glsl Revert "glsl: allow layout qualifier overrides with ARB_shading_language_420pack" 2016-11-25 13:18:31 +02:00
nir nir: Add a layer_id system value intrinsic 2016-11-22 13:03:29 -08:00
spirv nir/spirv: implement ordered / unordered floating point comparisons properly 2016-11-23 08:07:44 +01:00
.gitignore nir/spirv: Remove a duplicate spirv2nir from .gitignore 2016-10-04 07:43:15 -07:00
Android.glsl.gen.mk Android: glsl: add rules to generate ir_expression*.h header files 2016-09-06 15:58:55 +01:00
Android.glsl.mk Android: glsl: add rules to generate ir_expression*.h header files 2016-09-06 15:58:55 +01:00
Android.mk Android: glsl: add rules to generate ir_expression*.h header files 2016-09-06 15:58:55 +01:00
Android.nir.gen.mk compiler: android: flesh out nir into separate makefile 2016-04-11 19:08:23 +01:00
Android.nir.mk android: add SPIRV_FILES to libmesa_nir 2016-11-11 07:59:29 +02:00
builtin_type_macros.h compiler: Add the rest of the subpassInput types 2016-11-22 13:02:29 -08:00
glsl_types.cpp compiler: Add the rest of the subpassInput types 2016-11-22 13:02:29 -08:00
glsl_types.h compiler: Add the rest of the subpassInput types 2016-11-22 13:02:29 -08:00
Makefile.am compiler: avoid warning about redefinition of PYTHON_GEN 2016-10-26 14:54:26 +01:00
Makefile.glsl.am util: import cache.c/h from glsl 2016-11-15 20:22:28 +01:00
Makefile.nir.am compiler: avoid warning about redefinition of PYTHON_GEN 2016-10-26 14:54:26 +01:00
Makefile.sources nir: add a pass to compact clip/cull distances. 2016-11-22 00:29:23 -08:00
nir_types.cpp nir: Add a C wrapper for glsl_type::is_array_of_arrays(). 2016-11-19 12:30:26 -08:00
nir_types.h nir: Add a C wrapper for glsl_type::is_array_of_arrays(). 2016-11-19 12:30:26 -08:00
SConscript glsl: Generate ir_expression_operation.h from Python 2016-08-30 16:28:00 -07:00
SConscript.glsl mesa: Remove prog_hash_table.c 2016-09-12 10:48:35 +10:00
SConscript.nir glsl: Generate ir_expression_operation.h from Python 2016-08-30 16:28:00 -07:00
shader_enums.c compiler: add printable values for cull distance varyings. 2016-10-04 10:15:23 +10:00
shader_enums.h mesa/compiler: move MAX_VARYING to shader_enums.h 2016-11-11 09:17:07 +11:00
shader_info.h compiler: Store the clip/cull distance array sizes in shader_info. 2016-11-19 12:30:25 -08:00