diff options
author | bunnei <bunneidev@gmail.com> | 2018-10-06 05:39:03 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-10-06 09:20:04 +0200 |
commit | 011cf77796aee57c23e97876aad65712efd6c92b (patch) | |
tree | 5cbed5aec5c9bb649bb068ddbf0d7189bd135085 /src/video_core/renderer_opengl/gl_rasterizer_cache.h | |
parent | gl_rasterizer_cache: Implement a simpler surface copy using glCopyImageSubData. (diff) | |
download | yuzu-011cf77796aee57c23e97876aad65712efd6c92b.tar yuzu-011cf77796aee57c23e97876aad65712efd6c92b.tar.gz yuzu-011cf77796aee57c23e97876aad65712efd6c92b.tar.bz2 yuzu-011cf77796aee57c23e97876aad65712efd6c92b.tar.lz yuzu-011cf77796aee57c23e97876aad65712efd6c92b.tar.xz yuzu-011cf77796aee57c23e97876aad65712efd6c92b.tar.zst yuzu-011cf77796aee57c23e97876aad65712efd6c92b.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 | 9 |
1 files changed, 9 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 49025a3fe..0b4940b3c 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -13,6 +13,7 @@ #include "common/common_types.h" #include "common/hash.h" #include "common/math_util.h" +#include "video_core/engines/fermi_2d.h" #include "video_core/engines/maxwell_3d.h" #include "video_core/rasterizer_cache.h" #include "video_core/renderer_opengl/gl_resource_manager.h" @@ -719,6 +720,10 @@ struct SurfaceParams { Tegra::GPUVAddr zeta_address, Tegra::DepthFormat format); + /// Creates SurfaceParams for a Fermi2D surface copy + static SurfaceParams CreateForFermiCopySurface( + const Tegra::Engines::Fermi2D::Regs::Surface& config); + /// Checks if surfaces are compatible for caching bool IsCompatibleSurface(const SurfaceParams& other) const { return std::tie(pixel_format, type, width, height, target, depth) == @@ -837,6 +842,10 @@ public: /// Tries to find a framebuffer using on the provided CPU address Surface TryFindFramebufferSurface(VAddr addr) const; + /// Copies the contents of one surface to another + void FermiCopySurface(const Tegra::Engines::Fermi2D::Regs::Surface& src_config, + const Tegra::Engines::Fermi2D::Regs::Surface& dst_config); + private: void LoadSurface(const Surface& surface); Surface GetSurface(const SurfaceParams& params, bool preserve_contents = true); |