Skip to content

Commit

Permalink
GPU: Remove unnecessary texture format swizzles in Vulkan
Browse files Browse the repository at this point in the history
  • Loading branch information
Akaricchi committed Sep 3, 2024
1 parent c9387bc commit d509a86
Showing 1 changed file with 4 additions and 28 deletions.
32 changes: 4 additions & 28 deletions src/gpu/vulkan/SDL_gpu_vulkan.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,27 +209,9 @@ static VkComponentMapping SDLToVK_SurfaceSwizzle[] = {
IDENTITY_SWIZZLE, // R16
IDENTITY_SWIZZLE, // R16G16
IDENTITY_SWIZZLE, // R16G16B16A16
{
// R10G10B10A2
VK_COMPONENT_SWIZZLE_R,
VK_COMPONENT_SWIZZLE_G,
VK_COMPONENT_SWIZZLE_B,
VK_COMPONENT_SWIZZLE_A,
},
{
// B5G6R5
VK_COMPONENT_SWIZZLE_B,
VK_COMPONENT_SWIZZLE_G,
VK_COMPONENT_SWIZZLE_R,
VK_COMPONENT_SWIZZLE_ONE,
},
{
// B5G5R5A1
VK_COMPONENT_SWIZZLE_B,
VK_COMPONENT_SWIZZLE_G,
VK_COMPONENT_SWIZZLE_R,
VK_COMPONENT_SWIZZLE_A,
},
IDENTITY_SWIZZLE, // R10G10B10A2
IDENTITY_SWIZZLE, // B5G6R5
IDENTITY_SWIZZLE, // B5G5R5A1
IDENTITY_SWIZZLE, // B4G4R4A4
IDENTITY_SWIZZLE, // B8G8R8A8
IDENTITY_SWIZZLE, // BC1
Expand All @@ -252,13 +234,7 @@ static VkComponentMapping SDLToVK_SurfaceSwizzle[] = {
IDENTITY_SWIZZLE, // R32_SFLOAT
IDENTITY_SWIZZLE, // R32G32_SFLOAT
IDENTITY_SWIZZLE, // R32G32B32A32_SFLOAT
{
// R11G11B10_UFLOAT
VK_COMPONENT_SWIZZLE_R,
VK_COMPONENT_SWIZZLE_G,
VK_COMPONENT_SWIZZLE_B,
VK_COMPONENT_SWIZZLE_ONE,
},
IDENTITY_SWIZZLE, // R11G11B10_UFLOAT
IDENTITY_SWIZZLE, // R8_UINT
IDENTITY_SWIZZLE, // R8G8_UINT
IDENTITY_SWIZZLE, // R8G8B8A8_UINT
Expand Down

0 comments on commit d509a86

Please sign in to comment.