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

@ -100,17 +100,17 @@ typedef enum bgfx_texture_format
BGFX_TEXTURE_FORMAT_R1,
BGFX_TEXTURE_FORMAT_R8,
BGFX_TEXTURE_FORMAT_R8S,
BGFX_TEXTURE_FORMAT_R16,
BGFX_TEXTURE_FORMAT_R16U,
BGFX_TEXTURE_FORMAT_R16F,
BGFX_TEXTURE_FORMAT_R16S,
BGFX_TEXTURE_FORMAT_R32,
BGFX_TEXTURE_FORMAT_R32U,
BGFX_TEXTURE_FORMAT_R32F,
BGFX_TEXTURE_FORMAT_RG8,
BGFX_TEXTURE_FORMAT_RG8S,
BGFX_TEXTURE_FORMAT_RG16,
BGFX_TEXTURE_FORMAT_RG16F,
BGFX_TEXTURE_FORMAT_RG16S,
BGFX_TEXTURE_FORMAT_RG32,
BGFX_TEXTURE_FORMAT_RG32U,
BGFX_TEXTURE_FORMAT_RG32F,
BGFX_TEXTURE_FORMAT_BGRA8,
BGFX_TEXTURE_FORMAT_RGBA8,
@ -118,7 +118,7 @@ typedef enum bgfx_texture_format
BGFX_TEXTURE_FORMAT_RGBA16,
BGFX_TEXTURE_FORMAT_RGBA16F,
BGFX_TEXTURE_FORMAT_RGBA16S,
BGFX_TEXTURE_FORMAT_RGBA32,
BGFX_TEXTURE_FORMAT_RGBA32U,
BGFX_TEXTURE_FORMAT_RGBA32F,
BGFX_TEXTURE_FORMAT_R5G6B5,
BGFX_TEXTURE_FORMAT_RGBA4,

View File

@ -138,40 +138,40 @@ namespace bgfx
// Availability depends on Caps (see: formats).
enum Enum
{
BC1, // DXT1
BC2, // DXT3
BC3, // DXT5
BC4, // LATC1/ATI1
BC5, // LATC2/ATI2
BC6H, // BC6H
BC7, // BC7
ETC1, // ETC1 RGB8
ETC2, // ETC2 RGB8
ETC2A, // ETC2 RGBA8
ETC2A1, // ETC2 RGB8A1
PTC12, // PVRTC1 RGB 2BPP
PTC14, // PVRTC1 RGB 4BPP
PTC12A, // PVRTC1 RGBA 2BPP
PTC14A, // PVRTC1 RGBA 4BPP
PTC22, // PVRTC2 RGBA 2BPP
PTC24, // PVRTC2 RGBA 4BPP
BC1, // DXT1
BC2, // DXT3
BC3, // DXT5
BC4, // LATC1/ATI1
BC5, // LATC2/ATI2
BC6H, // BC6H
BC7, // BC7
ETC1, // ETC1 RGB8
ETC2, // ETC2 RGB8
ETC2A, // ETC2 RGBA8
ETC2A1, // ETC2 RGB8A1
PTC12, // PVRTC1 RGB 2BPP
PTC14, // PVRTC1 RGB 4BPP
PTC12A, // PVRTC1 RGBA 2BPP
PTC14A, // PVRTC1 RGBA 4BPP
PTC22, // PVRTC2 RGBA 2BPP
PTC24, // PVRTC2 RGBA 4BPP
Unknown, // compressed formats above
R1,
R8,
R8S,
R16,
R16F,
R16S,
R32,
R32F,
RG8,
RG8S,
RG16,
R1, // Notation:
R8, //
R8S, // RGBA16S
R16U, // ^ ^ ^
R16F, // | | +-- _ - Unorm
R16S, // | | F - Float
R32U, // | | S - Snorm
R32F, // | | I - Int
RG8, // | | U - Uint
RG8S, // | +---- Number of bits per texel
RG16, // +-------- Components
RG16F,
RG16S,
RG32,
RG32U,
RG32F,
BGRA8,
RGBA8,
@ -179,7 +179,7 @@ namespace bgfx
RGBA16,
RGBA16F,
RGBA16S,
RGBA32,
RGBA32U,
RGBA32F,
R5G6B5,
RGBA4,

View File

@ -1409,8 +1409,7 @@ namespace bgfx
: _flags
;
if (isValid(_sampler)
&& (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) || BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES) ) )
if (isValid(_sampler) )
{
uint32_t stage = _stage;
setUniform(_sampler, &stage);
@ -1446,8 +1445,7 @@ namespace bgfx
bind.m_un.m_compute.m_access = uint8_t(_access);
bind.m_un.m_compute.m_mip = _mip;
if (isValid(_sampler)
&& (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) || BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES) ) )
if (isValid(_sampler) )
{
uint32_t stage = _stage;
setUniform(_sampler, &stage);

View File

@ -273,7 +273,7 @@
#endif // BGFX_CONFIG_TRANSIENT_INDEX_BUFFER_SIZE
#ifndef BGFX_CONFIG_MAX_CONSTANT_BUFFER_SIZE
# define BGFX_CONFIG_MAX_CONSTANT_BUFFER_SIZE (512<<10)
# define BGFX_CONFIG_MAX_CONSTANT_BUFFER_SIZE (1<<20)
#endif // BGFX_CONFIG_MAX_CONSTANT_BUFFER_SIZE
#ifndef BGFX_CONFIG_MAX_INSTANCE_DATA_COUNT

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 },

View File

@ -213,17 +213,17 @@ namespace bgfx { namespace d3d11
{ DXGI_FORMAT_R1_UNORM, DXGI_FORMAT_R1_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R1
{ DXGI_FORMAT_R8_UNORM, DXGI_FORMAT_R8_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R8
{ DXGI_FORMAT_R8_SNORM, DXGI_FORMAT_R8_SNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R8S
{ DXGI_FORMAT_R16_UINT, DXGI_FORMAT_R16_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R16
{ DXGI_FORMAT_R16_UINT, DXGI_FORMAT_R16_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R16U
{ DXGI_FORMAT_R16_FLOAT, DXGI_FORMAT_R16_FLOAT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R16F
{ DXGI_FORMAT_R16_SNORM, DXGI_FORMAT_R16_SNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R16S
{ DXGI_FORMAT_R32_UINT, DXGI_FORMAT_R32_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R32
{ DXGI_FORMAT_R32_UINT, DXGI_FORMAT_R32_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R32U
{ DXGI_FORMAT_R32_FLOAT, DXGI_FORMAT_R32_FLOAT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R32F
{ DXGI_FORMAT_R8G8_UNORM, DXGI_FORMAT_R8G8_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG8
{ DXGI_FORMAT_R8G8_SNORM, DXGI_FORMAT_R8G8_SNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG8S
{ DXGI_FORMAT_R16G16_UNORM, DXGI_FORMAT_R16G16_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG16
{ DXGI_FORMAT_R16G16_FLOAT, DXGI_FORMAT_R16G16_FLOAT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG16F
{ DXGI_FORMAT_R16G16_SNORM, DXGI_FORMAT_R16G16_SNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG16S
{ DXGI_FORMAT_R32G32_UINT, DXGI_FORMAT_R32G32_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG32
{ DXGI_FORMAT_R32G32_UINT, DXGI_FORMAT_R32G32_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG32U
{ DXGI_FORMAT_R32G32_FLOAT, DXGI_FORMAT_R32G32_FLOAT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG32F
{ DXGI_FORMAT_B8G8R8A8_UNORM, DXGI_FORMAT_B8G8R8A8_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_B8G8R8A8_UNORM_SRGB }, // BGRA8
{ DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB }, // RGBA8
@ -231,7 +231,7 @@ namespace bgfx { namespace d3d11
{ DXGI_FORMAT_R16G16B16A16_UNORM, DXGI_FORMAT_R16G16B16A16_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA16
{ DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA16F
{ DXGI_FORMAT_R16G16B16A16_SNORM, DXGI_FORMAT_R16G16B16A16_SNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA16S
{ DXGI_FORMAT_R32G32B32A32_UINT, DXGI_FORMAT_R32G32B32A32_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA32
{ DXGI_FORMAT_R32G32B32A32_UINT, DXGI_FORMAT_R32G32B32A32_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA32U
{ DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA32F
{ DXGI_FORMAT_B5G6R5_UNORM, DXGI_FORMAT_B5G6R5_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R5G6B5
{ DXGI_FORMAT_B4G4R4A4_UNORM, DXGI_FORMAT_B4G4R4A4_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA4

View File

@ -197,17 +197,17 @@ namespace bgfx { namespace d3d12
{ DXGI_FORMAT_R1_UNORM, DXGI_FORMAT_R1_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R1
{ DXGI_FORMAT_R8_UNORM, DXGI_FORMAT_R8_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R8
{ DXGI_FORMAT_R8_SNORM, DXGI_FORMAT_R8_SNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R8S
{ DXGI_FORMAT_R16_UNORM, DXGI_FORMAT_R16_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R16
{ DXGI_FORMAT_R16_UNORM, DXGI_FORMAT_R16_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R16U
{ DXGI_FORMAT_R16_FLOAT, DXGI_FORMAT_R16_FLOAT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R16F
{ DXGI_FORMAT_R16_SNORM, DXGI_FORMAT_R16_SNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R16S
{ DXGI_FORMAT_R32_UINT, DXGI_FORMAT_R32_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R32
{ DXGI_FORMAT_R32_UINT, DXGI_FORMAT_R32_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R32U
{ DXGI_FORMAT_R32_FLOAT, DXGI_FORMAT_R32_FLOAT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R32F
{ DXGI_FORMAT_R8G8_UNORM, DXGI_FORMAT_R8G8_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG8
{ DXGI_FORMAT_R8G8_SNORM, DXGI_FORMAT_R8G8_SNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG8S
{ DXGI_FORMAT_R16G16_UNORM, DXGI_FORMAT_R16G16_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG16
{ DXGI_FORMAT_R16G16_FLOAT, DXGI_FORMAT_R16G16_FLOAT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG16F
{ DXGI_FORMAT_R16G16_SNORM, DXGI_FORMAT_R16G16_SNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG16S
{ DXGI_FORMAT_R32G32_UINT, DXGI_FORMAT_R32G32_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG32
{ DXGI_FORMAT_R32G32_UINT, DXGI_FORMAT_R32G32_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG32U
{ DXGI_FORMAT_R32G32_FLOAT, DXGI_FORMAT_R32G32_FLOAT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG32F
{ DXGI_FORMAT_B8G8R8A8_UNORM, DXGI_FORMAT_B8G8R8A8_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_B8G8R8A8_UNORM_SRGB }, // BGRA8
{ DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB }, // RGBA8
@ -215,7 +215,7 @@ namespace bgfx { namespace d3d12
{ DXGI_FORMAT_R16G16B16A16_UNORM, DXGI_FORMAT_R16G16B16A16_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA16
{ DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA16F
{ DXGI_FORMAT_R16G16B16A16_SNORM, DXGI_FORMAT_R16G16B16A16_SNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA16S
{ DXGI_FORMAT_R32G32B32A32_UINT, DXGI_FORMAT_R32G32B32A32_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA32
{ DXGI_FORMAT_R32G32B32A32_UINT, DXGI_FORMAT_R32G32B32A32_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA32U
{ DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA32F
{ DXGI_FORMAT_B5G6R5_UNORM, DXGI_FORMAT_B5G6R5_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R5G6B5
{ DXGI_FORMAT_B4G4R4A4_UNORM, DXGI_FORMAT_B4G4R4A4_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA4

View File

@ -210,17 +210,17 @@ namespace bgfx { namespace d3d9
{ D3DFMT_A1 }, // R1
{ D3DFMT_L8 }, // R8
{ D3DFMT_UNKNOWN }, // R8S
{ D3DFMT_G16R16 }, // R16
{ D3DFMT_G16R16 }, // R16U
{ D3DFMT_R16F }, // R16F
{ D3DFMT_UNKNOWN }, // R16S
{ D3DFMT_UNKNOWN }, // R32
{ D3DFMT_UNKNOWN }, // R32U
{ D3DFMT_R32F }, // R32F
{ D3DFMT_A8L8 }, // RG8
{ D3DFMT_UNKNOWN }, // RG8S
{ D3DFMT_G16R16 }, // RG16
{ D3DFMT_G16R16F }, // RG16F
{ D3DFMT_UNKNOWN }, // RG16S
{ D3DFMT_UNKNOWN }, // RG32
{ D3DFMT_UNKNOWN }, // RG32U
{ D3DFMT_G32R32F }, // RG32F
{ D3DFMT_A8R8G8B8 }, // BGRA8
{ D3DFMT_UNKNOWN }, // RGBA8
@ -228,7 +228,7 @@ namespace bgfx { namespace d3d9
{ D3DFMT_A16B16G16R16 }, // RGBA16
{ D3DFMT_A16B16G16R16F }, // RGBA16F
{ D3DFMT_UNKNOWN }, // RGBA16S
{ D3DFMT_UNKNOWN }, // RGBA32
{ D3DFMT_UNKNOWN }, // RGBA32U
{ D3DFMT_A32B32G32R32F }, // RGBA32F
{ D3DFMT_R5G6B5 }, // R5G6B5
{ D3DFMT_A4R4G4B4 }, // RGBA4

View File

@ -208,17 +208,17 @@ namespace bgfx { namespace gl
{ GL_ZERO, GL_ZERO, GL_ZERO, GL_ZERO, false }, // R1
{ GL_R8, GL_ZERO, GL_RED, GL_UNSIGNED_BYTE, false }, // R8
{ GL_R8_SNORM, GL_ZERO, GL_RED, GL_BYTE, false }, // R8S
{ GL_R16, GL_ZERO, GL_RED, GL_UNSIGNED_SHORT, false }, // R16
{ GL_R16, GL_ZERO, GL_RED, GL_UNSIGNED_SHORT, false }, // R16U
{ GL_R16F, GL_ZERO, GL_RED, GL_HALF_FLOAT, false }, // R16F
{ GL_R16_SNORM, GL_ZERO, GL_RED, GL_SHORT, false }, // R16S
{ GL_R32UI, GL_ZERO, GL_RED, GL_UNSIGNED_INT, false }, // R32
{ GL_R32UI, GL_ZERO, GL_RED, GL_UNSIGNED_INT, false }, // R32U
{ GL_R32F, GL_ZERO, GL_RED, GL_FLOAT, false }, // R32F
{ GL_RG8, GL_ZERO, GL_RG, GL_UNSIGNED_BYTE, false }, // RG8
{ GL_RG8_SNORM, GL_ZERO, GL_RG, GL_BYTE, false }, // RG8S
{ GL_RG16, GL_ZERO, GL_RG, GL_UNSIGNED_SHORT, false }, // RG16
{ GL_RG16F, GL_ZERO, GL_RG, GL_FLOAT, false }, // RG16F
{ GL_RG16_SNORM, GL_ZERO, GL_RG, GL_SHORT, false }, // RG16S
{ GL_RG32UI, GL_ZERO, GL_RG, GL_UNSIGNED_INT, false }, // RG32
{ GL_RG32UI, GL_ZERO, GL_RG, GL_UNSIGNED_INT, false }, // RG32U
{ GL_RG32F, GL_ZERO, GL_RG, GL_FLOAT, false }, // RG32F
{ GL_RGBA8, GL_SRGB8_ALPHA8, GL_BGRA, GL_UNSIGNED_BYTE, false }, // BGRA8
{ GL_RGBA8, GL_SRGB8_ALPHA8, GL_RGBA, GL_UNSIGNED_BYTE, false }, // RGBA8
@ -226,7 +226,7 @@ namespace bgfx { namespace gl
{ GL_RGBA16, GL_ZERO, GL_RGBA, GL_UNSIGNED_SHORT, false }, // RGBA16
{ GL_RGBA16F, GL_ZERO, GL_RGBA, GL_HALF_FLOAT, false }, // RGBA16F
{ GL_RGBA16_SNORM, GL_ZERO, GL_RGBA, GL_SHORT, false }, // RGBA16S
{ GL_RGBA32UI, GL_ZERO, GL_RGBA, GL_UNSIGNED_INT, false }, // RGBA32
{ GL_RGBA32UI, GL_ZERO, GL_RGBA, GL_UNSIGNED_INT, false }, // RGBA32U
{ GL_RGBA32F, GL_ZERO, GL_RGBA, GL_FLOAT, false }, // RGBA32F
{ GL_RGB565, GL_ZERO, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, false }, // R5G6B5
{ GL_RGBA4, GL_ZERO, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, false }, // RGBA4
@ -270,17 +270,17 @@ namespace bgfx { namespace gl
GL_ZERO, // R1
GL_R8, // R8
GL_R8_SNORM, // R8S
GL_R16, // R16
GL_R16, // R16U
GL_R16F, // R16F
GL_R16_SNORM, // R16S
GL_R32UI, // R32
GL_R32UI, // R32U
GL_R32F, // R32F
GL_RG8, // RG8
GL_RG8_SNORM, // RG8S
GL_RG16, // RG16
GL_RG16F, // RG16F
GL_RG16_SNORM, // RG16S
GL_RG32UI, // RG32
GL_RG32UI, // RG32U
GL_RG32F, // RG32F
GL_RGBA8, // BGRA8
GL_RGBA8, // RGBA8
@ -288,7 +288,7 @@ namespace bgfx { namespace gl
GL_RGBA16, // RGBA16
GL_RGBA16F, // RGBA16F
GL_RGBA16_SNORM, // RGBA16S
GL_RGBA32UI, // RGBA32
GL_RGBA32UI, // RGBA32U
GL_RGBA32F, // RGBA32F
GL_RGB565, // R5G6B5
GL_RGBA4, // RGBA4
@ -330,17 +330,17 @@ namespace bgfx { namespace gl
GL_ZERO, // R1
GL_R8, // R8
GL_R8_SNORM, // R8S
GL_R16, // R16
GL_R16, // R16U
GL_R16F, // R16F
GL_R16_SNORM, // R16S
GL_R32UI, // R32
GL_R32UI, // R32U
GL_R32F, // R32F
GL_RG8, // RG8
GL_RG8_SNORM, // RG8S
GL_RG16, // RG16
GL_RG16F, // RG16F
GL_RG16_SNORM, // RG16S
GL_RG32UI, // RG32
GL_RG32UI, // RG32U
GL_RG32F, // RG32F
GL_RGBA8, // BGRA8
GL_RGBA8, // RGBA8
@ -348,7 +348,7 @@ namespace bgfx { namespace gl
GL_RGBA16, // RGBA16
GL_RGBA16F, // RGBA16F
GL_RGBA16_SNORM, // RGBA16S
GL_RGBA32UI, // RGBA32
GL_RGBA32UI, // RGBA32U
GL_RGBA32F, // RGBA32F
GL_RGB565, // R5G6B5
GL_RGBA4, // RGBA4
@ -1451,12 +1451,12 @@ namespace bgfx { namespace gl
if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL)
|| BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 30) )
{
setTextureFormat(TextureFormat::R16, GL_R16UI, GL_RED_INTEGER, GL_UNSIGNED_SHORT);
setTextureFormat(TextureFormat::RG16, GL_RG16UI, GL_RG_INTEGER, GL_UNSIGNED_SHORT);
setTextureFormat(TextureFormat::RGBA16, GL_RGBA16UI, GL_RGBA_INTEGER, GL_UNSIGNED_SHORT);
setTextureFormat(TextureFormat::R32, GL_R32UI, GL_RED_INTEGER, GL_UNSIGNED_INT);
setTextureFormat(TextureFormat::RG32, GL_RG32UI, GL_RG_INTEGER, GL_UNSIGNED_INT);
setTextureFormat(TextureFormat::RGBA32, GL_RGBA32UI, GL_RGBA_INTEGER, GL_UNSIGNED_INT);
setTextureFormat(TextureFormat::R16U, GL_R16UI, GL_RED_INTEGER, GL_UNSIGNED_SHORT);
setTextureFormat(TextureFormat::RG16, GL_RG16UI, GL_RG_INTEGER, GL_UNSIGNED_SHORT);
setTextureFormat(TextureFormat::RGBA16, GL_RGBA16UI, GL_RGBA_INTEGER, GL_UNSIGNED_SHORT);
setTextureFormat(TextureFormat::R32U, GL_R32UI, GL_RED_INTEGER, GL_UNSIGNED_INT);
setTextureFormat(TextureFormat::RG32U, GL_RG32UI, GL_RG_INTEGER, GL_UNSIGNED_INT);
setTextureFormat(TextureFormat::RGBA32U, GL_RGBA32UI, GL_RGBA_INTEGER, GL_UNSIGNED_INT);
}
if (s_extension[Extension::EXT_texture_format_BGRA8888 ].m_supported