mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 22:20:14 +01:00
clover/nir: Check the result of spirv_to_nir
Fixes: deb04adf2a ("clover: add support for passing kernels as nir to the driver")
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4901>
This commit is contained in:
parent
abc4a82857
commit
38bbfd3a57
1 changed files with 5 additions and 0 deletions
|
|
@ -90,6 +90,11 @@ module clover::nir::spirv_to_nir(const module &mod, const device &dev,
|
||||||
nir_shader *nir = spirv_to_nir(data, num_words, nullptr, 0,
|
nir_shader *nir = spirv_to_nir(data, num_words, nullptr, 0,
|
||||||
MESA_SHADER_KERNEL, name,
|
MESA_SHADER_KERNEL, name,
|
||||||
&spirv_options, compiler_options);
|
&spirv_options, compiler_options);
|
||||||
|
if (!nir) {
|
||||||
|
r_log += "Translation from SPIR-V to NIR for kernel \"" + sym.name +
|
||||||
|
"\" failed.\n";
|
||||||
|
throw build_error();
|
||||||
|
}
|
||||||
|
|
||||||
nir->info.cs.local_size_variable = true;
|
nir->info.cs.local_size_variable = true;
|
||||||
nir_validate_shader(nir, "clover");
|
nir_validate_shader(nir, "clover");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue