From 80eacdf89b55528a66b2e94391e640e641e8cb57 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Sat, 9 Nov 2019 03:26:30 -0300 Subject: texture_cache: Use a table instead of switch for texture formats Use a large flat array to look up texture formats. This allows us to properly implement formats with different component types. It should also be faster. --- src/video_core/surface.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/video_core/surface.h') diff --git a/src/video_core/surface.h b/src/video_core/surface.h index a3bf2a5b2..0d17a93ed 100644 --- a/src/video_core/surface.h +++ b/src/video_core/surface.h @@ -106,7 +106,6 @@ enum class PixelFormat { Max = MaxDepthStencilFormat, Invalid = 255, }; - static constexpr std::size_t MaxPixelFormat = static_cast(PixelFormat::Max); enum class SurfaceType { @@ -600,10 +599,6 @@ PixelFormat PixelFormatFromDepthFormat(Tegra::DepthFormat format); PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format); -PixelFormat PixelFormatFromTextureFormat(Tegra::Texture::TextureFormat format, - Tegra::Texture::ComponentType component_type, - bool is_srgb); - PixelFormat PixelFormatFromGPUPixelFormat(Tegra::FramebufferConfig::PixelFormat format); SurfaceType GetFormatType(PixelFormat pixel_format); -- cgit v1.2.3