mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-12 22:14:58 +00:00
rsx/vp: Warnings cleanup
This commit is contained in:
parent
0ee9d7b46d
commit
94656ac1e3
@ -288,7 +288,7 @@ std::string VertexProgramDecompiler::GetOptionalBranchCond()
|
||||
return "if (" + cond + ")";
|
||||
}
|
||||
|
||||
void VertexProgramDecompiler::AddCodeCond(const std::string& dst, const std::string& src)
|
||||
void VertexProgramDecompiler::AddCodeCond(const std::string& lhs, const std::string& rhs)
|
||||
{
|
||||
enum
|
||||
{
|
||||
@ -299,21 +299,21 @@ void VertexProgramDecompiler::AddCodeCond(const std::string& dst, const std::str
|
||||
|
||||
if (!d0.cond_test_enable || d0.cond == (lt | gt | eq))
|
||||
{
|
||||
AddCode(dst + " = " + src + ";");
|
||||
AddCode(lhs + " = " + rhs + ";");
|
||||
return;
|
||||
}
|
||||
|
||||
if (d0.cond == 0)
|
||||
{
|
||||
AddCode("//" + dst + " = " + src + ";");
|
||||
AddCode("//" + lhs + " = " + rhs + ";");
|
||||
return;
|
||||
}
|
||||
|
||||
// NOTE: dst = _select(dst, src, cond) is equivalent to dst = cond? src : dst;
|
||||
const auto dst_var = ShaderVariable(dst);
|
||||
// NOTE: x = _select(x, y, cond) is equivalent to x = cond? y : x;
|
||||
const auto dst_var = ShaderVariable(lhs);
|
||||
const auto raw_cond = dst_var.add_mask(GetRawCond());
|
||||
const auto cond = dst_var.match_size(raw_cond);
|
||||
AddCode(dst + " = _select(" + dst + ", " + src + ", " + cond + ");");
|
||||
AddCode(lhs + " = _select(" + lhs + ", " + rhs + ", " + cond + ");");
|
||||
}
|
||||
|
||||
std::string VertexProgramDecompiler::AddAddrReg()
|
||||
@ -714,16 +714,16 @@ std::string VertexProgramDecompiler::Decompile()
|
||||
|
||||
break;
|
||||
}
|
||||
case RSX_SCA_OPCODE_CLB: break;
|
||||
case RSX_SCA_OPCODE_CLB:
|
||||
// works same as BRB
|
||||
AddCode("//CLB");
|
||||
do_function_call("$ifbcond");
|
||||
break;
|
||||
case RSX_SCA_OPCODE_PSH: break;
|
||||
case RSX_SCA_OPCODE_PSH:
|
||||
// works differently (PSH o[1].x A0;)
|
||||
LOG_ERROR(RSX, "Unimplemented sca_opcode PSH");
|
||||
break;
|
||||
case RSX_SCA_OPCODE_POP: break;
|
||||
case RSX_SCA_OPCODE_POP:
|
||||
// works differently (POP o[1].x;)
|
||||
LOG_ERROR(RSX, "Unimplemented sca_opcode POP");
|
||||
break;
|
||||
|
@ -81,7 +81,7 @@ struct VertexProgramDecompiler
|
||||
u32 GetAddr();
|
||||
std::string Format(const std::string& code);
|
||||
|
||||
void AddCodeCond(const std::string& dst, const std::string& src);
|
||||
void AddCodeCond(const std::string& lhs, const std::string& rhs);
|
||||
void AddCode(const std::string& code);
|
||||
void SetDST(bool is_sca, std::string value);
|
||||
void SetDSTVec(const std::string& code);
|
||||
|
Loading…
x
Reference in New Issue
Block a user