diff options
| author | 2015-07-12 01:57:59 +0200 | |
|---|---|---|
| committer | 2015-08-16 14:12:11 +0200 | |
| commit | 33ba604fd903d9511a414a54b91ebe818df338ef (patch) | |
| tree | 578ee82515c8e819e6468af4ef5552ee028e472b /src/video_core/debug_utils | |
| parent | Pica/DebugUtils: Include uniform information into shader dumps. (diff) | |
| download | yuzu-33ba604fd903d9511a414a54b91ebe818df338ef.tar.gz yuzu-33ba604fd903d9511a414a54b91ebe818df338ef.tar.xz yuzu-33ba604fd903d9511a414a54b91ebe818df338ef.zip | |
Introduce a shader tracer to allow inspection of input/output values for each processed instruction.
Diffstat (limited to 'src/video_core/debug_utils')
| -rw-r--r-- | src/video_core/debug_utils/debug_utils.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/debug_utils/debug_utils.h | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp index a79d90ef1..ac071790a 100644 --- a/src/video_core/debug_utils/debug_utils.cpp +++ b/src/video_core/debug_utils/debug_utils.cpp | |||
| @@ -111,7 +111,7 @@ void GeometryDumper::Dump() { | |||
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | 113 | ||
| 114 | void DumpShader(const Regs::ShaderConfig& config, const State::ShaderSetup& setup, const Regs::VSOutputAttributes* output_attributes) | 114 | void DumpShader(const std::string& filename, const Regs::ShaderConfig& config, const State::ShaderSetup& setup, const Regs::VSOutputAttributes* output_attributes) |
| 115 | { | 115 | { |
| 116 | struct StuffToWrite { | 116 | struct StuffToWrite { |
| 117 | u8* pointer; | 117 | u8* pointer; |
| @@ -294,7 +294,6 @@ void DumpShader(const Regs::ShaderConfig& config, const State::ShaderSetup& setu | |||
| 294 | 294 | ||
| 295 | // Write data to file | 295 | // Write data to file |
| 296 | static int dump_index = 0; | 296 | static int dump_index = 0; |
| 297 | std::string filename = std::string("shader_dump") + std::to_string(++dump_index) + std::string(".shbin"); | ||
| 298 | std::ofstream file(filename, std::ios_base::out | std::ios_base::binary); | 297 | std::ofstream file(filename, std::ios_base::out | std::ios_base::binary); |
| 299 | 298 | ||
| 300 | for (auto& chunk : writing_queue) { | 299 | for (auto& chunk : writing_queue) { |
diff --git a/src/video_core/debug_utils/debug_utils.h b/src/video_core/debug_utils/debug_utils.h index 1450e5bf3..0b30d7ffa 100644 --- a/src/video_core/debug_utils/debug_utils.h +++ b/src/video_core/debug_utils/debug_utils.h | |||
| @@ -181,7 +181,8 @@ private: | |||
| 181 | std::vector<Face> faces; | 181 | std::vector<Face> faces; |
| 182 | }; | 182 | }; |
| 183 | 183 | ||
| 184 | void DumpShader(const Regs::ShaderConfig& config, const State::ShaderSetup& setup, const Regs::VSOutputAttributes* output_attributes); | 184 | void DumpShader(const std::string& filename, const Regs::ShaderConfig& config, |
| 185 | const State::ShaderSetup& setup, const Regs::VSOutputAttributes* output_attributes); | ||
| 185 | 186 | ||
| 186 | 187 | ||
| 187 | // Utility class to log Pica commands. | 188 | // Utility class to log Pica commands. |