mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
r300/compiler: Ignore alpha dest register when replicating the result
When the result of the alpha instruction is being replicated to the RGB
destination register, we do not need to use alpha's destination register.
This fixes an invalid "Too many hardware temporaries used" error in
the case where a transcendent operation writes to a temporary register
greater than max_temp_regs.
NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 23f577dbd4)
This commit is contained in:
parent
80ff25b628
commit
5551faf649
1 changed files with 4 additions and 1 deletions
|
|
@ -278,9 +278,12 @@ static void set_pair_instruction(struct r300_fragment_program_compiler *c,
|
|||
pair->RGB.DestIndex = inst->DstReg.Index;
|
||||
pair->RGB.WriteMask |= inst->DstReg.WriteMask & RC_MASK_XYZ;
|
||||
}
|
||||
|
||||
if (needalpha) {
|
||||
pair->Alpha.DestIndex = inst->DstReg.Index;
|
||||
pair->Alpha.WriteMask |= GET_BIT(inst->DstReg.WriteMask, 3);
|
||||
if (pair->Alpha.WriteMask) {
|
||||
pair->Alpha.DestIndex = inst->DstReg.Index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue