diff options
author | bunnei <bunneidev@gmail.com> | 2021-09-30 01:10:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-30 01:10:56 +0200 |
commit | 91341b421d23e3f1674bd0c2354636ff6b3c9180 (patch) | |
tree | f9f69fafb399eda88e177472e485add140a7c69a /src/video_core/renderer_opengl/gl_texture_cache.h | |
parent | Merge pull request #7106 from astrelsky/invalid_iterator_fix (diff) | |
parent | host_shaders: Remove opengl_copy_bgra.comp (diff) | |
download | yuzu-91341b421d23e3f1674bd0c2354636ff6b3c9180.tar yuzu-91341b421d23e3f1674bd0c2354636ff6b3c9180.tar.gz yuzu-91341b421d23e3f1674bd0c2354636ff6b3c9180.tar.bz2 yuzu-91341b421d23e3f1674bd0c2354636ff6b3c9180.tar.lz yuzu-91341b421d23e3f1674bd0c2354636ff6b3c9180.tar.xz yuzu-91341b421d23e3f1674bd0c2354636ff6b3c9180.tar.zst yuzu-91341b421d23e3f1674bd0c2354636ff6b3c9180.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_texture_cache.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_texture_cache.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.h b/src/video_core/renderer_opengl/gl_texture_cache.h index 4a4f6301c..c498a8a8f 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.h +++ b/src/video_core/renderer_opengl/gl_texture_cache.h @@ -47,6 +47,19 @@ struct FormatProperties { bool is_compressed; }; +class BGRCopyPass { +public: + BGRCopyPass() = default; + ~BGRCopyPass() = default; + + void CopyBGR(Image& dst_image, Image& src_image, + std::span<const VideoCommon::ImageCopy> copies); + +private: + OGLBuffer bgr_pbo; + size_t bgr_pbo_size{}; +}; + class TextureCacheRuntime { friend Framebuffer; friend Image; @@ -118,6 +131,7 @@ private: const Device& device; StateTracker& state_tracker; UtilShaders util_shaders; + BGRCopyPass bgr_copy_pass; std::array<std::unordered_map<GLenum, FormatProperties>, 3> format_properties; bool has_broken_texture_view_formats = false; @@ -162,6 +176,14 @@ public: return texture.handle; } + GLuint GlFormat() const noexcept { + return gl_format; + } + + GLuint GlType() const noexcept { + return gl_type; + } + private: void CopyBufferToImage(const VideoCommon::BufferImageCopy& copy, size_t buffer_offset); |