mesa/src/compiler
Jose Maria Casanova Crespo 97b2fb4d3e glsl: non-last member unsized array on SSBO must fail compilation on GLSL ES 3.1
From GLSL ES 3.10 spec, section 4.1.9 "Arrays":

"If an array is declared as the last member of a shader storage block
 and the size is not specified at compile-time, it is sized at run-time.
 In all other cases, arrays are sized only at compile-time."

In desktop GLSL it is allowed to have unsized-arrays that are
not last, as long as we can determine that they are implicitly
sized, which is detected at link-time.

With this patch Mesa reports a compilation error as glslang does with
the following shader:

buffer SSBO { vec4 data[]; vec4 moreData;};
void main (void)
{
}

Fixes:
dEQP-GLES31.functional.debug.negative_coverage.log.shader.compile_compute_shader
dEQP-GLES31.functional.debug.negative_coverage.callbacks.shader.compile_compute_shader
dEQP-GLES31.functional.debug.negative_coverage.get_error.shader.compile_compute_shader

Cc: "17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 5bc222ebaf)
2017-03-14 00:13:15 +00:00
..
glsl glsl: non-last member unsized array on SSBO must fail compilation on GLSL ES 3.1 2017-03-14 00:13:15 +00:00
nir nir/search: Use the correct bit size for integer comparisons 2017-02-08 15:53:20 +00:00
spirv spirv: don't assert with location decorations on non i/o variables 2017-03-13 18:43:09 +00: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 compiler: android: flesh out nir into separate makefile 2016-04-11 19:08:23 +01:00
builtin_type_macros.h glsl: add subpass image type (v2) 2016-09-16 15:16:31 +10:00
glsl_types.cpp glsl: add subpass image type (v2) 2016-09-16 15:16:31 +10:00
glsl_types.h glsl: add subpass image type (v2) 2016-09-16 15:16:31 +10:00
Makefile.am compiler: Move glsl_to_nir to libglsl.la 2016-05-26 14:13:38 -07:00
Makefile.glsl.am glsl: Add tracking for elements of an array-of-arrays that have been accessed 2017-02-16 17:46:14 +00:00
Makefile.nir.am nir/spirv: Bring back the spirv2nir helper binary 2016-09-21 05:38:26 -07:00
Makefile.sources glsl: Use simpler visitor to determine which UBO and SSBO blocks are used 2017-02-16 17:46:14 +00:00
nir_types.cpp nir: Delete open coded type printing. 2016-10-06 02:13:36 -07:00
nir_types.h nir: Delete open coded type printing. 2016-10-06 02:13:36 -07: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 glsl: add gl_LocalGroupSizeARB as a system value 2016-10-07 00:18:57 +02:00