Module: Mesa Branch: main Commit: 7656251294cd66b9d0386dea43e4e225de47048a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7656251294cd66b9d0386dea43e4e225de47048a
Author: Qiang Yu <[email protected]> Date: Tue Dec 5 12:49:32 2023 +0800 aco: fix set_wqm segfault when ps prolog ps prolog does not have nir shader. Fixes: 3b10547e67d ("aco: enable helper lanes if shader->info.fs.require_full_quads") Reviewed-by: Georg Lehmann <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26512> --- src/amd/compiler/aco_instruction_selection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 82bc354ec1b..ae5a869568b 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -174,7 +174,8 @@ set_wqm(isel_context* ctx, bool enable_helpers = false) if (ctx->program->stage == fragment_fs) { ctx->wqm_block_idx = ctx->block->index; ctx->wqm_instruction_idx = ctx->block->instructions.size(); - enable_helpers |= ctx->shader->info.fs.require_full_quads; + if (ctx->shader) + enable_helpers |= ctx->shader->info.fs.require_full_quads; ctx->program->needs_wqm |= enable_helpers; } }
