pan/bi: Reserve r0-r3 in blend shaders
Blend shaders are passed the source color through r0-r3. Let's avoid allocating those. The is definitely not the right solution but is good enough for now. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
This commit is contained in:
parent
3432d0a3e5
commit
0d40460757
|
@ -69,8 +69,15 @@ bi_allocate_registers(bi_context *ctx, bool *success)
|
||||||
struct lcra_state *l =
|
struct lcra_state *l =
|
||||||
lcra_alloc_equations(node_count, 1);
|
lcra_alloc_equations(node_count, 1);
|
||||||
|
|
||||||
l->class_start[BI_REG_CLASS_WORK] = 0;
|
if (ctx->is_blend) {
|
||||||
l->class_size[BI_REG_CLASS_WORK] = 64 * 4; /* R0 - R63, all 32-bit */
|
/* R0-R3 are reserved for the blend input */
|
||||||
|
l->class_start[BI_REG_CLASS_WORK] = 4 * 4;
|
||||||
|
l->class_size[BI_REG_CLASS_WORK] = 64 * 4;
|
||||||
|
} else {
|
||||||
|
/* R0 - R63, all 32-bit */
|
||||||
|
l->class_start[BI_REG_CLASS_WORK] = 0;
|
||||||
|
l->class_size[BI_REG_CLASS_WORK] = 64 * 4;
|
||||||
|
}
|
||||||
|
|
||||||
bi_foreach_instr_global(ctx, ins) {
|
bi_foreach_instr_global(ctx, ins) {
|
||||||
unsigned dest = ins->dest;
|
unsigned dest = ins->dest;
|
||||||
|
|
Loading…
Reference in New Issue