mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-28 08:13:05 +00:00
Implement vertex swizzle
This commit is contained in:
1 parent
18479daabd
commit
f4b52cea2b
10 files changed
+282
-195
No files matched your search
@@ -1103,9 +1103,8 @@ bool DecodeVopcSdwa(uint32_t pc, std::span<const uint32_t> code, uint32_t word_i
|
||||
!DecodeScalarSource(vsrc1 + (fields.s1 == 0u ? 256u : 0u), pc, &inst->src1, error)) {
|
||||
return false;
|
||||
}
|
||||
if (IsVopcCompareExec(inst->opcode)) {
|
||||
inst->dst.kind = OperandKind::ExecLo;
|
||||
} else if (fields.sd == 0u) {
|
||||
inst->compare_exec = IsVopcCompareExec(inst->opcode);
|
||||
if (fields.sd == 0u) {
|
||||
inst->dst.kind = OperandKind::VccLo;
|
||||
} else if (!DecodeScalarDestination(fields.sdst, pc, &inst->dst, error)) {
|
||||
return false;
|
||||
@@ -1142,7 +1141,8 @@ bool DecodeVopcDpp(uint32_t pc, std::span<const uint32_t> code, uint32_t word_in
|
||||
!DecodeVectorGpr(vsrc1, &inst->src1, error)) {
|
||||
return false;
|
||||
}
|
||||
inst->dst.kind = IsVopcCompareExec(inst->opcode) ? OperandKind::ExecLo : OperandKind::VccLo;
|
||||
inst->dst.kind = OperandKind::VccLo;
|
||||
inst->compare_exec = IsVopcCompareExec(inst->opcode);
|
||||
inst->src0.negate = ((modifier >> 20u) & 0x1u) != 0u;
|
||||
inst->src0.absolute = ((modifier >> 21u) & 0x1u) != 0u;
|
||||
inst->src0.dpp = true;
|
||||
@@ -1532,7 +1532,8 @@ bool DecodeVopc(uint32_t pc, std::span<const uint32_t> code, uint32_t word_index
|
||||
inst->family = Family::VOPC;
|
||||
inst->opcode_id = opcode;
|
||||
inst->opcode = Lookup(VOPC_OPS, static_cast<uint32_t>(std::size(VOPC_OPS)), opcode);
|
||||
inst->dst.kind = IsVopcCompareExec(inst->opcode) ? OperandKind::ExecLo : OperandKind::VccLo;
|
||||
inst->dst.kind = OperandKind::VccLo;
|
||||
inst->compare_exec = IsVopcCompareExec(inst->opcode);
|
||||
SetRawWords(inst, code, word_index, 1);
|
||||
|
||||
switch (src0) {
|
||||
@@ -1618,9 +1619,8 @@ bool DecodeVop3(uint32_t pc, std::span<const uint32_t> code, uint32_t word_index
|
||||
return true;
|
||||
}
|
||||
bool dst_ok = true;
|
||||
if (compare_exec) {
|
||||
inst->dst.kind = OperandKind::ExecLo;
|
||||
} else if (scalar_dst) {
|
||||
inst->compare_exec = compare_exec;
|
||||
if (scalar_dst) {
|
||||
// VOP3A uses VDST for VOPC and the scalar-destination lane-read opcodes.
|
||||
dst_ok = DecodeScalarDestination(vdst, pc, &inst->dst, error);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user