ir3: Always create barycentrics in the input block

Otherwise, when there are uses in multiple blocks the collect may not
dominate some of the uses.

This is a bugfix, but before it would've mattered only in weird
scenarios with interpolateAt*. When we start moving prefetch textures
into the block before the preamble it will start to matter more, because
it will need to read the barycentrics from a different block than the
bary.f instructions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13142>
This commit is contained in:
Connor Abbott 2021-09-29 13:52:34 +02:00 committed by Marge Bot
parent 38a84723f1
commit 548377bcf3
1 changed files with 2 additions and 2 deletions

View File

@ -1504,9 +1504,9 @@ get_barycentric(struct ir3_context *ctx, enum ir3_bary bary)
struct ir3_instruction *ij;
ij = create_sysval_input(ctx, sysval_base + bary, 0x3);
ir3_split_dest(ctx->block, xy, ij, 0, 2);
ir3_split_dest(ctx->in_block, xy, ij, 0, 2);
ctx->ij[bary] = ir3_create_collect(ctx->block, xy, 2);
ctx->ij[bary] = ir3_create_collect(ctx->in_block, xy, 2);
}
return ctx->ij[bary];