Mesa (main): nir/libclc: handle null callee name when lowering
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Aug 6 01:02:50 UTC 2021
Module: Mesa
Branch: main
Commit: cd265a9868e5694cf162873a33afcac2acad093e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cd265a9868e5694cf162873a33afcac2acad093e
Author: Dave Airlie <airlied at redhat.com>
Date: Fri Aug 6 06:02:48 2021 +1000
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 at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12230>
---
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;
More information about the mesa-commit
mailing list