[rsx/wip] Dump raw shader, fix typo

This commit is contained in:
kd-11 2017-01-08 12:03:33 +03:00 committed by Zangetsu38
parent fe7cba5eac
commit aa2aa70875
2 changed files with 6 additions and 1 deletions

View file

@ -670,8 +670,9 @@ std::string VertexProgramDecompiler::Decompile()
case RSX_SCA_OPCODE_COS: SetDSTSca("cos($s)"); break;
case RSX_SCA_OPCODE_BRB:
// works differently (BRB o[1].x !b0, L0;)
{
LOG_ERROR(RSX, "Unimplemented sca_opcode BRB d0=0x%X, d1=0x%X, d2=0x%X, d3=0x%X", d0.HEX, d1.HEX, d2.HEX, d3.HEX);
u32 jump_position = find_jump_lvl(GetAddr());
AddCode("$if (!$bconst) //BRB"); //If only the cond flags are set, we can just use $ifcond
@ -683,6 +684,7 @@ std::string VertexProgramDecompiler::Decompile()
AddCode("}");
break;
}
case RSX_SCA_OPCODE_CLB: break;
// works same as BRB
LOG_ERROR(RSX, "Unimplemented sca_opcode CLB");

View file

@ -382,6 +382,9 @@ GLVertexProgram::~GLVertexProgram()
void GLVertexProgram::Decompile(const RSXVertexProgram& prog)
{
fs::create_path(fs::get_config_dir() + "/shaderlog");
fs::file(fs::get_config_dir() + "shaderlog/VertexProgram.raw", fs::rewrite).write(prog.data.data(), prog.data.size() * sizeof(u32));
GLVertexDecompilerThread decompiler(prog, shader, parr);
decompiler.Task();
}