Mesa (master): aco: validate that SMEM operands can use fixed registers
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Aug 24 11:20:44 UTC 2020
Module: Mesa
Branch: master
Commit: a6146aa5980f972a11ee054a49bba9dc79b8bbd4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a6146aa5980f972a11ee054a49bba9dc79b8bbd4
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Wed Aug 19 09:41:42 2020 +0200
aco: validate that SMEM operands can use fixed registers
To fix a validation error when loading the scalar tma buffer
descriptor because it's not a temp but a fixed reg (tma_lo/tma_hi).
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6384>
---
src/amd/compiler/aco_validate.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/amd/compiler/aco_validate.cpp b/src/amd/compiler/aco_validate.cpp
index 0d74458519c..fce0e1a1189 100644
--- a/src/amd/compiler/aco_validate.cpp
+++ b/src/amd/compiler/aco_validate.cpp
@@ -378,7 +378,8 @@ bool validate_ir(Program* program)
}
case Format::SMEM: {
if (instr->operands.size() >= 1)
- check(instr->operands[0].isTemp() && instr->operands[0].regClass().type() == RegType::sgpr, "SMEM operands must be sgpr", instr.get());
+ check((instr->operands[0].isFixed() && !instr->operands[0].isConstant()) ||
+ (instr->operands[0].isTemp() && instr->operands[0].regClass().type() == RegType::sgpr), "SMEM operands must be sgpr", instr.get());
if (instr->operands.size() >= 2)
check(instr->operands[1].isConstant() || (instr->operands[1].isTemp() && instr->operands[1].regClass().type() == RegType::sgpr),
"SMEM offset must be constant or sgpr", instr.get());
More information about the mesa-commit
mailing list