When checking the compute shader local size against the maximum per-dimension and overall work-group size, return rather than breaking out of the loop over all dimensions.
Oversized local sizes are an error anyway, and the early bail out eliminates the warning about qual_local_size potentially being used unitialized further down the function block. Signed-off-by: Giuseppe Bilotta <giuseppe.bilo...@gmail.com> --- src/compiler/glsl/ast_to_hir.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index aeb223db9e..2a83cfad25 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -8144,7 +8144,7 @@ ast_cs_input_layout::hir(exec_list *instructions, "local_size_%c exceeds MAX_COMPUTE_WORK_GROUP_SIZE" " (%d)", 'x' + i, state->ctx->Const.MaxComputeWorkGroupSize[i]); - break; + return NULL; } total_invocations *= qual_local_size[i]; if (total_invocations > @@ -8153,7 +8153,7 @@ ast_cs_input_layout::hir(exec_list *instructions, "product of local_sizes exceeds " "MAX_COMPUTE_WORK_GROUP_INVOCATIONS (%d)", state->ctx->Const.MaxComputeWorkGroupInvocations); - break; + return NULL; } } -- 2.13.0.rc0.207.gb442654931 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev