Mesa (master): spirv: Only run repair_ssa if structured
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Sep 30 17:01:59 UTC 2020
Module: Mesa
Branch: master
Commit: fa3c38ceb36eaa681f2ab0be7b07aefbeefc617d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fa3c38ceb36eaa681f2ab0be7b07aefbeefc617d
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Thu Sep 17 09:11:19 2020 -0500
spirv: Only run repair_ssa if structured
We shouldn't need it if we're unstructured and the pass assumes
structure so attempting to run it will assert-fail.
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6750>
---
src/compiler/spirv/vtn_cfg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/spirv/vtn_cfg.c b/src/compiler/spirv/vtn_cfg.c
index fa7ab5eda28..4914fc645ce 100644
--- a/src/compiler/spirv/vtn_cfg.c
+++ b/src/compiler/spirv/vtn_cfg.c
@@ -1368,7 +1368,7 @@ vtn_function_emit(struct vtn_builder *b, struct vtn_function *func,
* but instructions in the continue may use SSA defs in the loop body.
* Therefore, we need to repair SSA to insert the needed phi nodes.
*/
- if (b->has_loop_continue || b->has_kill)
+ if (b->func->impl->structured && (b->has_loop_continue || b->has_kill))
nir_repair_ssa_impl(func->impl);
func->emitted = true;
More information about the mesa-commit
mailing list