Format info table was off by one this whole time. Who knew?
This commit is contained in:
parent
791f81c484
commit
5ce29dbe1c
|
@ -25,6 +25,7 @@ using namespace xe::gpu::xenos;
|
||||||
{TextureFormat::texture_format, FormatType::format, block_width, block_height, bits_per_pixel}
|
{TextureFormat::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[] = {
|
static const FormatInfo format_infos[] = {
|
||||||
|
FORMAT_INFO(kUnknown , kUncompressed, 0, 0, 0), // k_1_REVERSE
|
||||||
FORMAT_INFO(k_1 , kUncompressed, 1, 1, 1),
|
FORMAT_INFO(k_1 , kUncompressed, 1, 1, 1),
|
||||||
FORMAT_INFO(k_8 , kUncompressed, 1, 1, 8),
|
FORMAT_INFO(k_8 , kUncompressed, 1, 1, 8),
|
||||||
FORMAT_INFO(k_1_5_5_5 , kUncompressed, 1, 1, 16),
|
FORMAT_INFO(k_1_5_5_5 , kUncompressed, 1, 1, 16),
|
||||||
|
@ -37,7 +38,7 @@ const FormatInfo* FormatInfo::Get(uint32_t gpu_format) {
|
||||||
FORMAT_INFO(k_8_8 , kUncompressed, 1, 1, 16),
|
FORMAT_INFO(k_8_8 , kUncompressed, 1, 1, 16),
|
||||||
FORMAT_INFO(k_Cr_Y1_Cb_Y0 , kCompressed , 2, 1, 16),
|
FORMAT_INFO(k_Cr_Y1_Cb_Y0 , kCompressed , 2, 1, 16),
|
||||||
FORMAT_INFO(k_Y1_Cr_Y0_Cb , kCompressed , 2, 1, 16),
|
FORMAT_INFO(k_Y1_Cr_Y0_Cb , kCompressed , 2, 1, 16),
|
||||||
FORMAT_INFO(kUnknown , kUncompressed, 0, 0, 0),
|
FORMAT_INFO(kUnknown , kUncompressed, 0, 0, 0), // k_Shadow
|
||||||
FORMAT_INFO(k_8_8_8_8_A , kUncompressed, 1, 1, 32),
|
FORMAT_INFO(k_8_8_8_8_A , kUncompressed, 1, 1, 32),
|
||||||
FORMAT_INFO(k_4_4_4_4 , kUncompressed, 1, 1, 16),
|
FORMAT_INFO(k_4_4_4_4 , kUncompressed, 1, 1, 16),
|
||||||
FORMAT_INFO(k_10_11_11 , kUncompressed, 1, 1, 32),
|
FORMAT_INFO(k_10_11_11 , kUncompressed, 1, 1, 32),
|
||||||
|
@ -45,7 +46,7 @@ const FormatInfo* FormatInfo::Get(uint32_t gpu_format) {
|
||||||
FORMAT_INFO(k_DXT1 , kCompressed , 4, 4, 4),
|
FORMAT_INFO(k_DXT1 , kCompressed , 4, 4, 4),
|
||||||
FORMAT_INFO(k_DXT2_3 , kCompressed , 4, 4, 8),
|
FORMAT_INFO(k_DXT2_3 , kCompressed , 4, 4, 8),
|
||||||
FORMAT_INFO(k_DXT4_5 , kCompressed , 4, 4, 8),
|
FORMAT_INFO(k_DXT4_5 , kCompressed , 4, 4, 8),
|
||||||
FORMAT_INFO(kUnknown , kUncompressed, 0, 0, 0),
|
FORMAT_INFO(kUnknown , kUncompressed, 0, 0, 0), // k_DXV
|
||||||
FORMAT_INFO(k_24_8 , kUncompressed, 1, 1, 32),
|
FORMAT_INFO(k_24_8 , kUncompressed, 1, 1, 32),
|
||||||
FORMAT_INFO(k_24_8_FLOAT , kUncompressed, 1, 1, 32),
|
FORMAT_INFO(k_24_8_FLOAT , kUncompressed, 1, 1, 32),
|
||||||
FORMAT_INFO(k_16 , kUncompressed, 1, 1, 16),
|
FORMAT_INFO(k_16 , kUncompressed, 1, 1, 16),
|
||||||
|
@ -86,8 +87,7 @@ const FormatInfo* FormatInfo::Get(uint32_t gpu_format) {
|
||||||
FORMAT_INFO(k_DXT5A , kCompressed , 4, 4, 4),
|
FORMAT_INFO(k_DXT5A , kCompressed , 4, 4, 4),
|
||||||
FORMAT_INFO(k_CTX1 , kCompressed , 4, 4, 4),
|
FORMAT_INFO(k_CTX1 , kCompressed , 4, 4, 4),
|
||||||
FORMAT_INFO(k_DXT3A_AS_1_1_1_1 , kCompressed , 4, 4, 4),
|
FORMAT_INFO(k_DXT3A_AS_1_1_1_1 , kCompressed , 4, 4, 4),
|
||||||
FORMAT_INFO(kUnknown , kUncompressed, 0, 0, 0),
|
FORMAT_INFO(kUnknown , kUncompressed, 0, 0, 0), // k_2_10_10_10_FLOAT
|
||||||
FORMAT_INFO(kUnknown , kUncompressed, 0, 0, 0),
|
|
||||||
};
|
};
|
||||||
return &format_infos[gpu_format];
|
return &format_infos[gpu_format];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue