ir3/sched: Handle branch condition in split_pred()
Before this, if there was a block with multiple things writing p0.x, it was a tossup whether the right one would be used as the branch condition. Found by inspection. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6752>
This commit is contained in:
@@ -944,6 +944,16 @@ split_pred(struct ir3_sched_ctx *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
if (ctx->block->condition == ctx->pred) {
|
||||
if (!new_pred) {
|
||||
new_pred = split_instr(ctx, ctx->pred);
|
||||
/* original pred is scheduled, but new one isn't: */
|
||||
new_pred->flags &= ~IR3_INSTR_MARK;
|
||||
}
|
||||
ctx->block->condition = new_pred;
|
||||
d("new branch condition");
|
||||
}
|
||||
|
||||
/* all remaining predicated remapped to new pred: */
|
||||
ctx->pred = NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user