Introduce a shader tracer to allow inspection of input/output values for each processed instruction.

This commit is contained in:
Tony Wasserka 2015-07-12 01:57:59 +02:00
parent 2e3601f415
commit 33ba604fd9
10 changed files with 601 additions and 97 deletions

View file

@ -111,7 +111,7 @@ void GeometryDumper::Dump() {
}
void DumpShader(const Regs::ShaderConfig& config, const State::ShaderSetup& setup, const Regs::VSOutputAttributes* output_attributes)
void DumpShader(const std::string& filename, const Regs::ShaderConfig& config, const State::ShaderSetup& setup, const Regs::VSOutputAttributes* output_attributes)
{
struct StuffToWrite {
u8* pointer;
@ -294,7 +294,6 @@ void DumpShader(const Regs::ShaderConfig& config, const State::ShaderSetup& setu
// Write data to file
static int dump_index = 0;
std::string filename = std::string("shader_dump") + std::to_string(++dump_index) + std::string(".shbin");
std::ofstream file(filename, std::ios_base::out | std::ios_base::binary);
for (auto& chunk : writing_queue) {

View file

@ -181,7 +181,8 @@ private:
std::vector<Face> faces;
};
void DumpShader(const Regs::ShaderConfig& config, const State::ShaderSetup& setup, const Regs::VSOutputAttributes* output_attributes);
void DumpShader(const std::string& filename, const Regs::ShaderConfig& config,
const State::ShaderSetup& setup, const Regs::VSOutputAttributes* output_attributes);
// Utility class to log Pica commands.