VideoCommon: add formatter for AbstractTextureType

This commit is contained in:
iwubcode 2025-01-20 14:24:54 -06:00
parent 7ba56bc738
commit ee906ae6e8

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"}) {}
};