GPU: Add name strings for all texture formats
This commit is contained in:
parent
96ba5d5563
commit
57ffee0d8c
|
@ -237,6 +237,7 @@ enum class FormatType {
|
||||||
|
|
||||||
struct FormatInfo {
|
struct FormatInfo {
|
||||||
TextureFormat format;
|
TextureFormat format;
|
||||||
|
const char* name;
|
||||||
FormatType type;
|
FormatType type;
|
||||||
uint32_t block_width;
|
uint32_t block_width;
|
||||||
uint32_t block_height;
|
uint32_t block_height;
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace gpu {
|
||||||
using namespace xe::gpu::xenos;
|
using namespace xe::gpu::xenos;
|
||||||
|
|
||||||
#define FORMAT_INFO(texture_format, format, block_width, block_height, bits_per_pixel) \
|
#define FORMAT_INFO(texture_format, format, block_width, block_height, bits_per_pixel) \
|
||||||
{TextureFormat::texture_format, FormatType::format, block_width, block_height, bits_per_pixel}
|
{TextureFormat::texture_format, #texture_format, FormatType::format, block_width, block_height, bits_per_pixel}
|
||||||
const FormatInfo* FormatInfo::Get(uint32_t gpu_format) {
|
const FormatInfo* FormatInfo::Get(uint32_t gpu_format) {
|
||||||
static const FormatInfo format_infos[64] = {
|
static const FormatInfo format_infos[64] = {
|
||||||
FORMAT_INFO(k_1_REVERSE , kUncompressed, 1, 1, 1),
|
FORMAT_INFO(k_1_REVERSE , kUncompressed, 1, 1, 1),
|
||||||
|
|
Loading…
Reference in New Issue