/ src / video_core / custom_textures / custom_format.cpp
custom_format.cpp
 1  // Copyright 2023 Citra Emulator Project
 2  // Licensed under GPLv2 or any later version
 3  // Refer to the license.txt file included.
 4  
 5  #include "video_core/custom_textures/custom_format.h"
 6  
 7  namespace VideoCore {
 8  
 9  std::string_view CustomPixelFormatAsString(CustomPixelFormat format) {
10      switch (format) {
11      case CustomPixelFormat::RGBA8:
12          return "RGBA8";
13      case CustomPixelFormat::BC1:
14          return "BC1";
15      case CustomPixelFormat::BC3:
16          return "BC3";
17      case CustomPixelFormat::BC5:
18          return "BC5";
19      case CustomPixelFormat::BC7:
20          return "BC7";
21      case CustomPixelFormat::ASTC4:
22          return "ASTC4";
23      case CustomPixelFormat::ASTC6:
24          return "ASTC6";
25      case CustomPixelFormat::ASTC8:
26          return "ASTC8";
27      default:
28          return "NotReal";
29      }
30  }
31  
32  bool IsCustomFormatCompressed(CustomPixelFormat format) {
33      return format != CustomPixelFormat::RGBA8 && format != CustomPixelFormat::Invalid;
34  }
35  
36  } // namespace VideoCore