rusticl/kernel: Fix creation from programs not built for every device
authorKarol Herbst <kherbst@redhat.com>
Thu, 12 Oct 2023 22:06:51 +0000 (00:06 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 13 Oct 2023 08:51:30 +0000 (08:51 +0000)
commit65b663cc9d49b8cb95ee6622e10e77cb9abd11c8
treea9af944e091b8f610a4c11e93ee6edc64ba8ec8f
parent734bbe33cf9ef3309a097401710e2161b24dc7fe
rusticl/kernel: Fix creation from programs not built for every device

OpenCL does not require that a kernel is created for every device. So we
shouldn't assume there is a build for every device.

API validation around launching kernels already takes this possibility
into account.

I did not verify if the commit below is actually the culprit and whether
this bug existed before that, but a fix for older code also would have to
look differently anyway.

Fixes: 323dcbb4b52 ("rusticl: Move NirKernelBuild to ProgramDevBuild")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9968
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25696>
src/gallium/frontends/rusticl/core/kernel.rs