Mesa (main): pan/bi: Preserve flow control for non-psiz variant
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 1 16:29:30 UTC 2022
Module: Mesa
Branch: main
Commit: 4627cd99deec432692a372f0a0288f9058ec3fe0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4627cd99deec432692a372f0a0288f9058ec3fe0
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Fri May 20 15:46:54 2022 -0400
pan/bi: Preserve flow control for non-psiz variant
Otherwise we will get INSTR_INVALID_ENC faults when deleting the final STORE.end
instruction, after we rework our flow control code.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16804>
---
src/panfrost/bifrost/bifrost_compile.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 337e3e56454..42cc6870c5c 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -5215,7 +5215,13 @@ bi_compile_variant(nir_shader *nir,
assert(write != NULL);
- /* Remove it, TODO: DCE */
+ /* NOP it out, preserving its flow control. TODO: maybe DCE */
+ if (write->flow) {
+ bi_builder b = bi_init_builder(ctx, bi_before_instr(write));
+ bi_instr *nop = bi_nop(&b);
+ nop->flow = write->flow;
+ }
+
bi_remove_instruction(write);
info->vs.no_psiz_offset = binary->size;
More information about the mesa-commit
mailing list