void VKFragmentProgram::Decompile(const RSXFragmentProgram& prog) { u32 size; std::string source; VKFragmentDecompilerThread decompiler(source, parr, prog, size, *this); const auto pdev = vk::get_current_renderer(); if (!g_cfg.video.disable_native_float16) { decompiler.device_props.has_native_half_support = pdev->get_shader_types_support().allow_float16; } decompiler.device_props.emulate_depth_compare = !pdev->get_formats_support().d24_unorm_s8; decompiler.Task(); shader.create(::glsl::program_domain::glsl_fragment_program, source); for (const ParamType& PT : decompiler.m_parr.params[PF_PARAM_UNIFORM]) { for (const ParamItem& PI : PT.items) { if (PT.type == "sampler1D" || PT.type == "sampler2D" || PT.type == "sampler3D" || PT.type == "samplerCube") continue; size_t offset = atoi(PI.name.c_str() + 2); FragmentConstantOffsetCache.push_back(offset); } } }
TEST_F(DecompilerTests, IsCreatedSuccessfullyWithCustomConnectionManager) { auto connectionManager = std::make_shared<ConnectionManagerMock>(); Decompiler decompiler( Settings(), connectionManager ); }
void VKVertexProgram::Decompile(const RSXVertexProgram& prog) { std::string source; VKVertexDecompilerThread decompiler(prog, source, parr, *this); decompiler.Task(); shader.create(::glsl::program_domain::glsl_vertex_program, source); }
void GSParser::mtdeParser() { u32 size = read<u32>() - 2; std::string methodName = readStringFromTable(); std::cout << "Method " << methodName << " of size " << size << "\n"; u8 *data = readByteArray(size); GSDecompiler decompiler(data, size, stringTable); //std::cout << decompiler.decompile() << "\n"; decompiler.decompile(); }
void GLFragmentProgram::Decompile(RSXFragmentProgram& prog) { GLFragmentDecompilerThread decompiler(shader, parr, prog.addr, prog.size, prog.ctrl); decompiler.Task(); for (const ParamType& PT : decompiler.m_parr.params[PF_PARAM_UNIFORM]) { for (const ParamItem PI : PT.items) { if (PT.type == "sampler2D") continue; size_t offset = atoi(PI.name.c_str() + 2); FragmentConstantOffsetCache.push_back(offset); } } }
void VKFragmentProgram::Decompile(const RSXFragmentProgram& prog) { u32 size; VKFragmentDecompilerThread decompiler(shader, parr, prog, size, *this); decompiler.Task(); for (const ParamType& PT : decompiler.m_parr.params[PF_PARAM_UNIFORM]) { for (const ParamItem& PI : PT.items) { if (PT.type == "sampler1D" || PT.type == "sampler2D" || PT.type == "sampler3D" || PT.type == "samplerCube") continue; size_t offset = atoi(PI.name.c_str() + 2); FragmentConstantOffsetCache.push_back(offset); } } }
void GLShaderProgram::Decompile(RSXShaderProgram& prog) { GLFragmentDecompilerThread decompiler(m_shader, m_parr, prog.addr, prog.size, prog.ctrl); decompiler.Task(); }
void VKVertexProgram::Decompile(const RSXVertexProgram& prog) { VKVertexDecompilerThread decompiler(prog, shader, parr, *this); decompiler.Task(); }
void GLVertexProgram::Decompile(const RSXVertexProgram& prog) { GLVertexDecompilerThread decompiler(prog, shader, parr); decompiler.Task(); }