Merge pull request #13290 from iwubcode/formatter_abstract_texture_type

VideoCommon: add formatter for AbstractTextureType
This commit is contained in:
JosJuice 2025-01-26 19:40:12 +01:00 committed by GitHub
commit c9e5975545
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,6 +7,7 @@
#include <functional>
#include "Common/CommonTypes.h"
#include "Common/EnumFormatter.h"
#include "Common/MathUtil.h"
enum class AbstractTextureFormat : u32
@ -41,11 +42,11 @@ enum AbstractTextureFlag : u32
AbstractTextureFlag_ComputeImage = (1 << 1), // Texture is used as a compute image.
};
enum class AbstractTextureType
enum class AbstractTextureType : u8
{
Texture_2DArray, // Used as a 2D texture array
Texture_2D, // Used as a normal 2D texture
Texture_CubeMap, // Used as a cube map texture
Texture_2DArray = 0, // Used as a 2D texture array
Texture_2D = 1, // Used as a normal 2D texture
Texture_CubeMap = 2, // Used as a cube map texture
};
struct TextureConfig
@ -92,3 +93,9 @@ struct std::hash<TextureConfig>
return std::hash<u64>{}(id);
}
};
template <>
struct fmt::formatter<AbstractTextureType> : EnumFormatter<AbstractTextureType::Texture_CubeMap>
{
constexpr formatter() : EnumFormatter({"2D Array", "2D", "Cubemap"}) {}
};