mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
aco: fix vadd32() when b is neither a constant nor temporary
This will be useful for compiling vertex shader prologs, where we basically use ACO as an assembler. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11717>
This commit is contained in:
parent
50c0451424
commit
1988a78430
1 changed files with 1 additions and 1 deletions
|
|
@ -432,7 +432,7 @@ public:
|
|||
}
|
||||
|
||||
Result vadd32(Definition dst, Op a, Op b, bool carry_out=false, Op carry_in=Op(Operand(s2)), bool post_ra=false) {
|
||||
if (!b.op.isTemp() || b.op.regClass().type() != RegType::vgpr)
|
||||
if (b.op.isConstant() || b.op.regClass().type() != RegType::vgpr)
|
||||
std::swap(a, b);
|
||||
if (!post_ra && (!b.op.hasRegClass() || b.op.regClass().type() == RegType::sgpr))
|
||||
b = copy(def(v1), b);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue