diff options
| author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-11-09 03:26:30 -0300 |
|---|---|---|
| committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-11-14 20:57:10 -0300 |
| commit | c884dc8af2575868ce9f89cb4a0bef78bc475def (patch) | |
| tree | 38f52e7744ba4db1aba6252837459b1ca72fa465 /src/video_core/texture_cache/surface_params.h | |
| parent | c6afe254777a785e2d7a391fbe7ee0d48ccd7795 (diff) | |
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.
Diffstat (limited to 'src/video_core/texture_cache/surface_params.h')
| -rw-r--r-- | src/video_core/texture_cache/surface_params.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/video_core/texture_cache/surface_params.h b/src/video_core/texture_cache/surface_params.h index a84058869f..709aa0dc2a 100644 --- a/src/video_core/texture_cache/surface_params.h +++ b/src/video_core/texture_cache/surface_params.h @@ -16,16 +16,20 @@ namespace VideoCommon { +class FormatLookupTable; + using VideoCore::Surface::SurfaceCompression; class SurfaceParams { public: /// Creates SurfaceCachedParams from a texture configuration. - static SurfaceParams CreateForTexture(const Tegra::Texture::TICEntry& tic, + static SurfaceParams CreateForTexture(const FormatLookupTable& lookup_table, + const Tegra::Texture::TICEntry& tic, const VideoCommon::Shader::Sampler& entry); /// Creates SurfaceCachedParams from an image configuration. - static SurfaceParams CreateForImage(const Tegra::Texture::TICEntry& tic, + static SurfaceParams CreateForImage(const FormatLookupTable& lookup_table, + const Tegra::Texture::TICEntry& tic, const VideoCommon::Shader::Image& entry); /// Creates SurfaceCachedParams for a depth buffer configuration. |
