Mesa (main): aco: fix vadd32() when b is neither a constant nor temporary
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Oct 13 05:33:38 UTC 2021
Module: Mesa
Branch: main
Commit: 1988a784300f616ec182c2db6619f5280406d72b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1988a784300f616ec182c2db6619f5280406d72b
Author: Rhys Perry <pendingchaos02 at gmail.com>
Date: Wed Aug 18 13:29:59 2021 +0100
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 at gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof at gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11717>
---
src/amd/compiler/aco_builder_h.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/amd/compiler/aco_builder_h.py b/src/amd/compiler/aco_builder_h.py
index 39b77fdc6c2..9ebf633eef0 100644
--- a/src/amd/compiler/aco_builder_h.py
+++ b/src/amd/compiler/aco_builder_h.py
@@ -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);
More information about the mesa-commit
mailing list