mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 08:00:12 +01:00
aco/assembler: add vintrp high_16bit support
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28435>
This commit is contained in:
parent
893ee883fe
commit
81a334a594
4 changed files with 7 additions and 6 deletions
|
|
@ -385,6 +385,7 @@ emit_vintrp_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instructio
|
|||
encoding = 0;
|
||||
encoding |= interp.attribute;
|
||||
encoding |= interp.component << 6;
|
||||
encoding |= interp.high_16bits << 8;
|
||||
encoding |= reg(ctx, instr->operands[0]) << 9;
|
||||
if (instr->opcode == aco_opcode::v_interp_p2_f16 ||
|
||||
instr->opcode == aco_opcode::v_interp_p2_legacy_f16 ||
|
||||
|
|
|
|||
|
|
@ -1403,7 +1403,8 @@ static_assert(sizeof(SDWA_instruction) == sizeof(VALU_instruction) + 4, "Unexpec
|
|||
struct VINTRP_instruction : public Instruction {
|
||||
uint8_t attribute;
|
||||
uint8_t component;
|
||||
uint16_t padding;
|
||||
bool high_16bits;
|
||||
uint8_t padding;
|
||||
};
|
||||
static_assert(sizeof(VINTRP_instruction) == sizeof(Instruction) + 4, "Unexpected padding");
|
||||
|
||||
|
|
|
|||
|
|
@ -170,11 +170,8 @@ struct InstrPred {
|
|||
case Format::VINTRP: {
|
||||
VINTRP_instruction& aI = a->vintrp();
|
||||
VINTRP_instruction& bI = b->vintrp();
|
||||
if (aI.attribute != bI.attribute)
|
||||
return false;
|
||||
if (aI.component != bI.component)
|
||||
return false;
|
||||
return true;
|
||||
return aI.attribute == bI.attribute && aI.component == bI.component &&
|
||||
aI.high_16bits == bI.high_16bits;
|
||||
}
|
||||
case Format::VINTERP_INREG: {
|
||||
VINTERP_inreg_instruction& aI = a->vinterp_inreg();
|
||||
|
|
|
|||
|
|
@ -427,6 +427,8 @@ print_instr_format_specific(enum amd_gfx_level gfx_level, const Instruction* ins
|
|||
case Format::VINTRP: {
|
||||
const VINTRP_instruction& vintrp = instr->vintrp();
|
||||
fprintf(output, " attr%d.%c", vintrp.attribute, "xyzw"[vintrp.component]);
|
||||
if (vintrp.high_16bits)
|
||||
fprintf(output, " high");
|
||||
break;
|
||||
}
|
||||
case Format::DS: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue