On Friday, February 10, 2017 5:25:27 AM PST Jose Maria Casanova Crespo wrote:
> 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" <[email protected]>
> Signed-off-by: Jose Maria Casanova Crespo <[email protected]>
> ---
> src/compiler/glsl/ast_to_hir.cpp | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)Thanks! I missed this patch on the mailing list and independently arrived at the same solution today, so we'll call that a: Reviewed-by: Kenneth Graunke <[email protected]> and pushed: To ssh://git.freedesktop.org/git/mesa/mesa 0514b0bdc91..5bc222ebafd master -> master
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
