aco: allow literals on sub-dword p_parallelcopy
authorRhys Perry <pendingchaos02@gmail.com>
Thu, 15 Oct 2020 21:09:45 +0000 (22:09 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 27 Oct 2020 15:24:38 +0000 (15:24 +0000)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7216>

src/amd/compiler/aco_validate.cpp

index ef3b4c7..87a48d8 100644 (file)
@@ -332,7 +332,7 @@ bool validate_ir(Program* program)
                   if (!instr->definitions[i].regClass().is_subdword())
                      continue;
                   Operand op = instr->operands[i];
-                  check(!op.isLiteral(), "Sub-dword copies cannot take literals", instr.get());
+                  check(program->chip_class >= GFX9 || !op.isLiteral(), "Sub-dword copies cannot take literals", instr.get());
                   if (op.isConstant() || (op.hasRegClass() && op.regClass().type() == RegType::sgpr))
                      check(program->chip_class >= GFX9, "Sub-dword pseudo instructions can only take constants or SGPRs on GFX9+", instr.get());
                }