diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-02-09 00:51:31 +0100 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-02-28 02:58:40 +0100 |
commit | 893200161020f251dd327a5ac42c55509414dc3b (patch) | |
tree | e94faf3d4f62b0b8b68d6f519ca752d8c11131f6 /src/video_core/renderer_opengl/gl_rasterizer_cache.h | |
parent | rasterizer_cache: mark reinterpreted surfaces and add ability to reload marked surfaces on next use. (diff) | |
download | yuzu-893200161020f251dd327a5ac42c55509414dc3b.tar yuzu-893200161020f251dd327a5ac42c55509414dc3b.tar.gz yuzu-893200161020f251dd327a5ac42c55509414dc3b.tar.bz2 yuzu-893200161020f251dd327a5ac42c55509414dc3b.tar.lz yuzu-893200161020f251dd327a5ac42c55509414dc3b.tar.xz yuzu-893200161020f251dd327a5ac42c55509414dc3b.tar.zst yuzu-893200161020f251dd327a5ac42c55509414dc3b.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer_cache.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index 0b4d720e2..2be056f0a 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -141,10 +141,18 @@ struct SurfaceParams { return offset; } + std::size_t GetMipmapSingleSize(u32 mip_level) const { + return InnerMipmapMemorySize(mip_level, false, is_layered); + } + u32 MipWidth(u32 mip_level) const { return std::max(1U, width >> mip_level); } + u32 MipWidthGobAligned(u32 mip_level) const { + return std::max(64U*8U / GetFormatBpp(), width >> mip_level); + } + u32 MipHeight(u32 mip_level) const { return std::max(1U, height >> mip_level); } @@ -480,6 +488,9 @@ private: /// When a render target is changed, this method is called with the previous render target void NotifyFrameBufferChange(Surface triggering_surface); + // Partialy reinterpret a surface based on a triggering_surface that collides with it. + bool PartialReinterpretSurface(Surface triggering_surface, Surface intersect); + /// Performs a slow but accurate surface copy, flushing to RAM and reinterpreting the data void AccurateCopySurface(const Surface& src_surface, const Surface& dst_surface); void FastLayeredCopySurface(const Surface& src_surface, const Surface& dst_surface); |