summaryrefslogtreecommitdiffstats
path: root/src/video_core/surface.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-06-30 00:52:37 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-06-30 00:52:37 +0200
commitf6f1a8f26a302dc33df635625c490f0d65880059 (patch)
tree4b0f73bcd53ef8ddc3e57520d82d32937cb21b5c /src/video_core/surface.h
parenttexture_cache: Use std::array for siblings_table (diff)
downloadyuzu-f6f1a8f26a302dc33df635625c490f0d65880059.tar
yuzu-f6f1a8f26a302dc33df635625c490f0d65880059.tar.gz
yuzu-f6f1a8f26a302dc33df635625c490f0d65880059.tar.bz2
yuzu-f6f1a8f26a302dc33df635625c490f0d65880059.tar.lz
yuzu-f6f1a8f26a302dc33df635625c490f0d65880059.tar.xz
yuzu-f6f1a8f26a302dc33df635625c490f0d65880059.tar.zst
yuzu-f6f1a8f26a302dc33df635625c490f0d65880059.zip
Diffstat (limited to 'src/video_core/surface.h')
-rw-r--r--src/video_core/surface.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/video_core/surface.h b/src/video_core/surface.h
index bfdbc3b81..83f31c12c 100644
--- a/src/video_core/surface.h
+++ b/src/video_core/surface.h
@@ -439,11 +439,11 @@ static constexpr u32 GetBytesPerPixel(PixelFormat pixel_format) {
return GetFormatBpp(pixel_format) / CHAR_BIT;
}
-enum class SurfaceCompression : u8 {
- None = 0,
- Compressed = 1,
- Converted = 2,
- Rearranged = 3,
+enum class SurfaceCompression {
+ None, // Not compressed
+ Compressed, // Texture is compressed
+ Converted, // Texture is converted before upload or after download
+ Rearranged, // Texture is swizzled before upload or after download
};
constexpr std::array<SurfaceCompression, MaxPixelFormat> compression_type_table = {{
@@ -513,11 +513,11 @@ constexpr std::array<SurfaceCompression, MaxPixelFormat> compression_type_table
SurfaceCompression::None, // Z32FS8
}};
-static constexpr SurfaceCompression GetFormatCompressionType(PixelFormat format) {
- if (format == PixelFormat::Invalid)
+constexpr SurfaceCompression GetFormatCompressionType(PixelFormat format) {
+ if (format == PixelFormat::Invalid) {
return SurfaceCompression::None;
-
- ASSERT(static_cast<std::size_t>(format) < compression_type_table.size());
+ }
+ DEBUG_ASSERT(static_cast<std::size_t>(format) < compression_type_table.size());
return compression_type_table[static_cast<std::size_t>(format)];
}