diff options
| author | 2019-06-29 19:52:37 -0300 | |
|---|---|---|
| committer | 2019-06-29 19:52:37 -0300 | |
| commit | f6f1a8f26a302dc33df635625c490f0d65880059 (patch) | |
| tree | 4b0f73bcd53ef8ddc3e57520d82d32937cb21b5c /src/video_core/surface.h | |
| parent | texture_cache: Use std::array for siblings_table (diff) | |
| download | yuzu-f6f1a8f26a302dc33df635625c490f0d65880059.tar.gz yuzu-f6f1a8f26a302dc33df635625c490f0d65880059.tar.xz yuzu-f6f1a8f26a302dc33df635625c490f0d65880059.zip | |
texture_cache: Style changes
Diffstat (limited to 'src/video_core/surface.h')
| -rw-r--r-- | src/video_core/surface.h | 18 |
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) { | |||
| 439 | return GetFormatBpp(pixel_format) / CHAR_BIT; | 439 | return GetFormatBpp(pixel_format) / CHAR_BIT; |
| 440 | } | 440 | } |
| 441 | 441 | ||
| 442 | enum class SurfaceCompression : u8 { | 442 | enum class SurfaceCompression { |
| 443 | None = 0, | 443 | None, // Not compressed |
| 444 | Compressed = 1, | 444 | Compressed, // Texture is compressed |
| 445 | Converted = 2, | 445 | Converted, // Texture is converted before upload or after download |
| 446 | Rearranged = 3, | 446 | Rearranged, // Texture is swizzled before upload or after download |
| 447 | }; | 447 | }; |
| 448 | 448 | ||
| 449 | constexpr std::array<SurfaceCompression, MaxPixelFormat> compression_type_table = {{ | 449 | constexpr std::array<SurfaceCompression, MaxPixelFormat> compression_type_table = {{ |
| @@ -513,11 +513,11 @@ constexpr std::array<SurfaceCompression, MaxPixelFormat> compression_type_table | |||
| 513 | SurfaceCompression::None, // Z32FS8 | 513 | SurfaceCompression::None, // Z32FS8 |
| 514 | }}; | 514 | }}; |
| 515 | 515 | ||
| 516 | static constexpr SurfaceCompression GetFormatCompressionType(PixelFormat format) { | 516 | constexpr SurfaceCompression GetFormatCompressionType(PixelFormat format) { |
| 517 | if (format == PixelFormat::Invalid) | 517 | if (format == PixelFormat::Invalid) { |
| 518 | return SurfaceCompression::None; | 518 | return SurfaceCompression::None; |
| 519 | 519 | } | |
| 520 | ASSERT(static_cast<std::size_t>(format) < compression_type_table.size()); | 520 | DEBUG_ASSERT(static_cast<std::size_t>(format) < compression_type_table.size()); |
| 521 | return compression_type_table[static_cast<std::size_t>(format)]; | 521 | return compression_type_table[static_cast<std::size_t>(format)]; |
| 522 | } | 522 | } |
| 523 | 523 | ||