Commit 38bbfd3a authored by Pierre Moreau's avatar Pierre Moreau Committed by Marge Bot

clover/nir: Check the result of spirv_to_nir

Fixes: deb04adf ("clover: add support for passing kernels as nir to the driver")
Signed-off-by: Pierre Moreau's avatarPierre Moreau <>
Reviewed-by: Karol Herbst's avatarKarol Herbst <>
Part-of: <!4901>
parent abc4a828
Pipeline #143346 passed with stages
in 16 minutes and 38 seconds
......@@ -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,
&spirv_options, compiler_options);
if (!nir) {
r_log += "Translation from SPIR-V to NIR for kernel \"" + +
"\" failed.\n";
throw build_error();
nir->info.cs.local_size_variable = true;
nir_validate_shader(nir, "clover");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment