Cleaned texture format names.

This commit is contained in:
Branimir Karadžić
2015-08-28 14:48:51 -07:00
parent 0cb21b8b83
commit ece46d71bc
9 changed files with 87 additions and 89 deletions

View File

@@ -42,17 +42,17 @@ namespace bgfx
{ 1, 8, 1, 1, 1, 1, 0, 0 }, // R1
{ 8, 1, 1, 1, 1, 1, 0, 0 }, // R8
{ 8, 1, 1, 1, 1, 1, 0, 0 }, // R8S
{ 16, 1, 1, 2, 1, 1, 0, 0 }, // R16
{ 16, 1, 1, 2, 1, 1, 0, 0 }, // R16U
{ 16, 1, 1, 2, 1, 1, 0, 0 }, // R16F
{ 16, 1, 1, 2, 1, 1, 0, 0 }, // R16S
{ 32, 1, 1, 4, 1, 1, 0, 0 }, // R32
{ 32, 1, 1, 4, 1, 1, 0, 0 }, // R32U
{ 32, 1, 1, 4, 1, 1, 0, 0 }, // R32F
{ 16, 1, 1, 2, 1, 1, 0, 0 }, // RG8
{ 16, 1, 1, 2, 1, 1, 0, 0 }, // RG8S
{ 32, 1, 1, 4, 1, 1, 0, 0 }, // RG16
{ 32, 1, 1, 4, 1, 1, 0, 0 }, // RG16F
{ 32, 1, 1, 4, 1, 1, 0, 0 }, // RG16S
{ 64, 1, 1, 8, 1, 1, 0, 0 }, // RG32
{ 64, 1, 1, 8, 1, 1, 0, 0 }, // RG32U
{ 64, 1, 1, 8, 1, 1, 0, 0 }, // RG32F
{ 32, 1, 1, 4, 1, 1, 0, 0 }, // BGRA8
{ 32, 1, 1, 4, 1, 1, 0, 0 }, // RGBA8
@@ -60,7 +60,7 @@ namespace bgfx
{ 64, 1, 1, 8, 1, 1, 0, 0 }, // RGBA16
{ 64, 1, 1, 8, 1, 1, 0, 0 }, // RGBA16F
{ 64, 1, 1, 8, 1, 1, 0, 0 }, // RGBA16S
{ 128, 1, 1, 16, 1, 1, 0, 0 }, // RGBA32
{ 128, 1, 1, 16, 1, 1, 0, 0 }, // RGBA32U
{ 128, 1, 1, 16, 1, 1, 0, 0 }, // RGBA32F
{ 16, 1, 1, 2, 1, 1, 0, 0 }, // R5G6B5
{ 16, 1, 1, 2, 1, 1, 0, 0 }, // RGBA4
@@ -102,17 +102,17 @@ namespace bgfx
"R1", // R1
"R8", // R8
"R8S", // R8S
"R16", // R16
"R16U", // R16U
"R16F", // R16F
"R16S", // R16S
"R32", // R32
"R32U", // R32U
"R32F", // R32F
"RG8", // RG8
"RG8S", // RG8S
"RG16", // RG16
"RG16F", // RG16F
"RG16S", // RG16S
"RG32", // RG32
"RG32", // RG32U
"RG32F", // RG32F
"BGRA8", // BGRA8
"RGBA8", // RGBA8
@@ -120,7 +120,7 @@ namespace bgfx
"RGBA16", // RGBA16
"RGBA16F", // RGBA16F
"RGBA16S", // RGBA16S
"RGBA32", // RGBA32
"RGBA32", // RGBA32U
"RGBA32F", // RGBA32F
"R5G6B5", // R5G6B5
"RGBA4", // RGBA4
@@ -1398,14 +1398,14 @@ namespace bgfx
{ DDS_FORMAT_R1_UNORM, TextureFormat::R1, false },
{ DDS_FORMAT_R8_UNORM, TextureFormat::R8, false },
{ DDS_FORMAT_R16_UNORM, TextureFormat::R16, false },
{ DDS_FORMAT_R16_UNORM, TextureFormat::R16U, false },
{ DDS_FORMAT_R16_FLOAT, TextureFormat::R16F, false },
{ DDS_FORMAT_R32_UINT, TextureFormat::R32, false },
{ DDS_FORMAT_R32_UINT, TextureFormat::R32U, false },
{ DDS_FORMAT_R32_FLOAT, TextureFormat::R32F, false },
{ DDS_FORMAT_R8G8_UNORM, TextureFormat::RG8, false },
{ DDS_FORMAT_R16G16_UNORM, TextureFormat::RG16, false },
{ DDS_FORMAT_R16G16_FLOAT, TextureFormat::RG16F, false },
{ DDS_FORMAT_R32G32_UINT, TextureFormat::RG32, false },
{ DDS_FORMAT_R32G32_UINT, TextureFormat::RG32U, false },
{ DDS_FORMAT_R32G32_FLOAT, TextureFormat::RG32F, false },
{ DDS_FORMAT_B8G8R8A8_UNORM, TextureFormat::BGRA8, false },
{ DDS_FORMAT_B8G8R8A8_UNORM_SRGB, TextureFormat::BGRA8, true },
@@ -1413,7 +1413,7 @@ namespace bgfx
{ DDS_FORMAT_R8G8B8A8_UNORM_SRGB, TextureFormat::RGBA8, true },
{ DDS_FORMAT_R16G16B16A16_UNORM, TextureFormat::RGBA16, false },
{ DDS_FORMAT_R16G16B16A16_FLOAT, TextureFormat::RGBA16F, false },
{ DDS_FORMAT_R32G32B32A32_UINT, TextureFormat::RGBA32, false },
{ DDS_FORMAT_R32G32B32A32_UINT, TextureFormat::RGBA32U, false },
{ DDS_FORMAT_R32G32B32A32_FLOAT, TextureFormat::RGBA32F, false },
{ DDS_FORMAT_B5G6R5_UNORM, TextureFormat::R5G6B5, false },
{ DDS_FORMAT_B4G4R4A4_UNORM, TextureFormat::RGBA4, false },
@@ -1432,7 +1432,7 @@ namespace bgfx
static TranslateDdsPixelFormat s_translateDdsPixelFormat[] =
{
{ 8, { 0x000000ff, 0x00000000, 0x00000000, 0x00000000 }, TextureFormat::R8 },
{ 16, { 0x0000ffff, 0x00000000, 0x00000000, 0x00000000 }, TextureFormat::R16 },
{ 16, { 0x0000ffff, 0x00000000, 0x00000000, 0x00000000 }, TextureFormat::R16U },
{ 16, { 0x00000f00, 0x000000f0, 0x0000000f, 0x0000f000 }, TextureFormat::RGBA4 },
{ 16, { 0x0000f800, 0x000007e0, 0x0000001f, 0x00000000 }, TextureFormat::R5G6B5 },
{ 16, { 0x00007c00, 0x000003e0, 0x0000001f, 0x00008000 }, TextureFormat::RGB5A1 },
@@ -1440,7 +1440,7 @@ namespace bgfx
{ 32, { 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000 }, TextureFormat::BGRA8 },
{ 32, { 0x000003ff, 0x000ffc00, 0x3ff00000, 0xc0000000 }, TextureFormat::RGB10A2 },
{ 32, { 0x0000ffff, 0xffff0000, 0x00000000, 0x00000000 }, TextureFormat::RG16 },
{ 32, { 0xffffffff, 0x00000000, 0x00000000, 0x00000000 }, TextureFormat::R32 },
{ 32, { 0xffffffff, 0x00000000, 0x00000000, 0x00000000 }, TextureFormat::R32U },
};
bool imageParseDds(ImageContainer& _imageContainer, bx::ReaderSeekerI* _reader)
@@ -1672,17 +1672,17 @@ namespace bgfx
{ KTX_R8, TextureFormat::R8 },
{ KTX_RGBA16, TextureFormat::RGBA16 },
{ KTX_RGBA16F, TextureFormat::RGBA16F },
{ KTX_R32UI, TextureFormat::R32 },
{ KTX_R32UI, TextureFormat::R32U },
{ KTX_R32F, TextureFormat::R32F },
{ KTX_RG8, TextureFormat::RG8 },
{ KTX_RG16, TextureFormat::RG16 },
{ KTX_RG16F, TextureFormat::RG16F },
{ KTX_RG32UI, TextureFormat::RG32 },
{ KTX_RG32UI, TextureFormat::RG32U },
{ KTX_RG32F, TextureFormat::RG32F },
{ KTX_BGRA, TextureFormat::BGRA8 },
{ KTX_RGBA16, TextureFormat::RGBA16 },
{ KTX_RGBA16F, TextureFormat::RGBA16F },
{ KTX_RGBA32UI, TextureFormat::RGBA32 },
{ KTX_RGBA32UI, TextureFormat::RGBA32U },
{ KTX_RGBA32F, TextureFormat::RGBA32F },
{ KTX_RGB565, TextureFormat::R5G6B5 },
{ KTX_RGBA4, TextureFormat::RGBA4 },
@@ -1832,9 +1832,9 @@ namespace bgfx
{ PVR3_BC4, PVR3_CHANNEL_TYPE_ANY, TextureFormat::BC4 },
{ PVR3_BC5, PVR3_CHANNEL_TYPE_ANY, TextureFormat::BC5 },
{ PVR3_R8, PVR3_CHANNEL_TYPE_ANY, TextureFormat::R8 },
{ PVR3_R16, PVR3_CHANNEL_TYPE_ANY, TextureFormat::R16 },
{ PVR3_R16, PVR3_CHANNEL_TYPE_ANY, TextureFormat::R16U },
{ PVR3_R16, PVR3_CHANNEL_TYPE_FLOAT, TextureFormat::R16F },
{ PVR3_R32, PVR3_CHANNEL_TYPE_ANY, TextureFormat::R32 },
{ PVR3_R32, PVR3_CHANNEL_TYPE_ANY, TextureFormat::R32U },
{ PVR3_R32, PVR3_CHANNEL_TYPE_FLOAT, TextureFormat::R32F },
{ PVR3_RG8, PVR3_CHANNEL_TYPE_ANY, TextureFormat::RG8 },
{ PVR3_RG16, PVR3_CHANNEL_TYPE_ANY, TextureFormat::RG16 },
@@ -1844,7 +1844,7 @@ namespace bgfx
{ PVR3_BGRA8, PVR3_CHANNEL_TYPE_ANY, TextureFormat::BGRA8 },
{ PVR3_RGBA16, PVR3_CHANNEL_TYPE_ANY, TextureFormat::RGBA16 },
{ PVR3_RGBA16, PVR3_CHANNEL_TYPE_FLOAT, TextureFormat::RGBA16F },
{ PVR3_RGBA32, PVR3_CHANNEL_TYPE_ANY, TextureFormat::RGBA32 },
{ PVR3_RGBA32, PVR3_CHANNEL_TYPE_ANY, TextureFormat::RGBA32U },
{ PVR3_RGBA32, PVR3_CHANNEL_TYPE_FLOAT, TextureFormat::RGBA32F },
{ PVR3_RGB565, PVR3_CHANNEL_TYPE_ANY, TextureFormat::R5G6B5 },
{ PVR3_RGBA4, PVR3_CHANNEL_TYPE_ANY, TextureFormat::RGBA4 },