diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-03-04 20:14:19 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-03-04 20:14:19 +0100 |
commit | 0639244d856f403cc9bdec5ca927df7a61edd1d8 (patch) | |
tree | a87c6e3142665bfb632001507cf04c973a88e1a6 /src/video_core/renderer_opengl/util_shaders.h | |
parent | Merge pull request #6004 from german77/udprandom (diff) | |
download | yuzu-0639244d856f403cc9bdec5ca927df7a61edd1d8.tar yuzu-0639244d856f403cc9bdec5ca927df7a61edd1d8.tar.gz yuzu-0639244d856f403cc9bdec5ca927df7a61edd1d8.tar.bz2 yuzu-0639244d856f403cc9bdec5ca927df7a61edd1d8.tar.lz yuzu-0639244d856f403cc9bdec5ca927df7a61edd1d8.tar.xz yuzu-0639244d856f403cc9bdec5ca927df7a61edd1d8.tar.zst yuzu-0639244d856f403cc9bdec5ca927df7a61edd1d8.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/util_shaders.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/util_shaders.h b/src/video_core/renderer_opengl/util_shaders.h index 7b1d16b09..93b009743 100644 --- a/src/video_core/renderer_opengl/util_shaders.h +++ b/src/video_core/renderer_opengl/util_shaders.h @@ -19,6 +19,22 @@ class ProgramManager; struct ImageBufferMap; +class Bgr565CopyPass { +public: + Bgr565CopyPass() = default; + ~Bgr565CopyPass() = default; + + void Execute(const Image& dst_image, const Image& src_image, + const VideoCommon::ImageCopy& copy); + +private: + [[nodiscard]] bool CopyBufferCreationNeeded(const VideoCommon::ImageCopy& copy); + void CreateNewCopyBuffer(const VideoCommon::ImageCopy& copy, GLenum target, GLuint format); + + OGLBuffer bgr16_pbo; + size_t bgr16_pbo_size{}; +}; + class UtilShaders { public: explicit UtilShaders(ProgramManager& program_manager); @@ -36,6 +52,9 @@ public: void CopyBC4(Image& dst_image, Image& src_image, std::span<const VideoCommon::ImageCopy> copies); + void CopyBGR(Image& dst_image, Image& src_image, + std::span<const VideoCommon::ImageCopy> copies); + private: ProgramManager& program_manager; @@ -44,7 +63,10 @@ private: OGLProgram block_linear_unswizzle_2d_program; OGLProgram block_linear_unswizzle_3d_program; OGLProgram pitch_unswizzle_program; + OGLProgram copy_bgra_program; OGLProgram copy_bc4_program; + + Bgr565CopyPass bgr_copy_pass; }; GLenum StoreFormat(u32 bytes_per_block); |