mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 00:58:30 -05:00
Moar texture formats...
This commit is contained in:
parent
ece46d71bc
commit
444384469d
8 changed files with 153 additions and 20 deletions
|
@ -99,23 +99,35 @@ typedef enum bgfx_texture_format
|
|||
|
||||
BGFX_TEXTURE_FORMAT_R1,
|
||||
BGFX_TEXTURE_FORMAT_R8,
|
||||
BGFX_TEXTURE_FORMAT_R8I,
|
||||
BGFX_TEXTURE_FORMAT_R8U,
|
||||
BGFX_TEXTURE_FORMAT_R8S,
|
||||
BGFX_TEXTURE_FORMAT_R16,
|
||||
BGFX_TEXTURE_FORMAT_R16I,
|
||||
BGFX_TEXTURE_FORMAT_R16U,
|
||||
BGFX_TEXTURE_FORMAT_R16F,
|
||||
BGFX_TEXTURE_FORMAT_R16S,
|
||||
BGFX_TEXTURE_FORMAT_R32U,
|
||||
BGFX_TEXTURE_FORMAT_R32F,
|
||||
BGFX_TEXTURE_FORMAT_RG8,
|
||||
BGFX_TEXTURE_FORMAT_RG8I,
|
||||
BGFX_TEXTURE_FORMAT_RG8U,
|
||||
BGFX_TEXTURE_FORMAT_RG8S,
|
||||
BGFX_TEXTURE_FORMAT_RG16,
|
||||
BGFX_TEXTURE_FORMAT_RG16I,
|
||||
BGFX_TEXTURE_FORMAT_RG16U,
|
||||
BGFX_TEXTURE_FORMAT_RG16F,
|
||||
BGFX_TEXTURE_FORMAT_RG16S,
|
||||
BGFX_TEXTURE_FORMAT_RG32U,
|
||||
BGFX_TEXTURE_FORMAT_RG32F,
|
||||
BGFX_TEXTURE_FORMAT_BGRA8,
|
||||
BGFX_TEXTURE_FORMAT_RGBA8,
|
||||
BGFX_TEXTURE_FORMAT_RGBA8I,
|
||||
BGFX_TEXTURE_FORMAT_RGBA8U,
|
||||
BGFX_TEXTURE_FORMAT_RGBA8S,
|
||||
BGFX_TEXTURE_FORMAT_RGBA16,
|
||||
BGFX_TEXTURE_FORMAT_RGBA16I,
|
||||
BGFX_TEXTURE_FORMAT_RGBA16U,
|
||||
BGFX_TEXTURE_FORMAT_RGBA16F,
|
||||
BGFX_TEXTURE_FORMAT_RGBA16S,
|
||||
BGFX_TEXTURE_FORMAT_RGBA32U,
|
||||
|
|
|
@ -160,23 +160,35 @@ namespace bgfx
|
|||
|
||||
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
|
||||
R8I, // RGBA16S
|
||||
R8U, // ^ ^ ^
|
||||
R8S, // | | +-- [ ]Unorm
|
||||
R16, // | | [F]loat
|
||||
R16I, // | | [S]norm
|
||||
R16U, // | | [I]nt
|
||||
R16F, // | | [U]int
|
||||
R16S, // | +---- Number of bits per texel
|
||||
R32U, // +-------- Components
|
||||
R32F,
|
||||
RG8,
|
||||
RG8I,
|
||||
RG8U,
|
||||
RG8S,
|
||||
RG16,
|
||||
RG16I,
|
||||
RG16U,
|
||||
RG16F,
|
||||
RG16S,
|
||||
RG32U,
|
||||
RG32F,
|
||||
BGRA8,
|
||||
RGBA8,
|
||||
RGBA8I,
|
||||
RGBA8U,
|
||||
RGBA8S,
|
||||
RGBA16,
|
||||
RGBA16I,
|
||||
RGBA16U,
|
||||
RGBA16F,
|
||||
RGBA16S,
|
||||
RGBA32U,
|
||||
|
|
|
@ -41,23 +41,35 @@ namespace bgfx
|
|||
{ 0, 0, 0, 0, 1, 1, 0, 0 }, // Unknown
|
||||
{ 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 }, // R8I
|
||||
{ 8, 1, 1, 1, 1, 1, 0, 0 }, // R8U
|
||||
{ 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 }, // R16I
|
||||
{ 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 }, // 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 }, // RG8I
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0 }, // RG8U
|
||||
{ 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 }, // RG16I
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0 }, // RG16U
|
||||
{ 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 }, // 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
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0 }, // RGBA8I
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0 }, // RGBA8U
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0 }, // RGBA8S
|
||||
{ 64, 1, 1, 8, 1, 1, 0, 0 }, // RGBA16
|
||||
{ 64, 1, 1, 8, 1, 1, 0, 0 }, // RGBA16I
|
||||
{ 64, 1, 1, 8, 1, 1, 0, 0 }, // RGBA16U
|
||||
{ 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 }, // RGBA32U
|
||||
|
@ -101,23 +113,35 @@ namespace bgfx
|
|||
"<unknown>", // Unknown
|
||||
"R1", // R1
|
||||
"R8", // R8
|
||||
"R8I", // R8I
|
||||
"R8U", // R8U
|
||||
"R8S", // R8S
|
||||
"R16", // R16
|
||||
"R16I", // R16I
|
||||
"R16U", // R16U
|
||||
"R16F", // R16F
|
||||
"R16S", // R16S
|
||||
"R32U", // R32U
|
||||
"R32F", // R32F
|
||||
"RG8", // RG8
|
||||
"RG8I", // RG8I
|
||||
"RG8U", // RG8U
|
||||
"RG8S", // RG8S
|
||||
"RG16", // RG16
|
||||
"RG16I", // RG16I
|
||||
"RG16U", // RG16U
|
||||
"RG16F", // RG16F
|
||||
"RG16S", // RG16S
|
||||
"RG32", // RG32U
|
||||
"RG32F", // RG32F
|
||||
"BGRA8", // BGRA8
|
||||
"RGBA8", // RGBA8
|
||||
"RGBA8I", // RGBA8I
|
||||
"RGBA8U", // RGBA8U
|
||||
"RGBA8S", // RGBA8S
|
||||
"RGBA16", // RGBA16
|
||||
"RGBA16I", // RGBA16I
|
||||
"RGBA16U", // RGBA16U
|
||||
"RGBA16F", // RGBA16F
|
||||
"RGBA16S", // RGBA16S
|
||||
"RGBA32", // RGBA32U
|
||||
|
@ -1398,7 +1422,7 @@ namespace bgfx
|
|||
|
||||
{ DDS_FORMAT_R1_UNORM, TextureFormat::R1, false },
|
||||
{ DDS_FORMAT_R8_UNORM, TextureFormat::R8, false },
|
||||
{ DDS_FORMAT_R16_UNORM, TextureFormat::R16U, false },
|
||||
{ DDS_FORMAT_R16_UNORM, TextureFormat::R16, false },
|
||||
{ DDS_FORMAT_R16_FLOAT, TextureFormat::R16F, false },
|
||||
{ DDS_FORMAT_R32_UINT, TextureFormat::R32U, false },
|
||||
{ DDS_FORMAT_R32_FLOAT, TextureFormat::R32F, false },
|
||||
|
|
|
@ -212,23 +212,35 @@ namespace bgfx { namespace d3d11
|
|||
{ 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_R8_UNORM, DXGI_FORMAT_R8_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R8
|
||||
{ DXGI_FORMAT_R8_SINT, DXGI_FORMAT_R8_SINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R8I
|
||||
{ DXGI_FORMAT_R8_UINT, DXGI_FORMAT_R8_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R8U
|
||||
{ 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_SINT, DXGI_FORMAT_R16_SINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R16I
|
||||
{ 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 }, // 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_SINT, DXGI_FORMAT_R8G8_SINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG8I
|
||||
{ DXGI_FORMAT_R8G8_UINT, DXGI_FORMAT_R8G8_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG8U
|
||||
{ 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_SINT, DXGI_FORMAT_R16G16_SINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG16I
|
||||
{ DXGI_FORMAT_R16G16_UINT, DXGI_FORMAT_R16G16_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG16U
|
||||
{ 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 }, // 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
|
||||
{ DXGI_FORMAT_R8G8B8A8_SINT, DXGI_FORMAT_R8G8B8A8_SINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB }, // RGBA8I
|
||||
{ DXGI_FORMAT_R8G8B8A8_UINT, DXGI_FORMAT_R8G8B8A8_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB }, // RGBA8U
|
||||
{ DXGI_FORMAT_R8G8B8A8_SNORM, DXGI_FORMAT_R8G8B8A8_SNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA8S
|
||||
{ DXGI_FORMAT_R16G16B16A16_UNORM, DXGI_FORMAT_R16G16B16A16_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA16
|
||||
{ DXGI_FORMAT_R16G16B16A16_SINT, DXGI_FORMAT_R16G16B16A16_SINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA16I
|
||||
{ DXGI_FORMAT_R16G16B16A16_UINT, DXGI_FORMAT_R16G16B16A16_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA16U
|
||||
{ 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 }, // RGBA32U
|
||||
|
|
|
@ -196,23 +196,35 @@ namespace bgfx { namespace d3d12
|
|||
{ 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_R8_UNORM, DXGI_FORMAT_R8_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R8
|
||||
{ DXGI_FORMAT_R8_SINT, DXGI_FORMAT_R8_SINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R8I
|
||||
{ DXGI_FORMAT_R8_UINT, DXGI_FORMAT_R8_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R8U
|
||||
{ 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_SINT, DXGI_FORMAT_R16_SINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R16I
|
||||
{ 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 }, // 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_SINT, DXGI_FORMAT_R8G8_SINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG8I
|
||||
{ DXGI_FORMAT_R8G8_UINT, DXGI_FORMAT_R8G8_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG8U
|
||||
{ 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_SINT, DXGI_FORMAT_R16G16_SINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG16I
|
||||
{ DXGI_FORMAT_R16G16_UINT, DXGI_FORMAT_R16G16_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG16U
|
||||
{ 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 }, // 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
|
||||
{ DXGI_FORMAT_R8G8B8A8_SINT, DXGI_FORMAT_R8G8B8A8_SINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB }, // RGBA8I
|
||||
{ DXGI_FORMAT_R8G8B8A8_UINT, DXGI_FORMAT_R8G8B8A8_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB }, // RGBA8U
|
||||
{ DXGI_FORMAT_R8G8B8A8_SNORM, DXGI_FORMAT_R8G8B8A8_SNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA8S
|
||||
{ DXGI_FORMAT_R16G16B16A16_UNORM, DXGI_FORMAT_R16G16B16A16_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA16
|
||||
{ DXGI_FORMAT_R16G16B16A16_SINT, DXGI_FORMAT_R16G16B16A16_SINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA16I
|
||||
{ DXGI_FORMAT_R16G16B16A16_UINT, DXGI_FORMAT_R16G16B16A16_UINT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA16U
|
||||
{ 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 }, // RGBA32U
|
||||
|
|
|
@ -209,23 +209,35 @@ namespace bgfx { namespace d3d9
|
|||
{ D3DFMT_UNKNOWN }, // Unknown
|
||||
{ D3DFMT_A1 }, // R1
|
||||
{ D3DFMT_L8 }, // R8
|
||||
{ D3DFMT_UNKNOWN }, // R8I
|
||||
{ D3DFMT_UNKNOWN }, // R8U
|
||||
{ D3DFMT_UNKNOWN }, // R8S
|
||||
{ D3DFMT_G16R16 }, // R16U
|
||||
{ D3DFMT_L16 }, // R16
|
||||
{ D3DFMT_UNKNOWN }, // R16I
|
||||
{ D3DFMT_UNKNOWN }, // R16U
|
||||
{ D3DFMT_R16F }, // R16F
|
||||
{ D3DFMT_UNKNOWN }, // R16S
|
||||
{ D3DFMT_UNKNOWN }, // R32U
|
||||
{ D3DFMT_R32F }, // R32F
|
||||
{ D3DFMT_A8L8 }, // RG8
|
||||
{ D3DFMT_UNKNOWN }, // RG8I
|
||||
{ D3DFMT_UNKNOWN }, // RG8U
|
||||
{ D3DFMT_UNKNOWN }, // RG8S
|
||||
{ D3DFMT_G16R16 }, // RG16
|
||||
{ D3DFMT_UNKNOWN }, // RG16I
|
||||
{ D3DFMT_UNKNOWN }, // RG16U
|
||||
{ D3DFMT_G16R16F }, // RG16F
|
||||
{ D3DFMT_UNKNOWN }, // RG16S
|
||||
{ D3DFMT_UNKNOWN }, // RG32U
|
||||
{ D3DFMT_G32R32F }, // RG32F
|
||||
{ D3DFMT_A8R8G8B8 }, // BGRA8
|
||||
{ D3DFMT_UNKNOWN }, // RGBA8
|
||||
{ D3DFMT_UNKNOWN }, // RGBA8I
|
||||
{ D3DFMT_UNKNOWN }, // RGBA8U
|
||||
{ D3DFMT_UNKNOWN }, // RGBA8S
|
||||
{ D3DFMT_A16B16G16R16 }, // RGBA16
|
||||
{ D3DFMT_UNKNOWN }, // RGBA16I
|
||||
{ D3DFMT_UNKNOWN }, // RGBA16U
|
||||
{ D3DFMT_A16B16G16R16F }, // RGBA16F
|
||||
{ D3DFMT_UNKNOWN }, // RGBA16S
|
||||
{ D3DFMT_UNKNOWN }, // RGBA32U
|
||||
|
|
|
@ -207,23 +207,35 @@ namespace bgfx { namespace gl
|
|||
{ GL_ZERO, GL_ZERO, GL_ZERO, GL_ZERO, false }, // Unknown
|
||||
{ GL_ZERO, GL_ZERO, GL_ZERO, GL_ZERO, false }, // R1
|
||||
{ GL_R8, GL_ZERO, GL_RED, GL_UNSIGNED_BYTE, false }, // R8
|
||||
{ GL_R8I, GL_ZERO, GL_RED, GL_BYTE, false }, // R8S
|
||||
{ GL_R8UI, GL_ZERO, GL_RED, GL_UNSIGNED_BYTE, false }, // R8S
|
||||
{ GL_R8_SNORM, GL_ZERO, GL_RED, GL_BYTE, false }, // R8S
|
||||
{ GL_R16, GL_ZERO, GL_RED, GL_UNSIGNED_SHORT, false }, // R16U
|
||||
{ GL_R16, GL_ZERO, GL_RED, GL_UNSIGNED_SHORT, false }, // R16
|
||||
{ GL_R16I, GL_ZERO, GL_RED, GL_SHORT, false }, // R16I
|
||||
{ GL_R16UI, 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 }, // R32U
|
||||
{ GL_R32F, GL_ZERO, GL_RED, GL_FLOAT, false }, // R32F
|
||||
{ GL_RG8, GL_ZERO, GL_RG, GL_UNSIGNED_BYTE, false }, // RG8
|
||||
{ GL_RG8I, GL_ZERO, GL_RG, GL_BYTE, false }, // RG8I
|
||||
{ GL_RG8UI, GL_ZERO, GL_RG, GL_UNSIGNED_BYTE, false }, // RG8U
|
||||
{ GL_RG8_SNORM, GL_ZERO, GL_RG, GL_BYTE, false }, // RG8S
|
||||
{ GL_RG16, GL_ZERO, GL_RG, GL_UNSIGNED_SHORT, false }, // RG16
|
||||
{ GL_RG16I, GL_ZERO, GL_RG, GL_SHORT, false }, // RG16
|
||||
{ GL_RG16UI, 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 }, // 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
|
||||
{ GL_RGBA8I, GL_ZERO, GL_RGBA, GL_BYTE, false }, // RGBA8I
|
||||
{ GL_RGBA8UI, GL_ZERO, GL_RGBA, GL_UNSIGNED_BYTE, false }, // RGBA8U
|
||||
{ GL_RGBA8_SNORM, GL_ZERO, GL_RGBA, GL_BYTE, false }, // RGBA8S
|
||||
{ GL_RGBA16, GL_ZERO, GL_RGBA, GL_UNSIGNED_SHORT, false }, // RGBA16
|
||||
{ GL_RGBA16I, GL_ZERO, GL_RGBA, GL_SHORT, false }, // RGBA16I
|
||||
{ GL_RGBA16UI, GL_ZERO, GL_RGBA, GL_UNSIGNED_SHORT, false }, // RGBA16U
|
||||
{ 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 }, // RGBA32U
|
||||
|
@ -269,23 +281,35 @@ namespace bgfx { namespace gl
|
|||
GL_ZERO, // Unknown
|
||||
GL_ZERO, // R1
|
||||
GL_R8, // R8
|
||||
GL_R8I, // R8I
|
||||
GL_R8UI, // R8U
|
||||
GL_R8_SNORM, // R8S
|
||||
GL_R16, // R16U
|
||||
GL_R16, // R16
|
||||
GL_R16I, // R16I
|
||||
GL_R16UI, // R16U
|
||||
GL_R16F, // R16F
|
||||
GL_R16_SNORM, // R16S
|
||||
GL_R32UI, // R32U
|
||||
GL_R32F, // R32F
|
||||
GL_RG8, // RG8
|
||||
GL_RG8I, // RG8I
|
||||
GL_RG8UI, // RG8U
|
||||
GL_RG8_SNORM, // RG8S
|
||||
GL_RG16, // RG16
|
||||
GL_RG16I, // RG16I
|
||||
GL_RG16UI, // RG16U
|
||||
GL_RG16F, // RG16F
|
||||
GL_RG16_SNORM, // RG16S
|
||||
GL_RG32UI, // RG32U
|
||||
GL_RG32F, // RG32F
|
||||
GL_RGBA8, // BGRA8
|
||||
GL_RGBA8, // RGBA8
|
||||
GL_RGBA8I, // RGBA8I
|
||||
GL_RGBA8UI, // RGBA8UI
|
||||
GL_RGBA8_SNORM, // RGBA8S
|
||||
GL_RGBA16, // RGBA16
|
||||
GL_RGBA16I, // RGBA16I
|
||||
GL_RGBA16UI, // RGBA16U
|
||||
GL_RGBA16F, // RGBA16F
|
||||
GL_RGBA16_SNORM, // RGBA16S
|
||||
GL_RGBA32UI, // RGBA32U
|
||||
|
@ -329,23 +353,35 @@ namespace bgfx { namespace gl
|
|||
GL_ZERO, // Unknown
|
||||
GL_ZERO, // R1
|
||||
GL_R8, // R8
|
||||
GL_R8I, // R8I
|
||||
GL_R8UI, // R8UI
|
||||
GL_R8_SNORM, // R8S
|
||||
GL_R16, // R16U
|
||||
GL_R16, // R16
|
||||
GL_R16I, // R16I
|
||||
GL_R16UI, // R16U
|
||||
GL_R16F, // R16F
|
||||
GL_R16_SNORM, // R16S
|
||||
GL_R32UI, // R32U
|
||||
GL_R32F, // R32F
|
||||
GL_RG8, // RG8
|
||||
GL_RG8I, // RG8I
|
||||
GL_RG8UI, // RG8U
|
||||
GL_RG8_SNORM, // RG8S
|
||||
GL_RG16, // RG16
|
||||
GL_RG16I, // RG16I
|
||||
GL_RG16UI, // RG16U
|
||||
GL_RG16F, // RG16F
|
||||
GL_RG16_SNORM, // RG16S
|
||||
GL_RG32UI, // RG32U
|
||||
GL_RG32F, // RG32F
|
||||
GL_RGBA8, // BGRA8
|
||||
GL_RGBA8, // RGBA8
|
||||
GL_RGBA8I, // RGBA8I
|
||||
GL_RGBA8UI, // RGBA8UI
|
||||
GL_RGBA8_SNORM, // RGBA8S
|
||||
GL_RGBA16, // RGBA16
|
||||
GL_RGBA16I, // RGBA16I
|
||||
GL_RGBA16UI, // RGBA16U
|
||||
GL_RGBA16F, // RGBA16F
|
||||
GL_RGBA16_SNORM, // RGBA16S
|
||||
GL_RGBA32UI, // RGBA32U
|
||||
|
@ -1451,9 +1487,10 @@ namespace bgfx { namespace gl
|
|||
if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL)
|
||||
|| BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 30) )
|
||||
{
|
||||
setTextureFormat(TextureFormat::R16I, GL_R16I, GL_RED_INTEGER, GL_SHORT);
|
||||
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::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);
|
||||
|
|
|
@ -265,26 +265,38 @@ namespace bgfx { namespace mtl
|
|||
{ MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // Unknown
|
||||
{ MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // R1
|
||||
{ MTLPixelFormatR8Unorm, MTLPixelFormatR8Unorm_sRGB }, // R8
|
||||
{ MTLPixelFormatR8Sint, MTLPixelFormatInvalid }, // R8I
|
||||
{ MTLPixelFormatR8Uint, MTLPixelFormatInvalid }, // R8U
|
||||
{ MTLPixelFormatR8Snorm, MTLPixelFormatInvalid }, // R8S
|
||||
{ MTLPixelFormatR16Uint, MTLPixelFormatInvalid }, // R16
|
||||
{ MTLPixelFormatR16Unorm, MTLPixelFormatInvalid }, // R16
|
||||
{ MTLPixelFormatR16Sint, MTLPixelFormatInvalid }, // R16I
|
||||
{ MTLPixelFormatR16Uint, MTLPixelFormatInvalid }, // R16U
|
||||
{ MTLPixelFormatR16Float, MTLPixelFormatInvalid }, // R16F
|
||||
{ MTLPixelFormatR16Snorm, MTLPixelFormatInvalid }, // R16S
|
||||
{ MTLPixelFormatR32Uint, MTLPixelFormatInvalid }, // R32
|
||||
{ MTLPixelFormatR32Uint, MTLPixelFormatInvalid }, // R32U
|
||||
{ MTLPixelFormatR32Float, MTLPixelFormatInvalid }, // R32F
|
||||
{ MTLPixelFormatRG8Unorm, MTLPixelFormatRG8Unorm_sRGB }, // RG8
|
||||
{ MTLPixelFormatRG8Sint, MTLPixelFormatInvalid }, // RG8I
|
||||
{ MTLPixelFormatRG8Uint, MTLPixelFormatInvalid }, // RG8U
|
||||
{ MTLPixelFormatRG8Snorm, MTLPixelFormatInvalid }, // RG8S
|
||||
{ MTLPixelFormatRG16Unorm, MTLPixelFormatInvalid }, // RG16
|
||||
{ MTLPixelFormatRG16Sint, MTLPixelFormatInvalid }, // RG16I
|
||||
{ MTLPixelFormatRG16Uint, MTLPixelFormatInvalid }, // RG16U
|
||||
{ MTLPixelFormatRG16Float, MTLPixelFormatInvalid }, // RG16F
|
||||
{ MTLPixelFormatRG16Snorm, MTLPixelFormatInvalid }, // RG16S
|
||||
{ MTLPixelFormatRG32Uint, MTLPixelFormatInvalid }, // RG32
|
||||
{ MTLPixelFormatRG32Uint, MTLPixelFormatInvalid }, // RG32U
|
||||
{ MTLPixelFormatRG32Float, MTLPixelFormatInvalid }, // RG32F
|
||||
{ MTLPixelFormatBGRA8Unorm, MTLPixelFormatBGRA8Unorm_sRGB }, // BGRA8
|
||||
{ MTLPixelFormatRGBA8Unorm, MTLPixelFormatRGBA8Unorm_sRGB }, // RGBA8
|
||||
{ MTLPixelFormatRGBA8Sint, MTLPixelFormatInvalid }, // RGBA8I
|
||||
{ MTLPixelFormatRGBA8Uint, MTLPixelFormatInvalid }, // RGBA8U
|
||||
{ MTLPixelFormatRGBA8Snorm, MTLPixelFormatInvalid }, // RGBA8S
|
||||
{ MTLPixelFormatRGBA16Unorm, MTLPixelFormatInvalid }, // RGBA16
|
||||
{ MTLPixelFormatRGBA16Sint, MTLPixelFormatInvalid }, // RGBA16I
|
||||
{ MTLPixelFormatRGBA16Uint, MTLPixelFormatInvalid }, // RGBA16I
|
||||
{ MTLPixelFormatRGBA16Float, MTLPixelFormatInvalid }, // RGBA16F
|
||||
{ MTLPixelFormatRGBA16Snorm, MTLPixelFormatInvalid }, // RGBA16S
|
||||
{ MTLPixelFormatRGBA32Uint, MTLPixelFormatInvalid }, // RGBA32
|
||||
{ MTLPixelFormatRGBA32Uint, MTLPixelFormatInvalid }, // RGBA32U
|
||||
{ MTLPixelFormatRGBA32Float, MTLPixelFormatInvalid }, // RGBA32F
|
||||
{ MTLPixelFormatB5G6R5Unorm, MTLPixelFormatInvalid }, // R5G6B5
|
||||
{ MTLPixelFormatABGR4Unorm, MTLPixelFormatInvalid }, // RGBA4
|
||||
|
|
Loading…
Reference in a new issue