{-# LANGUAGE CPP #-}
module Vulkan.Utils.FromGL
( internalFormat
) where
import qualified Vulkan.Core10.Enums.Format as Vk
#include "gl_enums.h"
internalFormat :: (Eq a, Num a) => a -> Maybe Vk.Format
internalFormat :: a -> Maybe Format
internalFormat = \case
GL_R8 -> Just Vk.FORMAT_R8_UNORM
GL_RG8 -> Format -> Maybe Format
forall a. a -> Maybe a
Just Format
Vk.FORMAT_R8G8_UNORM
GL_RGB8 -> Just Vk.FORMAT_R8G8B8_UNORM
GL_RGBA8 -> Just Vk.FORMAT_R8G8B8A8_UNORM
GL_R8_SNORM -> Just Vk.FORMAT_R8_SNORM
GL_RG8_SNORM -> Just Vk.FORMAT_R8G8_SNORM
GL_RGB8_SNORM -> Just Vk.FORMAT_R8G8B8_SNORM
GL_RGBA8_SNORM -> Just Vk.FORMAT_R8G8B8A8_SNORM
GL_R8UI -> Just Vk.FORMAT_R8_UINT
GL_RG8UI -> Just Vk.FORMAT_R8G8_UINT
GL_RGB8UI -> Just Vk.FORMAT_R8G8B8_UINT
GL_RGBA8UI -> Just Vk.FORMAT_R8G8B8A8_UINT
GL_R8I -> Format -> Maybe Format
forall a. a -> Maybe a
Just Format
Vk.FORMAT_R8_SINT
GL_RG8I -> Just Vk.FORMAT_R8G8_SINT
GL_RGB8I -> Just Vk.FORMAT_R8G8B8_SINT
GL_RGBA8I -> Just Vk.FORMAT_R8G8B8A8_SINT
GL_SR8 -> Format -> Maybe Format
forall a. a -> Maybe a
Just Format
Vk.FORMAT_R8_SRGB
GL_SRG8 -> Just Vk.FORMAT_R8G8_SRGB
GL_SRGB8 -> Just Vk.FORMAT_R8G8B8_SRGB
GL_SRGB8_ALPHA8 -> Just Vk.FORMAT_R8G8B8A8_SRGB
GL_R16 -> Format -> Maybe Format
forall a. a -> Maybe a
Just Format
Vk.FORMAT_R16_UNORM
GL_RG16 -> Just Vk.FORMAT_R16G16_UNORM
GL_RGB16 -> Just Vk.FORMAT_R16G16B16_UNORM
GL_RGBA16 -> Just Vk.FORMAT_R16G16B16A16_UNORM
GL_R16_SNORM -> Just Vk.FORMAT_R16_SNORM
GL_RG16_SNORM -> Just Vk.FORMAT_R16G16_SNORM
GL_RGB16_SNORM -> Just Vk.FORMAT_R16G16B16_SNORM
GL_RGBA16_SNORM -> Just Vk.FORMAT_R16G16B16A16_SNORM
GL_R16UI -> Just Vk.FORMAT_R16_UINT
GL_RG16UI -> Just Vk.FORMAT_R16G16_UINT
GL_RGB16UI -> Just Vk.FORMAT_R16G16B16_UINT
GL_RGBA16UI -> Just Vk.FORMAT_R16G16B16A16_UINT
GL_R16I -> Just Vk.FORMAT_R16_SINT
GL_RG16I -> Just Vk.FORMAT_R16G16_SINT
GL_RGB16I -> Just Vk.FORMAT_R16G16B16_SINT
GL_RGBA16I -> Just Vk.FORMAT_R16G16B16A16_SINT
GL_R16F -> Just Vk.FORMAT_R16_SFLOAT
GL_RG16F -> Just Vk.FORMAT_R16G16_SFLOAT
GL_RGB16F -> Just Vk.FORMAT_R16G16B16_SFLOAT
GL_RGBA16F -> Just Vk.FORMAT_R16G16B16A16_SFLOAT
GL_R32UI -> Just Vk.FORMAT_R32_UINT
GL_RG32UI -> Just Vk.FORMAT_R32G32_UINT
GL_RGB32UI -> Just Vk.FORMAT_R32G32B32_UINT
GL_RGBA32UI -> Just Vk.FORMAT_R32G32B32A32_UINT
GL_R32I -> Just Vk.FORMAT_R32_SINT
GL_RG32I -> Just Vk.FORMAT_R32G32_SINT
GL_RGB32I -> Just Vk.FORMAT_R32G32B32_SINT
GL_RGBA32I -> Just Vk.FORMAT_R32G32B32A32_SINT
GL_R32F -> Just Vk.FORMAT_R32_SFLOAT
GL_RG32F -> Just Vk.FORMAT_R32G32_SFLOAT
GL_RGB32F -> Just Vk.FORMAT_R32G32B32_SFLOAT
GL_RGBA32F -> Just Vk.FORMAT_R32G32B32A32_SFLOAT
GL_R3_G3_B2 -> Nothing
GL_RGB4 -> Nothing
GL_RGB5 -> Just Vk.FORMAT_R5G5B5A1_UNORM_PACK16
GL_RGB565 -> Just Vk.FORMAT_R5G6B5_UNORM_PACK16
GL_RGB10 -> Just Vk.FORMAT_A2R10G10B10_UNORM_PACK32
GL_RGB12 -> Nothing
GL_RGBA2 -> Nothing
GL_RGBA4 -> Just Vk.FORMAT_R4G4B4A4_UNORM_PACK16
GL_RGBA12 -> Nothing
GL_RGB5_A1 -> Just Vk.FORMAT_A1R5G5B5_UNORM_PACK16
GL_RGB10_A2 -> Just Vk.FORMAT_A2R10G10B10_UNORM_PACK32
GL_RGB10_A2UI -> Just Vk.FORMAT_A2R10G10B10_UINT_PACK32
GL_R11F_G11F_B10F -> Just Vk.FORMAT_B10G11R11_UFLOAT_PACK32
GL_RGB9_E5 -> Just Vk.FORMAT_E5B9G9R9_UFLOAT_PACK32
GL_COMPRESSED_RGB_S3TC_DXT1_EXT -> Just Vk.FORMAT_BC1_RGB_UNORM_BLOCK
GL_COMPRESSED_RGBA_S3TC_DXT1_EXT -> Just Vk.FORMAT_BC1_RGBA_UNORM_BLOCK
GL_COMPRESSED_RGBA_S3TC_DXT3_EXT -> Just Vk.FORMAT_BC2_UNORM_BLOCK
GL_COMPRESSED_RGBA_S3TC_DXT5_EXT -> Just Vk.FORMAT_BC3_UNORM_BLOCK
GL_COMPRESSED_SRGB_S3TC_DXT1_EXT -> Just Vk.FORMAT_BC1_RGB_SRGB_BLOCK
GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT -> Just Vk.FORMAT_BC1_RGBA_SRGB_BLOCK
GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT -> Just Vk.FORMAT_BC2_SRGB_BLOCK
GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT -> Just Vk.FORMAT_BC3_SRGB_BLOCK
GL_COMPRESSED_LUMINANCE_LATC1_EXT -> Just Vk.FORMAT_BC4_UNORM_BLOCK
GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT -> Just Vk.FORMAT_BC5_UNORM_BLOCK
GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT -> Just Vk.FORMAT_BC4_SNORM_BLOCK
GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT -> Just Vk.FORMAT_BC5_SNORM_BLOCK
GL_COMPRESSED_RED_RGTC1 -> Just Vk.FORMAT_BC4_UNORM_BLOCK
GL_COMPRESSED_RG_RGTC2 -> Just Vk.FORMAT_BC5_UNORM_BLOCK
GL_COMPRESSED_SIGNED_RED_RGTC1 -> Just Vk.FORMAT_BC4_SNORM_BLOCK
GL_COMPRESSED_SIGNED_RG_RGTC2 -> Just Vk.FORMAT_BC5_SNORM_BLOCK
GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT -> Just Vk.FORMAT_BC6H_UFLOAT_BLOCK
GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT -> Just Vk.FORMAT_BC6H_SFLOAT_BLOCK
GL_COMPRESSED_RGBA_BPTC_UNORM -> Just Vk.FORMAT_BC7_UNORM_BLOCK
GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM -> Just Vk.FORMAT_BC7_SRGB_BLOCK
GL_ETC1_RGB8_OES -> Just Vk.FORMAT_ETC2_R8G8B8_UNORM_BLOCK
GL_COMPRESSED_RGB8_ETC2 -> Just Vk.FORMAT_ETC2_R8G8B8_UNORM_BLOCK
GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 -> Just Vk.FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK
GL_COMPRESSED_RGBA8_ETC2_EAC -> Just Vk.FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK
GL_COMPRESSED_SRGB8_ETC2 -> Just Vk.FORMAT_ETC2_R8G8B8_SRGB_BLOCK
GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 -> Just Vk.FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK
GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC -> Just Vk.FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK
GL_COMPRESSED_R11_EAC -> Just Vk.FORMAT_EAC_R11_UNORM_BLOCK
GL_COMPRESSED_RG11_EAC -> Just Vk.FORMAT_EAC_R11G11_UNORM_BLOCK
GL_COMPRESSED_SIGNED_R11_EAC -> Just Vk.FORMAT_EAC_R11_SNORM_BLOCK
GL_COMPRESSED_SIGNED_RG11_EAC -> Just Vk.FORMAT_EAC_R11G11_SNORM_BLOCK
GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG -> Just Vk.FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG
GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG -> Just Vk.FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG
GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG -> Just Vk.FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG
GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG -> Just Vk.FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG
GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG -> Just Vk.FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG
GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG -> Just Vk.FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG
GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT -> Just Vk.FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG
GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT -> Just Vk.FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG
GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT -> Just Vk.FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG
GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT -> Just Vk.FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG
GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG -> Just Vk.FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG
GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG -> Just Vk.FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG
GL_COMPRESSED_RGBA_ASTC_4x4_KHR -> Just Vk.FORMAT_ASTC_4x4_UNORM_BLOCK
GL_COMPRESSED_RGBA_ASTC_5x4_KHR -> Just Vk.FORMAT_ASTC_5x4_UNORM_BLOCK
GL_COMPRESSED_RGBA_ASTC_5x5_KHR -> Just Vk.FORMAT_ASTC_5x5_UNORM_BLOCK
GL_COMPRESSED_RGBA_ASTC_6x5_KHR -> Just Vk.FORMAT_ASTC_6x5_UNORM_BLOCK
GL_COMPRESSED_RGBA_ASTC_6x6_KHR -> Just Vk.FORMAT_ASTC_6x6_UNORM_BLOCK
GL_COMPRESSED_RGBA_ASTC_8x5_KHR -> Just Vk.FORMAT_ASTC_8x5_UNORM_BLOCK
GL_COMPRESSED_RGBA_ASTC_8x6_KHR -> Just Vk.FORMAT_ASTC_8x6_UNORM_BLOCK
GL_COMPRESSED_RGBA_ASTC_8x8_KHR -> Just Vk.FORMAT_ASTC_8x8_UNORM_BLOCK
GL_COMPRESSED_RGBA_ASTC_10x5_KHR -> Just Vk.FORMAT_ASTC_10x5_UNORM_BLOCK
GL_COMPRESSED_RGBA_ASTC_10x6_KHR -> Just Vk.FORMAT_ASTC_10x6_UNORM_BLOCK
GL_COMPRESSED_RGBA_ASTC_10x8_KHR -> Just Vk.FORMAT_ASTC_10x8_UNORM_BLOCK
GL_COMPRESSED_RGBA_ASTC_10x10_KHR -> Just Vk.FORMAT_ASTC_10x10_UNORM_BLOCK
GL_COMPRESSED_RGBA_ASTC_12x10_KHR -> Just Vk.FORMAT_ASTC_12x10_UNORM_BLOCK
GL_COMPRESSED_RGBA_ASTC_12x12_KHR -> Just Vk.FORMAT_ASTC_12x12_UNORM_BLOCK
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR -> Just Vk.FORMAT_ASTC_4x4_SRGB_BLOCK
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR -> Just Vk.FORMAT_ASTC_5x4_SRGB_BLOCK
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR -> Just Vk.FORMAT_ASTC_5x5_SRGB_BLOCK
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR -> Just Vk.FORMAT_ASTC_6x5_SRGB_BLOCK
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR -> Just Vk.FORMAT_ASTC_6x6_SRGB_BLOCK
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR -> Just Vk.FORMAT_ASTC_8x5_SRGB_BLOCK
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR -> Just Vk.FORMAT_ASTC_8x6_SRGB_BLOCK
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR -> Just Vk.FORMAT_ASTC_8x8_SRGB_BLOCK
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR -> Just Vk.FORMAT_ASTC_10x5_SRGB_BLOCK
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR -> Just Vk.FORMAT_ASTC_10x6_SRGB_BLOCK
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR -> Just Vk.FORMAT_ASTC_10x8_SRGB_BLOCK
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR -> Just Vk.FORMAT_ASTC_10x10_SRGB_BLOCK
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR -> Just Vk.FORMAT_ASTC_12x10_SRGB_BLOCK
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR -> Just Vk.FORMAT_ASTC_12x12_SRGB_BLOCK
GL_COMPRESSED_RGBA_ASTC_3x3x3_OES -> Nothing
GL_COMPRESSED_RGBA_ASTC_4x3x3_OES -> Nothing
GL_COMPRESSED_RGBA_ASTC_4x4x3_OES -> Nothing
GL_COMPRESSED_RGBA_ASTC_4x4x4_OES -> Nothing
GL_COMPRESSED_RGBA_ASTC_5x4x4_OES -> Nothing
GL_COMPRESSED_RGBA_ASTC_5x5x4_OES -> Nothing
GL_COMPRESSED_RGBA_ASTC_5x5x5_OES -> Nothing
GL_COMPRESSED_RGBA_ASTC_6x5x5_OES -> Nothing
GL_COMPRESSED_RGBA_ASTC_6x6x5_OES -> Nothing
GL_COMPRESSED_RGBA_ASTC_6x6x6_OES -> Nothing
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES -> Nothing
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES -> Nothing
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES -> Nothing
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES -> Nothing
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES -> Nothing
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES -> Nothing
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES -> Nothing
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES -> Nothing
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES -> Nothing
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES -> Nothing
GL_ATC_RGB_AMD -> Nothing
GL_ATC_RGBA_EXPLICIT_ALPHA_AMD -> Nothing
GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD -> Nothing
GL_PALETTE4_RGB8_OES -> Nothing
GL_PALETTE4_RGBA8_OES -> Nothing
GL_PALETTE4_R5_G6_B5_OES -> Nothing
GL_PALETTE4_RGBA4_OES -> Nothing
GL_PALETTE4_RGB5_A1_OES -> Nothing
GL_PALETTE8_RGB8_OES -> Nothing
GL_PALETTE8_RGBA8_OES -> Nothing
GL_PALETTE8_R5_G6_B5_OES -> Nothing
GL_PALETTE8_RGBA4_OES -> Nothing
GL_PALETTE8_RGB5_A1_OES -> Nothing
GL_DEPTH_COMPONENT16 -> Just Vk.FORMAT_D16_UNORM
GL_DEPTH_COMPONENT24 -> Just Vk.FORMAT_X8_D24_UNORM_PACK32
GL_DEPTH_COMPONENT32 -> Nothing
GL_DEPTH_COMPONENT32F -> Just Vk.FORMAT_D32_SFLOAT
GL_DEPTH_COMPONENT32F_NV -> Just Vk.FORMAT_D32_SFLOAT
GL_STENCIL_INDEX1 -> Nothing
GL_STENCIL_INDEX4 -> Nothing
GL_STENCIL_INDEX8 -> Just Vk.FORMAT_S8_UINT
GL_STENCIL_INDEX16 -> Nothing
GL_DEPTH24_STENCIL8 -> Just Vk.FORMAT_D24_UNORM_S8_UINT
GL_DEPTH32F_STENCIL8 -> Just Vk.FORMAT_D32_SFLOAT_S8_UINT
GL_DEPTH32F_STENCIL8_NV -> Just Vk.FORMAT_D32_SFLOAT_S8_UINT
_ -> Maybe Format
forall a. Maybe a
Nothing