summaryrefslogtreecommitdiff
path: root/src/amd/compiler/aco_validate.cpp
diff options
context:
space:
mode:
authorGeorg Lehmann <dadschoorse@gmail.com>2023-04-23 14:55:17 +0200
committerMarge Bot <emma+marge@anholt.net>2023-05-12 13:31:16 +0000
commit151bcc1e8bbc9b012616ae418a59c215b0e6e807 (patch)
tree0017a7c83b0adc578592961bf6510f50308aebaa /src/amd/compiler/aco_validate.cpp
parent41b0eafc4b0b4ed1083ab00e5fee2a6e0fdfd900 (diff)
downloadmesa-151bcc1e8bbc9b012616ae418a59c215b0e6e807.tar.gz
aco: use VOP3+DPP
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22698>
Diffstat (limited to 'src/amd/compiler/aco_validate.cpp')
-rw-r--r--src/amd/compiler/aco_validate.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/amd/compiler/aco_validate.cpp b/src/amd/compiler/aco_validate.cpp
index d4073296ae9..b95e60be0b3 100644
--- a/src/amd/compiler/aco_validate.cpp
+++ b/src/amd/compiler/aco_validate.cpp
@@ -142,12 +142,21 @@ validate_ir(Program* program)
"Wrong base format for instruction", instr.get());
/* check VOP3 modifiers */
- if (instr->isVOP3() && instr->format != Format::VOP3) {
+ if (instr->isVOP3() && withoutDPP(instr->format) != Format::VOP3) {
check(base_format == Format::VOP2 || base_format == Format::VOP1 ||
base_format == Format::VOPC || base_format == Format::VINTRP,
"Format cannot have VOP3/VOP3B applied", instr.get());
}
+ if (instr->isDPP()) {
+ check(base_format == Format::VOP2 || base_format == Format::VOP1 ||
+ base_format == Format::VOPC || base_format == Format::VOP3 ||
+ base_format == Format::VOP3P,
+ "Format cannot have DPP applied", instr.get());
+ check((!instr->isVOP3() && !instr->isVOP3P()) || program->gfx_level >= GFX11,
+ "VOP3+DPP is GFX11+ only", instr.get());
+ }
+
/* check SDWA */
if (instr->isSDWA()) {
check(base_format == Format::VOP2 || base_format == Format::VOP1 ||