aco: rename Interp_instruction to VINTRP_instruction
These is clearer since GFX11 adds another interpolation format. 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/17333>
This commit is contained in:
@@ -298,7 +298,7 @@ emit_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instruction* inst
|
||||
break;
|
||||
}
|
||||
case Format::VINTRP: {
|
||||
Interp_instruction& interp = instr->vintrp();
|
||||
VINTRP_instruction& interp = instr->vintrp();
|
||||
uint32_t encoding = 0;
|
||||
|
||||
if (instr->opcode == aco_opcode::v_interp_p1ll_f16 ||
|
||||
|
@@ -530,7 +530,7 @@ formats = [("pseudo", [Format.PSEUDO], 'Pseudo_instruction', list(itertools.prod
|
||||
("vopc_sdwa", [Format.VOPC, Format.SDWA], 'SDWA_instruction', itertools.product([1, 2], [2])),
|
||||
("vop3", [Format.VOP3], 'VOP3_instruction', [(1, 3), (1, 2), (1, 1), (2, 2)]),
|
||||
("vop3p", [Format.VOP3P], 'VOP3P_instruction', [(1, 2), (1, 3)]),
|
||||
("vintrp", [Format.VINTRP], 'Interp_instruction', [(1, 2), (1, 3)]),
|
||||
("vintrp", [Format.VINTRP], 'VINTRP_instruction', [(1, 2), (1, 3)]),
|
||||
("vop1_dpp", [Format.VOP1, Format.DPP16], 'DPP16_instruction', [(1, 1)]),
|
||||
("vop2_dpp", [Format.VOP2, Format.DPP16], 'DPP16_instruction', itertools.product([1, 2], [2, 3])),
|
||||
("vopc_dpp", [Format.VOPC, Format.DPP16], 'DPP16_instruction', itertools.product([1, 2], [2])),
|
||||
|
@@ -1012,7 +1012,7 @@ struct VOP1_instruction;
|
||||
struct VOP2_instruction;
|
||||
struct VOPC_instruction;
|
||||
struct VOP3_instruction;
|
||||
struct Interp_instruction;
|
||||
struct VINTRP_instruction;
|
||||
struct DPP16_instruction;
|
||||
struct DPP8_instruction;
|
||||
struct SDWA_instruction;
|
||||
@@ -1289,15 +1289,15 @@ struct Instruction {
|
||||
return *(VOP3_instruction*)this;
|
||||
}
|
||||
constexpr bool isVOP3() const noexcept { return (uint16_t)format & (uint16_t)Format::VOP3; }
|
||||
Interp_instruction& vintrp() noexcept
|
||||
VINTRP_instruction& vintrp() noexcept
|
||||
{
|
||||
assert(isVINTRP());
|
||||
return *(Interp_instruction*)this;
|
||||
return *(VINTRP_instruction*)this;
|
||||
}
|
||||
const Interp_instruction& vintrp() const noexcept
|
||||
const VINTRP_instruction& vintrp() const noexcept
|
||||
{
|
||||
assert(isVINTRP());
|
||||
return *(Interp_instruction*)this;
|
||||
return *(VINTRP_instruction*)this;
|
||||
}
|
||||
constexpr bool isVINTRP() const noexcept { return (uint16_t)format & (uint16_t)Format::VINTRP; }
|
||||
DPP16_instruction& dpp16() noexcept
|
||||
@@ -1525,12 +1525,12 @@ struct SDWA_instruction : public Instruction {
|
||||
};
|
||||
static_assert(sizeof(SDWA_instruction) == sizeof(Instruction) + 8, "Unexpected padding");
|
||||
|
||||
struct Interp_instruction : public Instruction {
|
||||
struct VINTRP_instruction : public Instruction {
|
||||
uint8_t attribute;
|
||||
uint8_t component;
|
||||
uint16_t padding;
|
||||
};
|
||||
static_assert(sizeof(Interp_instruction) == sizeof(Instruction) + 4, "Unexpected padding");
|
||||
static_assert(sizeof(VINTRP_instruction) == sizeof(Instruction) + 4, "Unexpected padding");
|
||||
|
||||
/**
|
||||
* Local and Global Data Sharing instructions
|
||||
|
@@ -98,7 +98,7 @@ struct InstrHash {
|
||||
|
||||
switch (instr->format) {
|
||||
case Format::SMEM: return hash_murmur_32<SMEM_instruction>(instr);
|
||||
case Format::VINTRP: return hash_murmur_32<Interp_instruction>(instr);
|
||||
case Format::VINTRP: return hash_murmur_32<VINTRP_instruction>(instr);
|
||||
case Format::DS: return hash_murmur_32<DS_instruction>(instr);
|
||||
case Format::SOPP: return hash_murmur_32<SOPP_instruction>(instr);
|
||||
case Format::SOPK: return hash_murmur_32<SOPK_instruction>(instr);
|
||||
@@ -217,8 +217,8 @@ struct InstrPred {
|
||||
aS.disable_wqm == bS.disable_wqm && aS.prevent_overflow == bS.prevent_overflow;
|
||||
}
|
||||
case Format::VINTRP: {
|
||||
Interp_instruction& aI = a->vintrp();
|
||||
Interp_instruction& bI = b->vintrp();
|
||||
VINTRP_instruction& aI = a->vintrp();
|
||||
VINTRP_instruction& bI = b->vintrp();
|
||||
if (aI.attribute != bI.attribute)
|
||||
return false;
|
||||
if (aI.component != bI.component)
|
||||
|
@@ -348,7 +348,7 @@ print_instr_format_specific(const Instruction* instr, FILE* output)
|
||||
break;
|
||||
}
|
||||
case Format::VINTRP: {
|
||||
const Interp_instruction& vintrp = instr->vintrp();
|
||||
const VINTRP_instruction& vintrp = instr->vintrp();
|
||||
fprintf(output, " attr%d.%c", vintrp.attribute, "xyzw"[vintrp.component]);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user