diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-04-05 18:58:23 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-04-06 15:21:46 +0200 |
commit | 9c0f40a1f5bea37b87a31e9f957c4d2a14a8e421 (patch) | |
tree | 0aca3e4623f87ee57694b028bea75fdf2ae3c32c /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | Merge pull request #3513 from ReinUsesLisp/native-astc (diff) | |
download | yuzu-9c0f40a1f5bea37b87a31e9f957c4d2a14a8e421.tar yuzu-9c0f40a1f5bea37b87a31e9f957c4d2a14a8e421.tar.gz yuzu-9c0f40a1f5bea37b87a31e9f957c4d2a14a8e421.tar.bz2 yuzu-9c0f40a1f5bea37b87a31e9f957c4d2a14a8e421.tar.lz yuzu-9c0f40a1f5bea37b87a31e9f957c4d2a14a8e421.tar.xz yuzu-9c0f40a1f5bea37b87a31e9f957c4d2a14a8e421.tar.zst yuzu-9c0f40a1f5bea37b87a31e9f957c4d2a14a8e421.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 346feeb2f..261738830 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -656,28 +656,30 @@ void RasterizerOpenGL::Query(GPUVAddr gpu_addr, VideoCore::QueryType type, void RasterizerOpenGL::FlushAll() {} -void RasterizerOpenGL::FlushRegion(CacheAddr addr, u64 size) { +void RasterizerOpenGL::FlushRegion(VAddr addr, u64 size) { MICROPROFILE_SCOPE(OpenGL_CacheManagement); if (!addr || !size) { return; } - texture_cache.FlushRegion(addr, size); - buffer_cache.FlushRegion(addr, size); - query_cache.FlushRegion(addr, size); + CacheAddr cache_addr = ToCacheAddr(system.Memory().GetPointer(addr)); + texture_cache.FlushRegion(cache_addr, size); + buffer_cache.FlushRegion(cache_addr, size); + query_cache.FlushRegion(cache_addr, size); } -void RasterizerOpenGL::InvalidateRegion(CacheAddr addr, u64 size) { +void RasterizerOpenGL::InvalidateRegion(VAddr addr, u64 size) { MICROPROFILE_SCOPE(OpenGL_CacheManagement); if (!addr || !size) { return; } - texture_cache.InvalidateRegion(addr, size); - shader_cache.InvalidateRegion(addr, size); - buffer_cache.InvalidateRegion(addr, size); - query_cache.InvalidateRegion(addr, size); + CacheAddr cache_addr = ToCacheAddr(system.Memory().GetPointer(addr)); + texture_cache.InvalidateRegion(cache_addr, size); + shader_cache.InvalidateRegion(cache_addr, size); + buffer_cache.InvalidateRegion(cache_addr, size); + query_cache.InvalidateRegion(cache_addr, size); } -void RasterizerOpenGL::FlushAndInvalidateRegion(CacheAddr addr, u64 size) { +void RasterizerOpenGL::FlushAndInvalidateRegion(VAddr addr, u64 size) { if (Settings::values.use_accurate_gpu_emulation) { FlushRegion(addr, size); } |