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@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6750>
This commit is contained in:

committed by
Marge Bot

parent
719c68016a
commit
fa3c38ceb3
@@ -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.
|
* 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.
|
* 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);
|
nir_repair_ssa_impl(func->impl);
|
||||||
|
|
||||||
func->emitted = true;
|
func->emitted = true;
|
||||||
|
Reference in New Issue
Block a user