summaryrefslogtreecommitdiff
path: root/src/video_core/gpu.h
diff options
context:
space:
mode:
authorGravatar bunnei2019-02-18 20:58:32 -0500
committerGravatar bunnei2019-03-14 22:34:42 -0400
commit2eaf6c41a4686028c0abc84d1be6fd48a67cf49f (patch)
tree6ad0848c848aea68e637386cad5068e13c831b92 /src/video_core/gpu.h
parentMerge pull request #2233 from ReinUsesLisp/morton-cleanup (diff)
downloadyuzu-2eaf6c41a4686028c0abc84d1be6fd48a67cf49f.tar.gz
yuzu-2eaf6c41a4686028c0abc84d1be6fd48a67cf49f.tar.xz
yuzu-2eaf6c41a4686028c0abc84d1be6fd48a67cf49f.zip
gpu: Use host address for caching instead of guest address.
Diffstat (limited to 'src/video_core/gpu.h')
-rw-r--r--src/video_core/gpu.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index 56a203275..a14b95c30 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -11,6 +11,11 @@
11#include "video_core/dma_pusher.h" 11#include "video_core/dma_pusher.h"
12#include "video_core/memory_manager.h" 12#include "video_core/memory_manager.h"
13 13
14using CacheAddr = std::uintptr_t;
15inline CacheAddr ToCacheAddr(const void* host_ptr) {
16 return reinterpret_cast<CacheAddr>(host_ptr);
17}
18
14namespace Core { 19namespace Core {
15class System; 20class System;
16} 21}
@@ -209,13 +214,13 @@ public:
209 std::optional<std::reference_wrapper<const Tegra::FramebufferConfig>> framebuffer) = 0; 214 std::optional<std::reference_wrapper<const Tegra::FramebufferConfig>> framebuffer) = 0;
210 215
211 /// Notify rasterizer that any caches of the specified region should be flushed to Switch memory 216 /// Notify rasterizer that any caches of the specified region should be flushed to Switch memory
212 virtual void FlushRegion(VAddr addr, u64 size) = 0; 217 virtual void FlushRegion(CacheAddr addr, u64 size) = 0;
213 218
214 /// Notify rasterizer that any caches of the specified region should be invalidated 219 /// Notify rasterizer that any caches of the specified region should be invalidated
215 virtual void InvalidateRegion(VAddr addr, u64 size) = 0; 220 virtual void InvalidateRegion(CacheAddr addr, u64 size) = 0;
216 221
217 /// Notify rasterizer that any caches of the specified region should be flushed and invalidated 222 /// Notify rasterizer that any caches of the specified region should be flushed and invalidated
218 virtual void FlushAndInvalidateRegion(VAddr addr, u64 size) = 0; 223 virtual void FlushAndInvalidateRegion(CacheAddr addr, u64 size) = 0;
219 224
220private: 225private:
221 void ProcessBindMethod(const MethodCall& method_call); 226 void ProcessBindMethod(const MethodCall& method_call);