Signed-off-by: Andres Gomez <ago...@igalia.com> --- src/compiler/glsl/ast_to_hir.cpp | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-)
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index b90ad97b1de..d7a2b9ddc12 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -2826,8 +2826,8 @@ apply_explicit_binding(struct _mesa_glsl_parse_state *state, { if (!qual->flags.q.uniform && !qual->flags.q.buffer) { _mesa_glsl_error(loc, state, - "the \"binding\" qualifier only applies to uniforms and " - "shader storage buffer objects"); + "the \"binding\" qualifier only applies to uniforms " + "and shader storage buffer objects"); return; } @@ -2855,9 +2855,9 @@ apply_explicit_binding(struct _mesa_glsl_parse_state *state, */ if (qual->flags.q.uniform && max_index >= ctx->Const.MaxUniformBufferBindings) { - _mesa_glsl_error(loc, state, "layout(binding = %u) for %d UBOs exceeds " - "the maximum number of UBO binding points (%d)", - qual_binding, elements, + _mesa_glsl_error(loc, state, "layout(binding = %u) for %d UBOs " + "exceeds the maximum number of UBO binding points " + "(%d)", qual_binding, elements, ctx->Const.MaxUniformBufferBindings); return; } @@ -2873,9 +2873,9 @@ apply_explicit_binding(struct _mesa_glsl_parse_state *state, */ if (qual->flags.q.buffer && max_index >= ctx->Const.MaxShaderStorageBufferBindings) { - _mesa_glsl_error(loc, state, "layout(binding = %u) for %d SSBOs exceeds " - "the maximum number of SSBO binding points (%d)", - qual_binding, elements, + _mesa_glsl_error(loc, state, "layout(binding = %u) for %d SSBOs " + "exceeds the maximum number of SSBO binding points " + "(%d)", qual_binding, elements, ctx->Const.MaxShaderStorageBufferBindings); return; } @@ -2900,7 +2900,7 @@ apply_explicit_binding(struct _mesa_glsl_parse_state *state, assert(ctx->Const.MaxAtomicBufferBindings <= MAX_COMBINED_ATOMIC_BUFFERS); if (qual_binding >= ctx->Const.MaxAtomicBufferBindings) { _mesa_glsl_error(loc, state, "layout(binding = %d) exceeds the " - " maximum number of atomic counter buffer bindings" + "maximum number of atomic counter buffer bindings " "(%u)", qual_binding, ctx->Const.MaxAtomicBufferBindings); @@ -2912,7 +2912,7 @@ apply_explicit_binding(struct _mesa_glsl_parse_state *state, assert(ctx->Const.MaxImageUnits <= MAX_IMAGE_UNITS); if (max_index >= ctx->Const.MaxImageUnits) { _mesa_glsl_error(loc, state, "Image binding %d exceeds the " - " maximum number of image units (%d)", max_index, + "maximum number of image units (%d)", max_index, ctx->Const.MaxImageUnits); return; } @@ -2920,7 +2920,8 @@ apply_explicit_binding(struct _mesa_glsl_parse_state *state, } else { _mesa_glsl_error(loc, state, "the \"binding\" qualifier only applies to uniform " - "blocks, opaque variables, or arrays thereof"); + "blocks, storage blocks, opaque variables, or arrays " + "thereof"); return; } @@ -7451,7 +7452,7 @@ ast_interface_block::hir(exec_list *instructions, return NULL; } else { if (expl_align == 0 || expl_align & (expl_align - 1)) { - _mesa_glsl_error(&loc, state, "align layout qualifier in not a " + _mesa_glsl_error(&loc, state, "align layout qualifier is not a " "power of 2."); return NULL; } @@ -7514,7 +7515,8 @@ ast_interface_block::hir(exec_list *instructions, _mesa_shader_stage_to_string(state->stage)); } if (this->instance_name == NULL || - strcmp(this->instance_name, "gl_in") != 0 || this->array_specifier == NULL || + strcmp(this->instance_name, "gl_in") != 0 || + this->array_specifier == NULL || !this->array_specifier->is_single_dimension()) { _mesa_glsl_error(&loc, state, "gl_PerVertex input must be redeclared as " @@ -7536,7 +7538,8 @@ ast_interface_block::hir(exec_list *instructions, } if (state->stage == MESA_SHADER_TESS_CTRL) { if (this->instance_name == NULL || - strcmp(this->instance_name, "gl_out") != 0 || this->array_specifier == NULL) { + strcmp(this->instance_name, "gl_out") != 0 || + this->array_specifier == NULL) { _mesa_glsl_error(&loc, state, "gl_PerVertex output must be redeclared as " "gl_out[]"); @@ -7657,12 +7660,14 @@ ast_interface_block::hir(exec_list *instructions, !this->layout.flags.q.patch && this->array_specifier == NULL && var_mode == ir_var_shader_in) { - _mesa_glsl_error(&loc, state, "per-vertex tessellation shader inputs must be arrays"); + _mesa_glsl_error(&loc, state, "per-vertex tessellation shader inputs " + "must be arrays"); } else if (state->stage == MESA_SHADER_TESS_CTRL && !this->layout.flags.q.patch && this->array_specifier == NULL && var_mode == ir_var_shader_out) { - _mesa_glsl_error(&loc, state, "tessellation control shader outputs must be arrays"); + _mesa_glsl_error(&loc, state, "tessellation control shader outputs " + "must be arrays"); } -- 2.11.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev