diff options
author | Henrik Rydgard <hrydgard@gmail.com> | 2016-04-29 08:50:21 +0200 |
---|---|---|
committer | Henrik Rydgard <hrydgard@gmail.com> | 2016-04-29 08:50:21 +0200 |
commit | a86d7cacc1f56c6e8ff5f046ba7e2477e92d873f (patch) | |
tree | 29f718ef564717329deb8d63e98ca64659ba1aa5 /src/video_core/vertex_loader.h | |
parent | Debugger fix (diff) | |
download | yuzu-a86d7cacc1f56c6e8ff5f046ba7e2477e92d873f.tar yuzu-a86d7cacc1f56c6e8ff5f046ba7e2477e92d873f.tar.gz yuzu-a86d7cacc1f56c6e8ff5f046ba7e2477e92d873f.tar.bz2 yuzu-a86d7cacc1f56c6e8ff5f046ba7e2477e92d873f.tar.lz yuzu-a86d7cacc1f56c6e8ff5f046ba7e2477e92d873f.tar.xz yuzu-a86d7cacc1f56c6e8ff5f046ba7e2477e92d873f.tar.zst yuzu-a86d7cacc1f56c6e8ff5f046ba7e2477e92d873f.zip |
Diffstat (limited to 'src/video_core/vertex_loader.h')
-rw-r--r-- | src/video_core/vertex_loader.h | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/src/video_core/vertex_loader.h b/src/video_core/vertex_loader.h index 7267ea9c6..ff42d1596 100644 --- a/src/video_core/vertex_loader.h +++ b/src/video_core/vertex_loader.h @@ -5,40 +5,14 @@ #include "video_core/pica.h" #include "video_core/shader/shader.h" +#include "video_core/debug_utils/debug_utils.h" namespace Pica { -class MemoryAccesses { - /// Combine overlapping and close ranges - void SimplifyRanges() { - for (auto it = ranges.begin(); it != ranges.end(); ++it) { - // NOTE: We add 32 to the range end address to make sure "close" ranges are combined, too - auto it2 = std::next(it); - while (it2 != ranges.end() && it->first + it->second + 32 >= it2->first) { - it->second = std::max(it->second, it2->first + it2->second - it->first); - it2 = ranges.erase(it2); - } - } - } - -public: - /// Record a particular memory access in the list - void AddAccess(u32 paddr, u32 size) { - // Create new range or extend existing one - ranges[paddr] = std::max(ranges[paddr], size); - - // Simplify ranges... - SimplifyRanges(); - } - - /// Map of accessed ranges (mapping start address to range size) - std::map<u32, u32> ranges; -}; - class VertexLoader { public: void Setup(const Pica::Regs& regs); - void LoadVertex(u32 base_address, int index, int vertex, Shader::InputVertex& input, MemoryAccesses& memory_accesses); + void LoadVertex(u32 base_address, int index, int vertex, Shader::InputVertex& input, DebugUtils::MemoryAccessTracker& memory_accesses); int GetNumTotalAttributes() const { return num_total_attributes; } |