Skip to content

Commit

Permalink
Minor reformat (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
lexaknyazev authored Apr 16, 2021
1 parent 2034ce7 commit a78c3b4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions lib/gl_format.h
Original file line number Diff line number Diff line change
Expand Up @@ -1625,7 +1625,7 @@ static inline unsigned int glGetTypeSizeFromType(GLenum type)

static inline void glGetFormatSize( const GLenum internalFormat, ktxFormatSize * pFormatSize )
{
pFormatSize->minBlocksX = pFormatSize->minBlocksY = 1;
pFormatSize->minBlocksX = pFormatSize->minBlocksY = 1;
switch ( internalFormat )
{
//
Expand Down Expand Up @@ -2018,8 +2018,8 @@ static inline void glGetFormatSize( const GLenum internalFormat, ktxFormatSize *
pFormatSize->blockWidth = 8;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
pFormatSize->minBlocksX = 2;
pFormatSize->minBlocksY = 2;
pFormatSize->minBlocksX = 2;
pFormatSize->minBlocksY = 2;
break;
case GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG: // 3-component PVRTC, 4x4 blocks, unsigned normalized
case GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT: // 3-component PVRTC, 4x4 blocks, sRGB
Expand All @@ -2031,8 +2031,8 @@ static inline void glGetFormatSize( const GLenum internalFormat, ktxFormatSize *
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
pFormatSize->minBlocksX = 2;
pFormatSize->minBlocksY = 2;
pFormatSize->minBlocksX = 2;
pFormatSize->minBlocksY = 2;
break;
case GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG: // 4-component PVRTC, 8x4 blocks, unsigned normalized
case GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG: // 4-component PVRTC, 8x4 blocks, sRGB
Expand Down
30 changes: 15 additions & 15 deletions lib/vk_format.h
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ static inline VkFormat vkGetFormatFromOpenGLInternalFormat( const GLenum interna

static inline void vkGetFormatSize( const VkFormat format, ktxFormatSize * pFormatSize )
{
pFormatSize->minBlocksX = pFormatSize->minBlocksY = 1;
pFormatSize->minBlocksX = pFormatSize->minBlocksY = 1;
switch ( format )
{
case VK_FORMAT_R4G4_UNORM_PACK8:
Expand Down Expand Up @@ -1158,8 +1158,8 @@ static inline void vkGetFormatSize( const VkFormat format, ktxFormatSize * pForm
case VK_FORMAT_BC1_RGB_SRGB_BLOCK:
case VK_FORMAT_BC1_RGBA_UNORM_BLOCK:
case VK_FORMAT_BC1_RGBA_SRGB_BLOCK:
case VK_FORMAT_BC4_UNORM_BLOCK:
case VK_FORMAT_BC4_SNORM_BLOCK:
case VK_FORMAT_BC4_UNORM_BLOCK:
case VK_FORMAT_BC4_SNORM_BLOCK:
pFormatSize->flags = KTX_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 8 * 8;
Expand All @@ -1171,8 +1171,8 @@ static inline void vkGetFormatSize( const VkFormat format, ktxFormatSize * pForm
case VK_FORMAT_BC2_SRGB_BLOCK:
case VK_FORMAT_BC3_UNORM_BLOCK:
case VK_FORMAT_BC3_SRGB_BLOCK:
case VK_FORMAT_BC5_UNORM_BLOCK:
case VK_FORMAT_BC5_SNORM_BLOCK:
case VK_FORMAT_BC5_UNORM_BLOCK:
case VK_FORMAT_BC5_SNORM_BLOCK:
case VK_FORMAT_BC6H_UFLOAT_BLOCK:
case VK_FORMAT_BC6H_SFLOAT_BLOCK:
case VK_FORMAT_BC7_UNORM_BLOCK:
Expand Down Expand Up @@ -1216,11 +1216,11 @@ static inline void vkGetFormatSize( const VkFormat format, ktxFormatSize * pForm
pFormatSize->blockWidth = 8;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
pFormatSize->minBlocksX = 2;
pFormatSize->minBlocksY = 2;
break;
case VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:
case VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:
pFormatSize->minBlocksX = 2;
pFormatSize->minBlocksY = 2;
break;
case VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:
case VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:
pFormatSize->flags = KTX_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 8 * 8;
Expand All @@ -1236,11 +1236,11 @@ static inline void vkGetFormatSize( const VkFormat format, ktxFormatSize * pForm
pFormatSize->blockWidth = 4;
pFormatSize->blockHeight = 4;
pFormatSize->blockDepth = 1;
pFormatSize->minBlocksX = 2;
pFormatSize->minBlocksY = 2;
break;
case VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:
case VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:
pFormatSize->minBlocksX = 2;
pFormatSize->minBlocksY = 2;
break;
case VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:
case VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:
pFormatSize->flags = KTX_FORMAT_SIZE_COMPRESSED_BIT;
pFormatSize->paletteSizeInBits = 0;
pFormatSize->blockSizeInBits = 8 * 8;
Expand Down

0 comments on commit a78c3b4

Please sign in to comment.