summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2018-03-23 15:01:45 -0400
committerGravatar bunnei2018-03-23 15:01:45 -0400
commit11047d7fd511fd9ae6130da7bc824fefa6fb64c1 (patch)
treef8609ebc8e4caaa5457066b4e6c22321e86af8be /src
parentrenderer_opengl: Add framebuffer_transform_flags member variable. (diff)
downloadyuzu-11047d7fd511fd9ae6130da7bc824fefa6fb64c1.tar.gz
yuzu-11047d7fd511fd9ae6130da7bc824fefa6fb64c1.tar.xz
yuzu-11047d7fd511fd9ae6130da7bc824fefa6fb64c1.zip
rasterizer: Flush and invalidate regions should be 64-bit.
Diffstat (limited to 'src')
-rw-r--r--src/core/memory.cpp4
-rw-r--r--src/core/memory.h2
-rw-r--r--src/video_core/rasterizer_interface.h6
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp6
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.h6
5 files changed, 12 insertions, 12 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp
index 8a83de904..d8aab7090 100644
--- a/src/core/memory.cpp
+++ b/src/core/memory.cpp
@@ -296,7 +296,7 @@ u8* GetPhysicalPointer(PAddr address) {
296 return target_pointer; 296 return target_pointer;
297} 297}
298 298
299void RasterizerFlushVirtualRegion(VAddr start, u32 size, FlushMode mode) { 299void RasterizerFlushVirtualRegion(VAddr start, u64 size, FlushMode mode) {
300 // Since pages are unmapped on shutdown after video core is shutdown, the renderer may be 300 // Since pages are unmapped on shutdown after video core is shutdown, the renderer may be
301 // null here 301 // null here
302 if (VideoCore::g_renderer == nullptr) { 302 if (VideoCore::g_renderer == nullptr) {
@@ -313,7 +313,7 @@ void RasterizerFlushVirtualRegion(VAddr start, u32 size, FlushMode mode) {
313 313
314 VAddr overlap_start = std::max(start, region_start); 314 VAddr overlap_start = std::max(start, region_start);
315 VAddr overlap_end = std::min(end, region_end); 315 VAddr overlap_end = std::min(end, region_end);
316 u32 overlap_size = overlap_end - overlap_start; 316 u64 overlap_size = overlap_end - overlap_start;
317 317
318 auto* rasterizer = VideoCore::g_renderer->Rasterizer(); 318 auto* rasterizer = VideoCore::g_renderer->Rasterizer();
319 switch (mode) { 319 switch (mode) {
diff --git a/src/core/memory.h b/src/core/memory.h
index 1c7232115..3e2c3f23d 100644
--- a/src/core/memory.h
+++ b/src/core/memory.h
@@ -269,6 +269,6 @@ enum class FlushMode {
269 * Flushes and invalidates any externally cached rasterizer resources touching the given virtual 269 * Flushes and invalidates any externally cached rasterizer resources touching the given virtual
270 * address region. 270 * address region.
271 */ 271 */
272void RasterizerFlushVirtualRegion(VAddr start, u32 size, FlushMode mode); 272void RasterizerFlushVirtualRegion(VAddr start, u64 size, FlushMode mode);
273 273
274} // namespace Memory 274} // namespace Memory
diff --git a/src/video_core/rasterizer_interface.h b/src/video_core/rasterizer_interface.h
index 6514d7ded..a493e1d60 100644
--- a/src/video_core/rasterizer_interface.h
+++ b/src/video_core/rasterizer_interface.h
@@ -25,14 +25,14 @@ public:
25 virtual void FlushAll() = 0; 25 virtual void FlushAll() = 0;
26 26
27 /// Notify rasterizer that any caches of the specified region should be flushed to 3DS memory 27 /// Notify rasterizer that any caches of the specified region should be flushed to 3DS memory
28 virtual void FlushRegion(VAddr addr, u32 size) = 0; 28 virtual void FlushRegion(VAddr addr, u64 size) = 0;
29 29
30 /// Notify rasterizer that any caches of the specified region should be invalidated 30 /// Notify rasterizer that any caches of the specified region should be invalidated
31 virtual void InvalidateRegion(VAddr addr, u32 size) = 0; 31 virtual void InvalidateRegion(VAddr addr, u64 size) = 0;
32 32
33 /// Notify rasterizer that any caches of the specified region should be flushed to 3DS memory 33 /// Notify rasterizer that any caches of the specified region should be flushed to 3DS memory
34 /// and invalidated 34 /// and invalidated
35 virtual void FlushAndInvalidateRegion(VAddr addr, u32 size) = 0; 35 virtual void FlushAndInvalidateRegion(VAddr addr, u64 size) = 0;
36 36
37 /// Attempt to use a faster method to perform a display transfer with is_texture_copy = 0 37 /// Attempt to use a faster method to perform a display transfer with is_texture_copy = 0
38 virtual bool AccelerateDisplayTransfer(const void* config) { 38 virtual bool AccelerateDisplayTransfer(const void* config) {
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index b51614c25..09828e48d 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -194,17 +194,17 @@ void RasterizerOpenGL::FlushAll() {
194 res_cache.FlushAll(); 194 res_cache.FlushAll();
195} 195}
196 196
197void RasterizerOpenGL::FlushRegion(VAddr addr, u32 size) { 197void RasterizerOpenGL::FlushRegion(VAddr addr, u64 size) {
198 MICROPROFILE_SCOPE(OpenGL_CacheManagement); 198 MICROPROFILE_SCOPE(OpenGL_CacheManagement);
199 res_cache.FlushRegion(addr, size); 199 res_cache.FlushRegion(addr, size);
200} 200}
201 201
202void RasterizerOpenGL::InvalidateRegion(VAddr addr, u32 size) { 202void RasterizerOpenGL::InvalidateRegion(VAddr addr, u64 size) {
203 MICROPROFILE_SCOPE(OpenGL_CacheManagement); 203 MICROPROFILE_SCOPE(OpenGL_CacheManagement);
204 res_cache.InvalidateRegion(addr, size, nullptr); 204 res_cache.InvalidateRegion(addr, size, nullptr);
205} 205}
206 206
207void RasterizerOpenGL::FlushAndInvalidateRegion(VAddr addr, u32 size) { 207void RasterizerOpenGL::FlushAndInvalidateRegion(VAddr addr, u64 size) {
208 MICROPROFILE_SCOPE(OpenGL_CacheManagement); 208 MICROPROFILE_SCOPE(OpenGL_CacheManagement);
209 res_cache.FlushRegion(addr, size); 209 res_cache.FlushRegion(addr, size);
210 res_cache.InvalidateRegion(addr, size, nullptr); 210 res_cache.InvalidateRegion(addr, size, nullptr);
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h
index f5c7b1162..b387f383b 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.h
+++ b/src/video_core/renderer_opengl/gl_rasterizer.h
@@ -32,9 +32,9 @@ public:
32 void DrawTriangles() override; 32 void DrawTriangles() override;
33 void NotifyMaxwellRegisterChanged(u32 id) override; 33 void NotifyMaxwellRegisterChanged(u32 id) override;
34 void FlushAll() override; 34 void FlushAll() override;
35 void FlushRegion(VAddr addr, u32 size) override; 35 void FlushRegion(VAddr addr, u64 size) override;
36 void InvalidateRegion(VAddr addr, u32 size) override; 36 void InvalidateRegion(VAddr addr, u64 size) override;
37 void FlushAndInvalidateRegion(VAddr addr, u32 size) override; 37 void FlushAndInvalidateRegion(VAddr addr, u64 size) override;
38 bool AccelerateDisplayTransfer(const void* config) override; 38 bool AccelerateDisplayTransfer(const void* config) override;
39 bool AccelerateTextureCopy(const void* config) override; 39 bool AccelerateTextureCopy(const void* config) override;
40 bool AccelerateFill(const void* config) override; 40 bool AccelerateFill(const void* config) override;