diff options
author | Rhys Perry <[email protected]> | 2019-09-12 19:55:36 +0100 |
---|---|---|
committer | Timur Kristóf <[email protected]> | 2019-10-10 09:57:53 +0200 |
commit | 818bdab796772da77a363f0a96e8895736591aac (patch) | |
tree | 7582b87d35845c4adbc42660c436cc7e23b3624e | |
parent | 7cf1dcf22db7a0b23a02f5ed42f917ba19d0013f (diff) |
aco: Allow literals on VOP3 instructions.
Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Daniel Schürmann <[email protected]>
Reviewed-By: Timur Kristóf <[email protected]>
-rw-r--r-- | src/amd/compiler/aco_assembler.cpp | 2 | ||||
-rw-r--r-- | src/amd/compiler/aco_validate.cpp | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/amd/compiler/aco_assembler.cpp b/src/amd/compiler/aco_assembler.cpp index 73432a790ef..272be088589 100644 --- a/src/amd/compiler/aco_assembler.cpp +++ b/src/amd/compiler/aco_assembler.cpp @@ -502,7 +502,6 @@ void emit_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instruction* for (unsigned i = 0; i < 3; i++) encoding |= vop3->neg[i] << (29+i); out.push_back(encoding); - return; } else if (instr->isDPP()){ /* first emit the instruction without the DPP operand */ @@ -525,6 +524,7 @@ void emit_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instruction* } else { unreachable("unimplemented instruction format"); } + break; } /* append literal dword */ diff --git a/src/amd/compiler/aco_validate.cpp b/src/amd/compiler/aco_validate.cpp index 9919d0a585d..dbfce6314c8 100644 --- a/src/amd/compiler/aco_validate.cpp +++ b/src/amd/compiler/aco_validate.cpp @@ -104,7 +104,9 @@ void validate(Program* program, FILE * output) unsigned num_literals = 0; for (unsigned i = 0; i < instr->operands.size(); i++) { - if (instr->operands[i].isLiteral()) { + if (instr->operands[i].isLiteral() && instr->isVOP3() && program->chip_class >= GFX10) { + num_literals++; + } else if (instr->operands[i].isLiteral()) { check(instr->format == Format::SOP1 || instr->format == Format::SOP2 || instr->format == Format::SOPC || |