mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 05:48:07 +02:00
aco: fix p_extract_vector validation
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4507>
This commit is contained in:
parent
41ac44e1b3
commit
e18711cda3
1 changed files with 1 additions and 1 deletions
|
|
@ -261,7 +261,7 @@ void validate(Program* program, FILE * output)
|
|||
}
|
||||
} else if (instr->opcode == aco_opcode::p_extract_vector) {
|
||||
check((instr->operands[0].isTemp()) && instr->operands[1].isConstant(), "Wrong Operand types", instr.get());
|
||||
check(instr->operands[1].constantValue() < instr->operands[0].size(), "Index out of range", instr.get());
|
||||
check((instr->operands[1].constantValue() + 1) * instr->definitions[0].bytes() <= instr->operands[0].bytes(), "Index out of range", instr.get());
|
||||
check(instr->definitions[0].getTemp().type() == RegType::vgpr || instr->operands[0].regClass().type() == RegType::sgpr,
|
||||
"Cannot extract SGPR value from VGPR vector", instr.get());
|
||||
} else if (instr->opcode == aco_opcode::p_parallelcopy) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue