mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-04 16:50:31 +01:00
pan/bi: Pull BLEND precolouring out of per-dest loop
Indentation fail. This should happen once per instruction, not once per destination. In theory, this is a minor performance win; in practice, it's simply less wrong. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reported-by: Icecream95 <ixn@disroot.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14575>
This commit is contained in:
parent
1e5bb54f59
commit
2bdfa4800d
1 changed files with 12 additions and 13 deletions
|
|
@ -312,23 +312,22 @@ bi_allocate_registers(bi_context *ctx, bool *success, bool full_regs)
|
|||
bi_foreach_dest(ins, d) {
|
||||
unsigned dest = bi_get_node(ins->dest[d]);
|
||||
|
||||
/* Blend shaders expect the src colour to be in r0-r3 */
|
||||
if (ins->op == BI_OPCODE_BLEND &&
|
||||
!ctx->inputs->is_blend) {
|
||||
unsigned node = bi_get_node(ins->src[0]);
|
||||
assert(node < node_count);
|
||||
l->solutions[node] = 0;
|
||||
|
||||
/* Dual source blend input in r4-r7 */
|
||||
node = bi_get_node(ins->src[4]);
|
||||
if (node < node_count)
|
||||
l->solutions[node] = 4;
|
||||
}
|
||||
|
||||
if (dest < node_count)
|
||||
l->affinity[dest] = default_affinity;
|
||||
}
|
||||
|
||||
/* Blend shaders expect the src colour to be in r0-r3 */
|
||||
if (ins->op == BI_OPCODE_BLEND &&
|
||||
!ctx->inputs->is_blend) {
|
||||
unsigned node = bi_get_node(ins->src[0]);
|
||||
assert(node < node_count);
|
||||
l->solutions[node] = 0;
|
||||
|
||||
/* Dual source blend input in r4-r7 */
|
||||
node = bi_get_node(ins->src[4]);
|
||||
if (node < node_count)
|
||||
l->solutions[node] = 4;
|
||||
}
|
||||
}
|
||||
|
||||
bi_compute_interference(ctx, l, full_regs);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue