GPU: Make the format info table 64 statically elements again.

This commit is contained in:
gibbed 2017-08-07 10:59:23 -05:00
parent c656d95345
commit 906f24cb1a
1 changed files with 2 additions and 1 deletions

View File

@ -19,7 +19,7 @@ using namespace xe::gpu::xenos;
#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}
const FormatInfo* FormatInfo::Get(uint32_t gpu_format) {
static const FormatInfo format_infos[] = {
static const FormatInfo format_infos[64] = {
FORMAT_INFO(k_1_REVERSE , kUncompressed, 1, 1, 1),
FORMAT_INFO(k_1 , kUncompressed, 1, 1, 1),
FORMAT_INFO(k_8 , kUncompressed, 1, 1, 8),
@ -83,6 +83,7 @@ const FormatInfo* FormatInfo::Get(uint32_t gpu_format) {
FORMAT_INFO(k_CTX1 , kCompressed , 4, 4, 4),
FORMAT_INFO(k_DXT3A_AS_1_1_1_1 , kCompressed , 4, 4, 4),
FORMAT_INFO(kUnknown , kUncompressed, 0, 0, 0), // k_2_10_10_10_FLOAT
FORMAT_INFO(kUnknown , kUncompressed, 0, 0, 0), // invalid
};
return &format_infos[gpu_format];
}