module Graphics.Vulkan.Types.Struct.TextureLODGatherFormatPropertiesAMD
(VkTextureLODGatherFormatPropertiesAMD(..)) where
import Foreign.Storable (Storable (..))
import GHC.Base (Addr#, ByteArray#,
byteArrayContents#,
plusAddr#)
import Graphics.Vulkan.Marshal
import Graphics.Vulkan.Marshal.Internal
import Graphics.Vulkan.Types.BaseTypes (VkBool32)
import Graphics.Vulkan.Types.Enum.StructureType (VkStructureType)
import Graphics.Vulkan.Types.Struct.Image (VkImageFormatProperties2)
import System.IO.Unsafe (unsafeDupablePerformIO)
data VkTextureLODGatherFormatPropertiesAMD = VkTextureLODGatherFormatPropertiesAMD# Addr#
ByteArray#
instance Eq VkTextureLODGatherFormatPropertiesAMD where
(VkTextureLODGatherFormatPropertiesAMD# a _) ==
x@(VkTextureLODGatherFormatPropertiesAMD# b _)
= EQ == cmpBytes# (sizeOf x) a b
instance Ord VkTextureLODGatherFormatPropertiesAMD where
(VkTextureLODGatherFormatPropertiesAMD# a _) `compare`
x@(VkTextureLODGatherFormatPropertiesAMD# b _)
= cmpBytes# (sizeOf x) a b
instance Storable VkTextureLODGatherFormatPropertiesAMD where
sizeOf ~_
= (24)
alignment ~_
= (8)
peek = peekVkData#
poke = pokeVkData#
instance VulkanMarshalPrim VkTextureLODGatherFormatPropertiesAMD
where
unsafeAddr (VkTextureLODGatherFormatPropertiesAMD# a _) = a
unsafeByteArray (VkTextureLODGatherFormatPropertiesAMD# _ b) = b
unsafeFromByteArrayOffset off b
= VkTextureLODGatherFormatPropertiesAMD#
(plusAddr# (byteArrayContents# b) off)
b
instance VulkanMarshal VkTextureLODGatherFormatPropertiesAMD where
type StructFields VkTextureLODGatherFormatPropertiesAMD =
'["sType", "pNext", "supportsTextureGatherLODBiasAMD"]
type CUnionType VkTextureLODGatherFormatPropertiesAMD = 'False
type ReturnedOnly VkTextureLODGatherFormatPropertiesAMD = 'True
type StructExtends VkTextureLODGatherFormatPropertiesAMD =
'[VkImageFormatProperties2]
instance
HasField "sType" VkTextureLODGatherFormatPropertiesAMD where
type FieldType "sType" VkTextureLODGatherFormatPropertiesAMD =
VkStructureType
type FieldOptional "sType" VkTextureLODGatherFormatPropertiesAMD =
'False
type FieldOffset "sType" VkTextureLODGatherFormatPropertiesAMD =
(0)
type FieldIsArray "sType" VkTextureLODGatherFormatPropertiesAMD =
'False
fieldOptional = False
fieldOffset
= (0)
instance
CanReadField "sType" VkTextureLODGatherFormatPropertiesAMD where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (0))
readField p
= peekByteOff p (0)
instance
CanWriteField "sType" VkTextureLODGatherFormatPropertiesAMD where
writeField p
= pokeByteOff p (0)
instance
HasField "pNext" VkTextureLODGatherFormatPropertiesAMD where
type FieldType "pNext" VkTextureLODGatherFormatPropertiesAMD =
Ptr Void
type FieldOptional "pNext" VkTextureLODGatherFormatPropertiesAMD =
'False
type FieldOffset "pNext" VkTextureLODGatherFormatPropertiesAMD =
(8)
type FieldIsArray "pNext" VkTextureLODGatherFormatPropertiesAMD =
'False
fieldOptional = False
fieldOffset
= (8)
instance
CanReadField "pNext" VkTextureLODGatherFormatPropertiesAMD where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (8))
readField p
= peekByteOff p (8)
instance
CanWriteField "pNext" VkTextureLODGatherFormatPropertiesAMD where
writeField p
= pokeByteOff p (8)
instance
HasField "supportsTextureGatherLODBiasAMD"
VkTextureLODGatherFormatPropertiesAMD
where
type FieldType "supportsTextureGatherLODBiasAMD"
VkTextureLODGatherFormatPropertiesAMD
= VkBool32
type FieldOptional "supportsTextureGatherLODBiasAMD"
VkTextureLODGatherFormatPropertiesAMD
= 'False
type FieldOffset "supportsTextureGatherLODBiasAMD"
VkTextureLODGatherFormatPropertiesAMD
=
(16)
type FieldIsArray "supportsTextureGatherLODBiasAMD"
VkTextureLODGatherFormatPropertiesAMD
= 'False
fieldOptional = False
fieldOffset
= (16)
instance
CanReadField "supportsTextureGatherLODBiasAMD"
VkTextureLODGatherFormatPropertiesAMD
where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (16))
readField p
= peekByteOff p (16)
instance
CanWriteField "supportsTextureGatherLODBiasAMD"
VkTextureLODGatherFormatPropertiesAMD
where
writeField p
= pokeByteOff p (16)
instance Show VkTextureLODGatherFormatPropertiesAMD where
showsPrec d x
= showString "VkTextureLODGatherFormatPropertiesAMD {" .
showString "sType = " .
showsPrec d (getField @"sType" x) .
showString ", " .
showString "pNext = " .
showsPrec d (getField @"pNext" x) .
showString ", " .
showString "supportsTextureGatherLODBiasAMD = " .
showsPrec d (getField @"supportsTextureGatherLODBiasAMD" x) .
showChar '}'