Skip to content

Commit

Permalink
Added the formats BGRA8, RG16_Uint and RG32_Uint.
Browse files Browse the repository at this point in the history
  • Loading branch information
IvarPD committed Feb 21, 2025
1 parent 805d598 commit 28c7a63
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions GigiViewerDX12/DX12Utils/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ inline DXGI_FORMAT_Info Get_DXGI_FORMAT_Info(DXGI_FORMAT format)
DXGI_FORMAT_INFO_CASE(DXGI_FORMAT_R8G8_UNORM, uint8_t, 2, false, false, false, 0, 1, UNorm, false, DXGI_FORMAT_UNKNOWN);
DXGI_FORMAT_INFO_CASE(DXGI_FORMAT_R8G8B8A8_UNORM, uint8_t, 4, false, false, false, 0, 1, UNorm, false, DXGI_FORMAT_UNKNOWN);
DXGI_FORMAT_INFO_CASE(DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, uint8_t, 4, true, false, false, 0, 1, UNorm, false, DXGI_FORMAT_UNKNOWN);
DXGI_FORMAT_INFO_CASE(DXGI_FORMAT_B8G8R8A8_UNORM, uint8_t, 4, false, false, false, 0, 1, UNorm, false, DXGI_FORMAT_UNKNOWN);

DXGI_FORMAT_INFO_CASE(DXGI_FORMAT_R8_UINT, uint8_t, 1, false, false, false, 0, 1, None, false, DXGI_FORMAT_UNKNOWN);
DXGI_FORMAT_INFO_CASE(DXGI_FORMAT_R8G8_UINT, uint8_t, 2, false, false, false, 0, 1, None, false, DXGI_FORMAT_UNKNOWN);
Expand Down
3 changes: 3 additions & 0 deletions GigiViewerDX12/Interpreter/NodesShared.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ inline DXGI_FORMAT TextureFormatToDXGI_FORMAT(TextureFormat textureFormat)
case TextureFormat::RG8_Unorm: return DXGI_FORMAT_R8G8_UNORM;
case TextureFormat::RGBA8_Unorm: return DXGI_FORMAT_R8G8B8A8_UNORM;
case TextureFormat::RGBA8_Unorm_sRGB: return DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;
case TextureFormat::BGRA8_Unorm: return DXGI_FORMAT_B8G8R8A8_UNORM;
case TextureFormat::R8_Snorm: return DXGI_FORMAT_R8_SNORM;
case TextureFormat::RG8_Snorm: return DXGI_FORMAT_R8G8_SNORM;
case TextureFormat::RGBA8_Snorm: return DXGI_FORMAT_R8G8B8A8_SNORM;
Expand All @@ -90,10 +91,12 @@ inline DXGI_FORMAT TextureFormatToDXGI_FORMAT(TextureFormat textureFormat)
case TextureFormat::RGBA16_Float: return DXGI_FORMAT_R16G16B16A16_FLOAT;
case TextureFormat::RGBA16_Unorm: return DXGI_FORMAT_R16G16B16A16_UNORM;
case TextureFormat::RGBA16_Snorm: return DXGI_FORMAT_R16G16B16A16_SNORM;
case TextureFormat::RG16_Uint: return DXGI_FORMAT_R16G16_UINT;
case TextureFormat::R32_Float: return DXGI_FORMAT_R32_FLOAT;
case TextureFormat::RG32_Float: return DXGI_FORMAT_R32G32_FLOAT;
case TextureFormat::RGBA32_Float: return DXGI_FORMAT_R32G32B32A32_FLOAT;
case TextureFormat::R32_Uint: return DXGI_FORMAT_R32_UINT;
case TextureFormat::RG32_Uint: return DXGI_FORMAT_R32G32_UINT;
case TextureFormat::RGBA32_Uint: return DXGI_FORMAT_R32G32B32A32_UINT;
case TextureFormat::R11G11B10_Float: return DXGI_FORMAT_R11G11B10_FLOAT;
case TextureFormat::D32_Float: return DXGI_FORMAT_D32_FLOAT;
Expand Down
1 change: 1 addition & 0 deletions Schemas/SchemasShaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ ENUM_BEGIN(TextureViewType, "The type that a texture is actually viewed as, in a
ENUM_ITEM(Int, "int")
ENUM_ITEM(Int4, "int[4]")
ENUM_ITEM(Uint, "uint")
ENUM_ITEM(Uint2, "uint[2]")
ENUM_ITEM(Uint4, "uint[4]")
ENUM_ITEM(Float, "float")
ENUM_ITEM(Float2, "float[2]")
Expand Down
3 changes: 3 additions & 0 deletions Schemas/TextureFormats.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ENUM_BEGIN(TextureFormat, "")
ENUM_ITEM(RG8_Unorm, "RG 8 bit unorm")
ENUM_ITEM(RGBA8_Unorm, "RGBA 8 bit unorm")
ENUM_ITEM(RGBA8_Unorm_sRGB, "RGBA 8 bit unorm, sRGB")
ENUM_ITEM(BGRA8_Unorm, "BGRA 8 bit unorm")

ENUM_ITEM(R8_Snorm, "R 8 bit snorm")
ENUM_ITEM(RG8_Snorm, "RG 8 bit snorm")
Expand All @@ -30,6 +31,7 @@ ENUM_BEGIN(TextureFormat, "")
ENUM_ITEM(RGBA16_Float, "RGBA 16 bit float")
ENUM_ITEM(RGBA16_Unorm, "RGBA 16 bit unorm")
ENUM_ITEM(RGBA16_Snorm, "RGBA 16 bit snorm")
ENUM_ITEM(RG16_Uint, "RG 16 bit uint")

// 32 bit float
ENUM_ITEM(R32_Float, "R 32 bit float")
Expand All @@ -38,6 +40,7 @@ ENUM_BEGIN(TextureFormat, "")

// 32 bit uint
ENUM_ITEM(R32_Uint, "R 32 bit uint")
ENUM_ITEM(RG32_Uint, "RG 32 bit uint")
ENUM_ITEM(RGBA32_Uint, "RGBA 32 bit uint")

// Other
Expand Down

0 comments on commit 28c7a63

Please sign in to comment.