diff options
author | Tony Wasserka <NeoBrainX@gmail.com> | 2014-08-14 19:21:55 +0200 |
---|---|---|
committer | Tony Wasserka <NeoBrainX@gmail.com> | 2014-08-25 22:03:18 +0200 |
commit | 26ade98411c1d76540695f15378ff7f6b5388b1a (patch) | |
tree | db1b6eba40bacdc049d4c3c668ee875b209c73ac /src/video_core/debug_utils/debug_utils.h | |
parent | Pica/CommandProcessor: Implement parameter masking. (diff) | |
download | yuzu-26ade98411c1d76540695f15378ff7f6b5388b1a.tar yuzu-26ade98411c1d76540695f15378ff7f6b5388b1a.tar.gz yuzu-26ade98411c1d76540695f15378ff7f6b5388b1a.tar.bz2 yuzu-26ade98411c1d76540695f15378ff7f6b5388b1a.tar.lz yuzu-26ade98411c1d76540695f15378ff7f6b5388b1a.tar.xz yuzu-26ade98411c1d76540695f15378ff7f6b5388b1a.tar.zst yuzu-26ade98411c1d76540695f15378ff7f6b5388b1a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/debug_utils/debug_utils.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/video_core/debug_utils/debug_utils.h b/src/video_core/debug_utils/debug_utils.h index bd7a0a89b..023500066 100644 --- a/src/video_core/debug_utils/debug_utils.h +++ b/src/video_core/debug_utils/debug_utils.h @@ -5,6 +5,7 @@ #pragma once #include <array> +#include <memory> #include <vector> #include "video_core/pica.h" @@ -38,6 +39,26 @@ private: void DumpShader(const u32* binary_data, u32 binary_size, const u32* swizzle_data, u32 swizzle_size, u32 main_offset, const Regs::VSOutputAttributes* output_attributes); + +// Utility class to log Pica commands. +struct PicaTrace { + struct Write : public std::pair<u32,u32> { + Write(u32 id, u32 value) : std::pair<u32,u32>(id, value) {} + + u32& Id() { return first; } + const u32& Id() const { return first; } + + u32& Value() { return second; } + const u32& Value() const { return second; } + }; + std::vector<Write> writes; +}; + +void StartPicaTracing(); +bool IsPicaTracing(); +void OnPicaRegWrite(u32 id, u32 value); +std::unique_ptr<PicaTrace> FinishPicaTracing(); + } // namespace } // namespace |