diff options
author | Subv <subv2112@gmail.com> | 2018-04-18 20:54:10 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2018-04-18 21:17:28 +0200 |
commit | 5b3fab6766d68ddc00fc342fde3c32d449e82535 (patch) | |
tree | 45826bdf98b11dab95886377ed424b89d673b90f /src/video_core/renderer_opengl/gl_rasterizer_cache.h | |
parent | GPU: Texture format 8 and framebuffer format 0xD5 are actually ABGR8. (diff) | |
download | yuzu-5b3fab6766d68ddc00fc342fde3c32d449e82535.tar yuzu-5b3fab6766d68ddc00fc342fde3c32d449e82535.tar.gz yuzu-5b3fab6766d68ddc00fc342fde3c32d449e82535.tar.bz2 yuzu-5b3fab6766d68ddc00fc342fde3c32d449e82535.tar.lz yuzu-5b3fab6766d68ddc00fc342fde3c32d449e82535.tar.xz yuzu-5b3fab6766d68ddc00fc342fde3c32d449e82535.tar.zst yuzu-5b3fab6766d68ddc00fc342fde3c32d449e82535.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 | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index 0f8f14404..434cd2277 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -58,12 +58,11 @@ struct SurfaceParams { }; enum class SurfaceType { - Color = 0, - Texture = 1, - Depth = 2, - DepthStencil = 3, - Fill = 4, - Invalid = 5 + ColorTexture = 0, + Depth = 1, + DepthStencil = 2, + Fill = 3, + Invalid = 4, }; static constexpr unsigned int GetFormatBpp(PixelFormat format) { @@ -131,8 +130,7 @@ struct SurfaceParams { SurfaceType a_type = GetFormatType(pixel_format_a); SurfaceType b_type = GetFormatType(pixel_format_b); - if ((a_type == SurfaceType::Color || a_type == SurfaceType::Texture) && - (b_type == SurfaceType::Color || b_type == SurfaceType::Texture)) { + if (a_type == SurfaceType::ColorTexture && b_type == SurfaceType::ColorTexture) { return true; } @@ -148,12 +146,8 @@ struct SurfaceParams { } static SurfaceType GetFormatType(PixelFormat pixel_format) { - if ((unsigned int)pixel_format <= static_cast<unsigned int>(PixelFormat::ABGR8)) { - return SurfaceType::Color; - } - if ((unsigned int)pixel_format <= static_cast<unsigned int>(PixelFormat::DXT1)) { - return SurfaceType::Texture; + return SurfaceType::ColorTexture; } // TODO(Subv): Implement the other formats |