mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 23:41:26 +12:00
rsx/fp: src3 workaround
This commit is contained in:
parent
f7d767d0e8
commit
ef822d785e
2 changed files with 12 additions and 1 deletions
|
@ -159,6 +159,11 @@ std::string FragmentProgramDecompiler::AddTex()
|
||||||
return m_parr.AddParam(PF_PARAM_UNIFORM, sampler, std::string("tex") + std::to_string(dst.tex_num));
|
return m_parr.AddParam(PF_PARAM_UNIFORM, sampler, std::string("tex") + std::to_string(dst.tex_num));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string FragmentProgramDecompiler::AddType3()
|
||||||
|
{
|
||||||
|
return m_parr.AddParam(PF_PARAM_NONE, getFloatTypeName(4), "src3", getFloatTypeName(4) + "(1., 1., 1., 1.)");
|
||||||
|
}
|
||||||
|
|
||||||
//Both of these were tested with a trace SoulCalibur IV title screen
|
//Both of these were tested with a trace SoulCalibur IV title screen
|
||||||
//Failure to catch causes infinite values since theres alot of rcp(0)
|
//Failure to catch causes infinite values since theres alot of rcp(0)
|
||||||
std::string FragmentProgramDecompiler::NotZero(const std::string& code)
|
std::string FragmentProgramDecompiler::NotZero(const std::string& code)
|
||||||
|
@ -358,7 +363,10 @@ template<typename T> std::string FragmentProgramDecompiler::GetSRC(T src)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RSX_FP_REGISTER_TYPE_UNKNOWN: // ??? Used by a few games, what is it?
|
case RSX_FP_REGISTER_TYPE_UNKNOWN: // ??? Used by a few games, what is it?
|
||||||
LOG_ERROR(RSX, "Src type 3 used, please report this to a developer.");
|
LOG_ERROR(RSX, "Src type 3 used, opcode=0x%X, dst=0x%X s0=0x%X s1=0x%X s2=0x%X",
|
||||||
|
dst.opcode, dst.HEX, src0.HEX, src1.HEX, src2.HEX);
|
||||||
|
|
||||||
|
ret += AddType3();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -46,6 +46,9 @@ class FragmentProgramDecompiler
|
||||||
std::string AddTex();
|
std::string AddTex();
|
||||||
std::string Format(const std::string& code);
|
std::string Format(const std::string& code);
|
||||||
|
|
||||||
|
//Technically a temporary workaround until we know what type3 is
|
||||||
|
std::string AddType3();
|
||||||
|
|
||||||
//Prevent division by zero by catching denormals
|
//Prevent division by zero by catching denormals
|
||||||
//Simpler variant where input and output are expected to be positive
|
//Simpler variant where input and output are expected to be positive
|
||||||
std::string NotZero(const std::string& code);
|
std::string NotZero(const std::string& code);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue