From cd265a9868e5694cf162873a33afcac2acad093e Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 6 Aug 2021 06:02:48 +1000 Subject: [PATCH] nir/libclc: handle null callee name when lowering fixes a crash in the CTS spirv_new get_program_il test Reviewed-by: Jesse Natalie Part-of: --- src/compiler/spirv/nir_lower_libclc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/spirv/nir_lower_libclc.c b/src/compiler/spirv/nir_lower_libclc.c index ebaa54c1ad9..b3e121f3aad 100644 --- a/src/compiler/spirv/nir_lower_libclc.c +++ b/src/compiler/spirv/nir_lower_libclc.c @@ -38,6 +38,10 @@ lower_clc_call_instr(nir_instr *instr, nir_builder *b, { nir_call_instr *call = nir_instr_as_call(instr); nir_function *func = NULL; + + if (!call->callee->name) + return false; + nir_foreach_function(function, clc_shader) { if (strcmp(function->name, call->callee->name) == 0) { func = function;