summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_rasterizer_cache.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-04-18 20:46:10 +0200
committerGitHub <noreply@github.com>2018-04-18 20:46:10 +0200
commitd3f9ea90e78dce585f23c71c969990439937b427 (patch)
tree618163c00bf621be9b7a44535493ceeaabd6257f /src/video_core/renderer_opengl/gl_rasterizer_cache.h
parentMerge pull request #346 from bunnei/misc-gpu-improvements (diff)
parentGPU: Pitch textures are now supported, don't assert when encountering them. (diff)
downloadyuzu-d3f9ea90e78dce585f23c71c969990439937b427.tar
yuzu-d3f9ea90e78dce585f23c71c969990439937b427.tar.gz
yuzu-d3f9ea90e78dce585f23c71c969990439937b427.tar.bz2
yuzu-d3f9ea90e78dce585f23c71c969990439937b427.tar.lz
yuzu-d3f9ea90e78dce585f23c71c969990439937b427.tar.xz
yuzu-d3f9ea90e78dce585f23c71c969990439937b427.tar.zst
yuzu-d3f9ea90e78dce585f23c71c969990439937b427.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer_cache.h')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.h13
1 files changed, 13 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..26d6c3061 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);
@@ -213,6 +225,7 @@ struct SurfaceParams {
u32 width = 0;
u32 height = 0;
u32 stride = 0;
+ u32 block_height = 0;
u16 res_scale = 1;
bool is_tiled = false;