summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_texture_cache.h
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-09-16 03:30:35 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-09-17 01:49:12 +0200
commitab808fe7cf66c143e9323bb51922989d5bb37752 (patch)
tree18fe9a57339e2c8e18bc2ffe473483c95c7762a7 /src/video_core/renderer_opengl/gl_texture_cache.h
parentutil_shaders: Unify BGRA copy passes (diff)
downloadyuzu-ab808fe7cf66c143e9323bb51922989d5bb37752.tar
yuzu-ab808fe7cf66c143e9323bb51922989d5bb37752.tar.gz
yuzu-ab808fe7cf66c143e9323bb51922989d5bb37752.tar.bz2
yuzu-ab808fe7cf66c143e9323bb51922989d5bb37752.tar.lz
yuzu-ab808fe7cf66c143e9323bb51922989d5bb37752.tar.xz
yuzu-ab808fe7cf66c143e9323bb51922989d5bb37752.tar.zst
yuzu-ab808fe7cf66c143e9323bb51922989d5bb37752.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_texture_cache.h14
1 files changed, 14 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 990a8ddcb..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;