Module: Mesa Branch: master Commit: 836c1c6fb10e308d353aa2ff50f239545c2daa27 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=836c1c6fb10e308d353aa2ff50f239545c2daa27
Author: Alyssa Rosenzweig <[email protected]> Date: Wed Feb 3 14:11:44 2021 -0500 pan/bi: Fix NULL deref with empty shader Fixes regression in dEQP-GLES31.functional.compute.basic.empty Fixes: d0902aa2d4d ("pan/bi: Pass through wait_{6, 7} flags") Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8848> --- src/panfrost/bifrost/bifrost_compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index 4177949076d..f54e1224ebe 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -2406,7 +2406,7 @@ bifrost_compile_shader_nir(void *mem_ctx, nir_shader *nir, pan_block *first_block = list_first_entry(&ctx->blocks, pan_block, link); bi_clause *first_clause = bi_next_clause(ctx, first_block, NULL); - unsigned first_deps = first_clause->dependencies; + unsigned first_deps = first_clause ? first_clause->dependencies : 0; program->wait_6 = (first_deps & (1 << 6)); program->wait_7 = (first_deps & (1 << 7)); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
