nir/libclc: handle null callee name when lowering

fixes a crash in the CTS spirv_new get_program_il test

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12230>
This commit is contained in:
Dave Airlie 2021-08-06 06:02:48 +10:00 committed by Marge Bot
parent cc8a122907
commit cd265a9868
1 changed files with 4 additions and 0 deletions

View File

@ -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;