summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_rasterizer_cache.h
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-04-16 02:54:38 +0200
committerSubv <subv2112@gmail.com>2018-04-18 19:52:52 +0200
commitac09b5a2e945f587a8b3b712f54b76d46edb0c2f (patch)
treefe8f41e023436cc64db6c5e34640ea6890ba22f1 /src/video_core/renderer_opengl/gl_rasterizer_cache.h
parentGPU: Allow using a configurable block height when unswizzling textures. (diff)
downloadyuzu-ac09b5a2e945f587a8b3b712f54b76d46edb0c2f.tar
yuzu-ac09b5a2e945f587a8b3b712f54b76d46edb0c2f.tar.gz
yuzu-ac09b5a2e945f587a8b3b712f54b76d46edb0c2f.tar.bz2
yuzu-ac09b5a2e945f587a8b3b712f54b76d46edb0c2f.tar.lz
yuzu-ac09b5a2e945f587a8b3b712f54b76d46edb0c2f.tar.xz
yuzu-ac09b5a2e945f587a8b3b712f54b76d46edb0c2f.tar.zst
yuzu-ac09b5a2e945f587a8b3b712f54b76d46edb0c2f.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer_cache.h')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.h12
1 files changed, 12 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 3293905d6..0b2e3ffef 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h
@@ -115,6 +115,18 @@ struct SurfaceParams {
}
}
+ static Tegra::Texture::TextureFormat TextureFormatFromPixelFormat(PixelFormat format) {
+ // TODO(Subv): Properly implement this
+ switch (format) {
+ case PixelFormat::RGBA8:
+ return Tegra::Texture::TextureFormat::A8R8G8B8;
+ case PixelFormat::DXT1:
+ return Tegra::Texture::TextureFormat::DXT1;
+ 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);