module Graphics.Vulkan.Types.Struct.PastPresentationTimingGOOGLE
(VkPastPresentationTimingGOOGLE(..)) where
import Foreign.Storable (Storable (..))
import GHC.Base (Addr#, ByteArray#,
byteArrayContents#,
plusAddr#)
import Graphics.Vulkan.Marshal
import Graphics.Vulkan.Marshal.Internal
import System.IO.Unsafe (unsafeDupablePerformIO)
data VkPastPresentationTimingGOOGLE = VkPastPresentationTimingGOOGLE# Addr#
ByteArray#
instance Eq VkPastPresentationTimingGOOGLE where
(VkPastPresentationTimingGOOGLE# a _) ==
x@(VkPastPresentationTimingGOOGLE# b _)
= EQ == cmpBytes# (sizeOf x) a b
instance Ord VkPastPresentationTimingGOOGLE where
(VkPastPresentationTimingGOOGLE# a _) `compare`
x@(VkPastPresentationTimingGOOGLE# b _) = cmpBytes# (sizeOf x) a b
instance Storable VkPastPresentationTimingGOOGLE where
sizeOf ~_ = (40)
alignment ~_
= (8)
peek = peekVkData#
poke = pokeVkData#
instance VulkanMarshalPrim VkPastPresentationTimingGOOGLE where
unsafeAddr (VkPastPresentationTimingGOOGLE# a _) = a
unsafeByteArray (VkPastPresentationTimingGOOGLE# _ b) = b
unsafeFromByteArrayOffset off b
= VkPastPresentationTimingGOOGLE#
(plusAddr# (byteArrayContents# b) off)
b
instance VulkanMarshal VkPastPresentationTimingGOOGLE where
type StructFields VkPastPresentationTimingGOOGLE =
'["presentID", "desiredPresentTime", "actualPresentTime",
"earliestPresentTime", "presentMargin"]
type CUnionType VkPastPresentationTimingGOOGLE = 'False
type ReturnedOnly VkPastPresentationTimingGOOGLE = 'False
type StructExtends VkPastPresentationTimingGOOGLE = '[]
instance
HasField "presentID" VkPastPresentationTimingGOOGLE where
type FieldType "presentID" VkPastPresentationTimingGOOGLE = Word32
type FieldOptional "presentID" VkPastPresentationTimingGOOGLE =
'False
type FieldOffset "presentID" VkPastPresentationTimingGOOGLE =
(0)
type FieldIsArray "presentID" VkPastPresentationTimingGOOGLE =
'False
fieldOptional = False
fieldOffset
= (0)
instance
CanReadField "presentID" VkPastPresentationTimingGOOGLE where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (0))
readField p
= peekByteOff p (0)
instance
CanWriteField "presentID" VkPastPresentationTimingGOOGLE where
writeField p
= pokeByteOff p (0)
instance
HasField "desiredPresentTime" VkPastPresentationTimingGOOGLE where
type FieldType "desiredPresentTime" VkPastPresentationTimingGOOGLE
= Word64
type FieldOptional "desiredPresentTime"
VkPastPresentationTimingGOOGLE
= 'False
type FieldOffset "desiredPresentTime"
VkPastPresentationTimingGOOGLE
=
(8)
type FieldIsArray "desiredPresentTime"
VkPastPresentationTimingGOOGLE
= 'False
fieldOptional = False
fieldOffset
= (8)
instance
CanReadField "desiredPresentTime" VkPastPresentationTimingGOOGLE
where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (8))
readField p
= peekByteOff p (8)
instance
CanWriteField "desiredPresentTime" VkPastPresentationTimingGOOGLE
where
writeField p
= pokeByteOff p (8)
instance
HasField "actualPresentTime" VkPastPresentationTimingGOOGLE where
type FieldType "actualPresentTime" VkPastPresentationTimingGOOGLE =
Word64
type FieldOptional "actualPresentTime"
VkPastPresentationTimingGOOGLE
= 'False
type FieldOffset "actualPresentTime" VkPastPresentationTimingGOOGLE
=
(16)
type FieldIsArray "actualPresentTime"
VkPastPresentationTimingGOOGLE
= 'False
fieldOptional = False
fieldOffset
= (16)
instance
CanReadField "actualPresentTime" VkPastPresentationTimingGOOGLE
where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (16))
readField p
= peekByteOff p (16)
instance
CanWriteField "actualPresentTime" VkPastPresentationTimingGOOGLE
where
writeField p
= pokeByteOff p (16)
instance
HasField "earliestPresentTime" VkPastPresentationTimingGOOGLE where
type FieldType "earliestPresentTime" VkPastPresentationTimingGOOGLE
= Word64
type FieldOptional "earliestPresentTime"
VkPastPresentationTimingGOOGLE
= 'False
type FieldOffset "earliestPresentTime"
VkPastPresentationTimingGOOGLE
=
(24)
type FieldIsArray "earliestPresentTime"
VkPastPresentationTimingGOOGLE
= 'False
fieldOptional = False
fieldOffset
= (24)
instance
CanReadField "earliestPresentTime" VkPastPresentationTimingGOOGLE
where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (24))
readField p
= peekByteOff p (24)
instance
CanWriteField "earliestPresentTime" VkPastPresentationTimingGOOGLE
where
writeField p
= pokeByteOff p (24)
instance
HasField "presentMargin" VkPastPresentationTimingGOOGLE where
type FieldType "presentMargin" VkPastPresentationTimingGOOGLE =
Word64
type FieldOptional "presentMargin" VkPastPresentationTimingGOOGLE =
'False
type FieldOffset "presentMargin" VkPastPresentationTimingGOOGLE =
(32)
type FieldIsArray "presentMargin" VkPastPresentationTimingGOOGLE =
'False
fieldOptional = False
fieldOffset
= (32)
instance
CanReadField "presentMargin" VkPastPresentationTimingGOOGLE where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (32))
readField p
= peekByteOff p (32)
instance
CanWriteField "presentMargin" VkPastPresentationTimingGOOGLE where
writeField p
= pokeByteOff p (32)
instance Show VkPastPresentationTimingGOOGLE where
showsPrec d x
= showString "VkPastPresentationTimingGOOGLE {" .
showString "presentID = " .
showsPrec d (getField @"presentID" x) .
showString ", " .
showString "desiredPresentTime = " .
showsPrec d (getField @"desiredPresentTime" x) .
showString ", " .
showString "actualPresentTime = " .
showsPrec d (getField @"actualPresentTime" x) .
showString ", " .
showString "earliestPresentTime = " .
showsPrec d (getField @"earliestPresentTime" x) .
showString ", " .
showString "presentMargin = " .
showsPrec d (getField @"presentMargin" x) . showChar '}'