mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-16 23:17:29 +00:00
rsx: Vertex Decompiler, fix sca register assignment
This commit is contained in:
parent
4d5f98017f
commit
5d7c454e52
@ -51,21 +51,22 @@ std::string CgBinaryDisasm::GetScaMaskDisasm()
|
||||
std::string CgBinaryDisasm::GetDSTDisasm(bool isSca)
|
||||
{
|
||||
std::string ret;
|
||||
std::string mask = GetMaskDisasm(isSca);
|
||||
|
||||
switch (isSca ? 0x1f : d3.dst)
|
||||
switch ((isSca && d3.sca_dst_tmp != 0x3f) ? 0x1f : d3.dst)
|
||||
{
|
||||
case 0x1f:
|
||||
ret += isSca ? fmt::format("R%d", d3.sca_dst_tmp) + GetScaMaskDisasm() : fmt::format("R%d", d0.dst_tmp) + GetVecMaskDisasm();
|
||||
ret += (isSca ? fmt::format("R%d", d3.sca_dst_tmp) : fmt::format("R%d", d0.dst_tmp)) + mask;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (d3.dst > 15)
|
||||
LOG_ERROR(RSX, "dst index out of range: %u", d3.dst);
|
||||
|
||||
ret += fmt::format("o[%d]", d3.dst) + GetVecMaskDisasm();
|
||||
ret += fmt::format("o[%d]", d3.dst) + mask;
|
||||
// Vertex Program supports double destinations, notably in MOV
|
||||
if (d0.dst_tmp != 0x3f)
|
||||
ret += fmt::format(" R%d", d0.dst_tmp) + GetVecMaskDisasm();
|
||||
ret += fmt::format(" R%d", d0.dst_tmp) + mask;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ std::string VertexProgramDecompiler::GetDST(bool isSca)
|
||||
|
||||
std::string mask = GetMask(isSca);
|
||||
|
||||
switch (isSca ? 0x1f : d3.dst)
|
||||
switch ((isSca && d3.sca_dst_tmp != 0x3f) ? 0x1f : d3.dst)
|
||||
{
|
||||
case 0x1f:
|
||||
ret += m_parr.AddParam(PF_PARAM_NONE, getFloatTypeName(4), std::string("tmp") + std::to_string(isSca ? d3.sca_dst_tmp : d0.dst_tmp)) + mask;
|
||||
|
Loading…
Reference in New Issue
Block a user