ir3: set local_size for shaders of MESA_SHADER_KERNEL type

ir3_compile_shader_nir() should set local_size[] and local_size_variable
fields not only for compute shaders, but for the OpenCL kernels too.

v2: use gl_shader_stage_is_compute() instead of explicit comparison with
    MESA_SHADER_[COMPUTE,KERNEL].

Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14863>
This commit is contained in:
Andrey Konovalov 2022-02-03 19:30:17 +00:00 committed by Marge Bot
parent 44c52e94e9
commit ed2f496ce4

View file

@ -4618,7 +4618,7 @@ ir3_compile_shader_nir(struct ir3_compiler *compiler,
ir = so->ir = ctx->ir;
if (so->type == MESA_SHADER_COMPUTE) {
if (gl_shader_stage_is_compute(so->type)) {
so->local_size[0] = ctx->s->info.workgroup_size[0];
so->local_size[1] = ctx->s->info.workgroup_size[1];
so->local_size[2] = ctx->s->info.workgroup_size[2];