Skip to content

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.

This change fixes the following OpenCL CTS test error:

$ LD_LIBRARY_PATH=/home/linaro/mesa-work/install.upstreaming/lib/aarch64-linux-gnu/ OCL_ICD_VENDORS=/home/linaro/mesa-work/install.upstreaming/etc/OpenCL/vendors build/test_conformance/basic/test_basic vload_local
 Initializing random seed to 0.
Requesting Default device based on command line for platform index 0 and device index 0
Compute Device Name = FD630, Compute Device Vendor = Qualcomm, Compute Device Version = OpenCL 1.1 Mesa 22.1.0-devel (git-553a574810), CL C Version = OpenCL C 1.1
Supports single precision denormals: NO
sizeof( void*) = 8  (host)
sizeof( void*) = 8  (device)
vload_local...
Testing with buffer size of 8192.
Testing char2...
test_basic: ../mesa/src/freedreno/ir3/ir3_ra.c:2248: calc_limit_pressure_for_cs_with_barrier: Assertion `vec4_regs_per_thread > 0' failed.
Aborted
Edited by andrey-konovalov

Merge request reports