module Graphics.Vulkan.Types.Struct.InputAttachmentAspectReference
(VkInputAttachmentAspectReference(..),
VkInputAttachmentAspectReferenceKHR)
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.Enum.Image (VkImageAspectFlags)
import System.IO.Unsafe (unsafeDupablePerformIO)
data VkInputAttachmentAspectReference = VkInputAttachmentAspectReference# Addr#
ByteArray#
instance Eq VkInputAttachmentAspectReference where
(VkInputAttachmentAspectReference# a _) ==
x@(VkInputAttachmentAspectReference# b _)
= EQ == cmpBytes# (sizeOf x) a b
instance Ord VkInputAttachmentAspectReference where
(VkInputAttachmentAspectReference# a _) `compare`
x@(VkInputAttachmentAspectReference# b _)
= cmpBytes# (sizeOf x) a b
instance Storable VkInputAttachmentAspectReference where
sizeOf ~_ = (12)
alignment ~_
= (4)
peek = peekVkData#
poke = pokeVkData#
instance VulkanMarshalPrim VkInputAttachmentAspectReference where
unsafeAddr (VkInputAttachmentAspectReference# a _) = a
unsafeByteArray (VkInputAttachmentAspectReference# _ b) = b
unsafeFromByteArrayOffset off b
= VkInputAttachmentAspectReference#
(plusAddr# (byteArrayContents# b) off)
b
instance VulkanMarshal VkInputAttachmentAspectReference where
type StructFields VkInputAttachmentAspectReference =
'["subpass", "inputAttachmentIndex", "aspectMask"]
type CUnionType VkInputAttachmentAspectReference = 'False
type ReturnedOnly VkInputAttachmentAspectReference = 'False
type StructExtends VkInputAttachmentAspectReference = '[]
instance
HasField "subpass" VkInputAttachmentAspectReference where
type FieldType "subpass" VkInputAttachmentAspectReference = Word32
type FieldOptional "subpass" VkInputAttachmentAspectReference =
'False
type FieldOffset "subpass" VkInputAttachmentAspectReference =
(0)
type FieldIsArray "subpass" VkInputAttachmentAspectReference =
'False
fieldOptional = False
fieldOffset
= (0)
instance
CanReadField "subpass" VkInputAttachmentAspectReference where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (0))
readField p
= peekByteOff p (0)
instance
CanWriteField "subpass" VkInputAttachmentAspectReference where
writeField p
= pokeByteOff p (0)
instance
HasField "inputAttachmentIndex" VkInputAttachmentAspectReference
where
type FieldType "inputAttachmentIndex"
VkInputAttachmentAspectReference
= Word32
type FieldOptional "inputAttachmentIndex"
VkInputAttachmentAspectReference
= 'False
type FieldOffset "inputAttachmentIndex"
VkInputAttachmentAspectReference
=
(4)
type FieldIsArray "inputAttachmentIndex"
VkInputAttachmentAspectReference
= 'False
fieldOptional = False
fieldOffset
= (4)
instance
CanReadField "inputAttachmentIndex"
VkInputAttachmentAspectReference
where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (4))
readField p
= peekByteOff p (4)
instance
CanWriteField "inputAttachmentIndex"
VkInputAttachmentAspectReference
where
writeField p
= pokeByteOff p (4)
instance
HasField "aspectMask" VkInputAttachmentAspectReference where
type FieldType "aspectMask" VkInputAttachmentAspectReference =
VkImageAspectFlags
type FieldOptional "aspectMask" VkInputAttachmentAspectReference =
'False
type FieldOffset "aspectMask" VkInputAttachmentAspectReference =
(8)
type FieldIsArray "aspectMask" VkInputAttachmentAspectReference =
'False
fieldOptional = False
fieldOffset
= (8)
instance
CanReadField "aspectMask" VkInputAttachmentAspectReference where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (8))
readField p
= peekByteOff p (8)
instance
CanWriteField "aspectMask" VkInputAttachmentAspectReference where
writeField p
= pokeByteOff p (8)
instance Show VkInputAttachmentAspectReference where
showsPrec d x
= showString "VkInputAttachmentAspectReference {" .
showString "subpass = " .
showsPrec d (getField @"subpass" x) .
showString ", " .
showString "inputAttachmentIndex = " .
showsPrec d (getField @"inputAttachmentIndex" x) .
showString ", " .
showString "aspectMask = " .
showsPrec d (getField @"aspectMask" x) . showChar '}'
type VkInputAttachmentAspectReferenceKHR =
VkInputAttachmentAspectReference