diff options
author | bunnei <bunneidev@gmail.com> | 2018-03-23 04:06:54 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-03-23 04:06:54 +0100 |
commit | a0b1235f82b2632651cb817f8216cc9af37759a2 (patch) | |
tree | 5e04ad7b280f355a77a5c4dc813fad663e4f97a4 /src/video_core/renderer_opengl/gl_rasterizer_cache.h | |
parent | LoadGLBuffer: Use bytes_per_pixel, not bits. (diff) | |
download | yuzu-a0b1235f82b2632651cb817f8216cc9af37759a2.tar yuzu-a0b1235f82b2632651cb817f8216cc9af37759a2.tar.gz yuzu-a0b1235f82b2632651cb817f8216cc9af37759a2.tar.bz2 yuzu-a0b1235f82b2632651cb817f8216cc9af37759a2.tar.lz yuzu-a0b1235f82b2632651cb817f8216cc9af37759a2.tar.xz yuzu-a0b1235f82b2632651cb817f8216cc9af37759a2.tar.zst yuzu-a0b1235f82b2632651cb817f8216cc9af37759a2.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 | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index 2172a9d24..14f3cdc38 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -22,6 +22,7 @@ #include "common/common_funcs.h" #include "common/common_types.h" #include "common/math_util.h" +#include "video_core/gpu.h" #include "video_core/renderer_opengl/gl_resource_manager.h" struct CachedSurface; @@ -115,6 +116,15 @@ struct SurfaceParams { return GetFormatBpp(pixel_format); } + static PixelFormat PixelFormatFromGPUPixelFormat(Tegra::FramebufferConfig::PixelFormat format) { + switch (format) { + case Tegra::FramebufferConfig::PixelFormat::ABGR8: + return PixelFormat::RGBA8; + default: + UNREACHABLE(); + } + } + static bool CheckFormatsBlittable(PixelFormat pixel_format_a, PixelFormat pixel_format_b) { SurfaceType a_type = GetFormatType(pixel_format_a); SurfaceType b_type = GetFormatType(pixel_format_b); @@ -257,7 +267,7 @@ struct CachedSurface : SurfaceParams { std::unique_ptr<u8[]> gl_buffer; size_t gl_buffer_size = 0; - // Read/Write data in 3DS memory to/from gl_buffer + // Read/Write data in Switch memory to/from gl_buffer void LoadGLBuffer(VAddr load_start, VAddr load_end); void FlushGLBuffer(VAddr flush_start, VAddr flush_end); |