Updated texture format with new compressed formats.

This commit is contained in:
Branimir Karadžić 2018-06-11 09:17:57 -07:00
parent 25f65ce78c
commit 5995b27015
7 changed files with 84 additions and 0 deletions

View File

@ -173,6 +173,15 @@ namespace bgfx
PTC14A, //!< PVRTC1 RGBA 4BPP
PTC22, //!< PVRTC2 RGBA 2BPP
PTC24, //!< PVRTC2 RGBA 4BPP
ATC, //!< ATC RGB 4BPP
ATCE, //!< ATCE RGBA 8 BPP explicit alpha
ATCI, //!< ATCI RGBA 8 BPP interpolated alpha
ASTC4x4, //!< ASTC 4x4 8.0 BPP
ASTC5x5, //!< ASTC 5x5 5.12 BPP
ASTC6x6, //!< ASTC 6x6 3.56 BPP
ASTC8x5, //!< ASTC 8x5 3.20 BPP
ASTC8x6, //!< ASTC 8x6 2.67 BPP
ASTC10x5, //!< ASTC 10x5 2.56 BPP
Unknown, // Compressed formats above.

View File

@ -129,6 +129,15 @@ typedef enum bgfx_texture_format
BGFX_TEXTURE_FORMAT_PTC14A,
BGFX_TEXTURE_FORMAT_PTC22,
BGFX_TEXTURE_FORMAT_PTC24,
BGFX_TEXTURE_FORMAT_ATC,
BGFX_TEXTURE_FORMAT_ATCE,
BGFX_TEXTURE_FORMAT_ATCI,
BGFX_TEXTURE_FORMAT_ASTC4x4,
BGFX_TEXTURE_FORMAT_ASTC5x5,
BGFX_TEXTURE_FORMAT_ASTC6x6,
BGFX_TEXTURE_FORMAT_ASTC8x5,
BGFX_TEXTURE_FORMAT_ASTC8x6,
BGFX_TEXTURE_FORMAT_ASTC10x5,
BGFX_TEXTURE_FORMAT_UNKNOWN,

View File

@ -208,6 +208,16 @@ namespace bgfx { namespace d3d11
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // PTC14A
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // PTC22
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // PTC24
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ATC
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ATCE
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ATCI
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ASTC4x4
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ASTC5x5
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ASTC6x6
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ASTC8x5
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ASTC8x6
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ASTC10x5
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // Unknown
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // Unknown
{ DXGI_FORMAT_R1_UNORM, DXGI_FORMAT_R1_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R1
{ DXGI_FORMAT_A8_UNORM, DXGI_FORMAT_A8_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // A8

View File

@ -195,6 +195,16 @@ namespace bgfx { namespace d3d12
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // PTC14A
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // PTC22
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // PTC24
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // PTC24
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ATC
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ATCE
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ATCI
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ASTC4x4
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ASTC5x5
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ASTC6x6
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ASTC8x5
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ASTC8x6
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // ASTC10x5
{ DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // Unknown
{ DXGI_FORMAT_R1_UNORM, DXGI_FORMAT_R1_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R1
{ DXGI_FORMAT_A8_UNORM, DXGI_FORMAT_A8_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // A8

View File

@ -180,6 +180,15 @@ namespace bgfx { namespace d3d9
{ D3DFMT_UNKNOWN }, // PTC14A
{ D3DFMT_UNKNOWN }, // PTC22
{ D3DFMT_UNKNOWN }, // PTC24
{ D3DFMT_UNKNOWN }, // ATC,
{ D3DFMT_UNKNOWN }, // ATCE,
{ D3DFMT_UNKNOWN }, // ATCI,
{ D3DFMT_UNKNOWN }, // ASTC4x4,
{ D3DFMT_UNKNOWN }, // ASTC5x5,
{ D3DFMT_UNKNOWN }, // ASTC6x6,
{ D3DFMT_UNKNOWN }, // ASTC8x5,
{ D3DFMT_UNKNOWN }, // ASTC8x6,
{ D3DFMT_UNKNOWN }, // ASTC10x5,
{ D3DFMT_UNKNOWN }, // Unknown
{ D3DFMT_A1 }, // R1
{ D3DFMT_A8 }, // A8

View File

@ -202,6 +202,16 @@ namespace bgfx { namespace gl
{ GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG, GL_ZERO, GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG, GL_ZERO, false }, // PTC22
{ GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG, GL_ZERO, GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG, GL_ZERO, false }, // PTC24
{ GL_ZERO, GL_ZERO, GL_ZERO, GL_ZERO, false }, // Unknown
{ GL_ZERO, GL_ZERO, GL_ZERO, GL_ZERO, false }, // ATC
{ GL_ZERO, GL_ZERO, GL_ZERO, GL_ZERO, false }, // ATCE
{ GL_ZERO, GL_ZERO, GL_ZERO, GL_ZERO, false }, // ATCI
{ GL_ZERO, GL_ZERO, GL_ZERO, GL_ZERO, false }, // ASTC4x4
{ GL_ZERO, GL_ZERO, GL_ZERO, GL_ZERO, false }, // ASTC5x5
{ GL_ZERO, GL_ZERO, GL_ZERO, GL_ZERO, false }, // ASTC6x6
{ GL_ZERO, GL_ZERO, GL_ZERO, GL_ZERO, false }, // ASTC8x5
{ GL_ZERO, GL_ZERO, GL_ZERO, GL_ZERO, false }, // ASTC8x6
{ GL_ZERO, GL_ZERO, GL_ZERO, GL_ZERO, false }, // ASTC10x5
{ GL_ZERO, GL_ZERO, GL_ZERO, GL_ZERO, false }, // R1
{ GL_ALPHA, GL_ZERO, GL_ALPHA, GL_UNSIGNED_BYTE, false }, // A8
{ GL_R8, GL_ZERO, GL_RED, GL_UNSIGNED_BYTE, false }, // R8
@ -284,6 +294,15 @@ namespace bgfx { namespace gl
GL_ZERO, // PTC14A
GL_ZERO, // PTC22
GL_ZERO, // PTC24
GL_ZERO, // ATC
GL_ZERO, // ATCE
GL_ZERO, // ATCI
GL_ZERO, // ASTC4x4
GL_ZERO, // ASTC5x5
GL_ZERO, // ASTC6x6
GL_ZERO, // ASTC8x5
GL_ZERO, // ASTC8x6
GL_ZERO, // ASTC10x5
GL_ZERO, // Unknown
GL_ZERO, // R1
GL_ALPHA, // A8
@ -365,6 +384,15 @@ namespace bgfx { namespace gl
GL_ZERO, // PTC14A
GL_ZERO, // PTC22
GL_ZERO, // PTC24
GL_ZERO, // ATC
GL_ZERO, // ATCE
GL_ZERO, // ATCI
GL_ZERO, // ASTC4x4
GL_ZERO, // ASTC5x5
GL_ZERO, // ASTC6x6
GL_ZERO, // ASTC8x5
GL_ZERO, // ASTC8x6
GL_ZERO, // ASTC10x5
GL_ZERO, // Unknown
GL_ZERO, // R1
GL_ALPHA, // A8

View File

@ -153,6 +153,15 @@ VK_IMPORT_DEVICE
{ VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // PTC14A
{ VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // PTC22
{ VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // PTC24
{ VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // ATC
{ VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // ATCE
{ VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // ATCI
{ VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // ASTC4x4
{ VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // ASTC5x5
{ VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // ASTC6x6
{ VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // ASTC8x5
{ VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // ASTC8x6
{ VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // ASTC10x5
{ VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // Unknown
{ VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // R1
{ VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // A8