diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-12-25 07:32:16 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-01-19 03:12:30 +0100 |
commit | 0a2536a0df1f4aea406f2132d3edda0430acc9d1 (patch) | |
tree | c0ad53890581c9c7e180c5ccb3b66e3c63e3ba64 /src/video_core/shader_cache.cpp | |
parent | SMMU: Implement backing CPU page protect/unprotect (diff) | |
download | yuzu-0a2536a0df1f4aea406f2132d3edda0430acc9d1.tar yuzu-0a2536a0df1f4aea406f2132d3edda0430acc9d1.tar.gz yuzu-0a2536a0df1f4aea406f2132d3edda0430acc9d1.tar.bz2 yuzu-0a2536a0df1f4aea406f2132d3edda0430acc9d1.tar.lz yuzu-0a2536a0df1f4aea406f2132d3edda0430acc9d1.tar.xz yuzu-0a2536a0df1f4aea406f2132d3edda0430acc9d1.tar.zst yuzu-0a2536a0df1f4aea406f2132d3edda0430acc9d1.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/shader_cache.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/shader_cache.cpp b/src/video_core/shader_cache.cpp index e81cd031b..86fd62428 100644 --- a/src/video_core/shader_cache.cpp +++ b/src/video_core/shader_cache.cpp @@ -12,6 +12,7 @@ #include "video_core/dirty_flags.h" #include "video_core/engines/kepler_compute.h" #include "video_core/engines/maxwell_3d.h" +#include "video_core/host1x/gpu_device_memory_manager.h" #include "video_core/memory_manager.h" #include "video_core/shader_cache.h" #include "video_core/shader_environment.h" @@ -34,7 +35,7 @@ void ShaderCache::SyncGuestHost() { RemovePendingShaders(); } -ShaderCache::ShaderCache(VideoCore::RasterizerInterface& rasterizer_) : rasterizer{rasterizer_} {} +ShaderCache::ShaderCache(Tegra::MaxwellDeviceMemoryManager& device_memory_) : device_memory{device_memory_} {} bool ShaderCache::RefreshStages(std::array<u64, 6>& unique_hashes) { auto& dirty{maxwell3d->dirty.flags}; @@ -132,7 +133,7 @@ void ShaderCache::Register(std::unique_ptr<ShaderInfo> data, VAddr addr, size_t storage.push_back(std::move(data)); - rasterizer.UpdatePagesCachedCount(addr, size, 1); + device_memory.UpdatePagesCachedCount(addr, size, 1); } void ShaderCache::InvalidatePagesInRegion(VAddr addr, size_t size) { @@ -209,7 +210,7 @@ void ShaderCache::UnmarkMemory(Entry* entry) { const VAddr addr = entry->addr_start; const size_t size = entry->addr_end - addr; - rasterizer.UpdatePagesCachedCount(addr, size, -1); + device_memory.UpdatePagesCachedCount(addr, size, -1); } void ShaderCache::RemoveShadersFromStorage(std::span<ShaderInfo*> removed_shaders) { |