module Graphics.Vulkan.Types.Struct.SubmitInfo (VkSubmitInfo(..))
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.Pipeline (VkPipelineStageFlags)
import Graphics.Vulkan.Types.Enum.StructureType (VkStructureType)
import Graphics.Vulkan.Types.Handles (VkCommandBuffer,
VkSemaphore)
import System.IO.Unsafe (unsafeDupablePerformIO)
data VkSubmitInfo = VkSubmitInfo# Addr# ByteArray#
instance Eq VkSubmitInfo where
(VkSubmitInfo# a _) == x@(VkSubmitInfo# b _)
= EQ == cmpBytes# (sizeOf x) a b
instance Ord VkSubmitInfo where
(VkSubmitInfo# a _) `compare` x@(VkSubmitInfo# b _)
= cmpBytes# (sizeOf x) a b
instance Storable VkSubmitInfo where
sizeOf ~_ = (72)
alignment ~_ = (8)
peek = peekVkData#
poke = pokeVkData#
instance VulkanMarshalPrim VkSubmitInfo where
unsafeAddr (VkSubmitInfo# a _) = a
unsafeByteArray (VkSubmitInfo# _ b) = b
unsafeFromByteArrayOffset off b
= VkSubmitInfo# (plusAddr# (byteArrayContents# b) off) b
instance VulkanMarshal VkSubmitInfo where
type StructFields VkSubmitInfo =
'["sType", "pNext", "waitSemaphoreCount", "pWaitSemaphores",
"pWaitDstStageMask", "commandBufferCount", "pCommandBuffers",
"signalSemaphoreCount", "pSignalSemaphores"]
type CUnionType VkSubmitInfo = 'False
type ReturnedOnly VkSubmitInfo = 'False
type StructExtends VkSubmitInfo = '[]
instance HasField "sType" VkSubmitInfo where
type FieldType "sType" VkSubmitInfo = VkStructureType
type FieldOptional "sType" VkSubmitInfo = 'False
type FieldOffset "sType" VkSubmitInfo =
(0)
type FieldIsArray "sType" VkSubmitInfo = 'False
fieldOptional = False
fieldOffset = (0)
instance CanReadField "sType" VkSubmitInfo
where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (0))
readField p
= peekByteOff p (0)
instance CanWriteField "sType" VkSubmitInfo
where
writeField p
= pokeByteOff p (0)
instance HasField "pNext" VkSubmitInfo where
type FieldType "pNext" VkSubmitInfo = Ptr Void
type FieldOptional "pNext" VkSubmitInfo = 'False
type FieldOffset "pNext" VkSubmitInfo =
(8)
type FieldIsArray "pNext" VkSubmitInfo = 'False
fieldOptional = False
fieldOffset = (8)
instance CanReadField "pNext" VkSubmitInfo
where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (8))
readField p
= peekByteOff p (8)
instance CanWriteField "pNext" VkSubmitInfo
where
writeField p
= pokeByteOff p (8)
instance
HasField "waitSemaphoreCount" VkSubmitInfo where
type FieldType "waitSemaphoreCount" VkSubmitInfo = Word32
type FieldOptional "waitSemaphoreCount" VkSubmitInfo = 'True
type FieldOffset "waitSemaphoreCount" VkSubmitInfo =
(16)
type FieldIsArray "waitSemaphoreCount" VkSubmitInfo = 'False
fieldOptional = True
fieldOffset
= (16)
instance
CanReadField "waitSemaphoreCount" VkSubmitInfo where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (16))
readField p
= peekByteOff p (16)
instance
CanWriteField "waitSemaphoreCount" VkSubmitInfo where
writeField p
= pokeByteOff p (16)
instance
HasField "pWaitSemaphores" VkSubmitInfo where
type FieldType "pWaitSemaphores" VkSubmitInfo = Ptr VkSemaphore
type FieldOptional "pWaitSemaphores" VkSubmitInfo = 'False
type FieldOffset "pWaitSemaphores" VkSubmitInfo =
(24)
type FieldIsArray "pWaitSemaphores" VkSubmitInfo = 'False
fieldOptional = False
fieldOffset = (24)
instance
CanReadField "pWaitSemaphores" VkSubmitInfo where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (24))
readField p
= peekByteOff p (24)
instance
CanWriteField "pWaitSemaphores" VkSubmitInfo where
writeField p
= pokeByteOff p (24)
instance
HasField "pWaitDstStageMask" VkSubmitInfo where
type FieldType "pWaitDstStageMask" VkSubmitInfo =
Ptr VkPipelineStageFlags
type FieldOptional "pWaitDstStageMask" VkSubmitInfo = 'False
type FieldOffset "pWaitDstStageMask" VkSubmitInfo =
(32)
type FieldIsArray "pWaitDstStageMask" VkSubmitInfo = 'False
fieldOptional = False
fieldOffset = (32)
instance
CanReadField "pWaitDstStageMask" VkSubmitInfo where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (32))
readField p
= peekByteOff p (32)
instance
CanWriteField "pWaitDstStageMask" VkSubmitInfo where
writeField p
= pokeByteOff p (32)
instance
HasField "commandBufferCount" VkSubmitInfo where
type FieldType "commandBufferCount" VkSubmitInfo = Word32
type FieldOptional "commandBufferCount" VkSubmitInfo = 'True
type FieldOffset "commandBufferCount" VkSubmitInfo =
(40)
type FieldIsArray "commandBufferCount" VkSubmitInfo = 'False
fieldOptional = True
fieldOffset
= (40)
instance
CanReadField "commandBufferCount" VkSubmitInfo where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (40))
readField p
= peekByteOff p (40)
instance
CanWriteField "commandBufferCount" VkSubmitInfo where
writeField p
= pokeByteOff p (40)
instance
HasField "pCommandBuffers" VkSubmitInfo where
type FieldType "pCommandBuffers" VkSubmitInfo = Ptr VkCommandBuffer
type FieldOptional "pCommandBuffers" VkSubmitInfo = 'False
type FieldOffset "pCommandBuffers" VkSubmitInfo =
(48)
type FieldIsArray "pCommandBuffers" VkSubmitInfo = 'False
fieldOptional = False
fieldOffset = (48)
instance
CanReadField "pCommandBuffers" VkSubmitInfo where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (48))
readField p
= peekByteOff p (48)
instance
CanWriteField "pCommandBuffers" VkSubmitInfo where
writeField p
= pokeByteOff p (48)
instance
HasField "signalSemaphoreCount" VkSubmitInfo where
type FieldType "signalSemaphoreCount" VkSubmitInfo = Word32
type FieldOptional "signalSemaphoreCount" VkSubmitInfo = 'True
type FieldOffset "signalSemaphoreCount" VkSubmitInfo =
(56)
type FieldIsArray "signalSemaphoreCount" VkSubmitInfo = 'False
fieldOptional = True
fieldOffset
= (56)
instance
CanReadField "signalSemaphoreCount" VkSubmitInfo where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (56))
readField p
= peekByteOff p (56)
instance
CanWriteField "signalSemaphoreCount" VkSubmitInfo where
writeField p
= pokeByteOff p (56)
instance
HasField "pSignalSemaphores" VkSubmitInfo where
type FieldType "pSignalSemaphores" VkSubmitInfo = Ptr VkSemaphore
type FieldOptional "pSignalSemaphores" VkSubmitInfo = 'False
type FieldOffset "pSignalSemaphores" VkSubmitInfo =
(64)
type FieldIsArray "pSignalSemaphores" VkSubmitInfo = 'False
fieldOptional = False
fieldOffset = (64)
instance
CanReadField "pSignalSemaphores" VkSubmitInfo where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (64))
readField p
= peekByteOff p (64)
instance
CanWriteField "pSignalSemaphores" VkSubmitInfo where
writeField p
= pokeByteOff p (64)
instance Show VkSubmitInfo where
showsPrec d x
= showString "VkSubmitInfo {" .
showString "sType = " .
showsPrec d (getField @"sType" x) .
showString ", " .
showString "pNext = " .
showsPrec d (getField @"pNext" x) .
showString ", " .
showString "waitSemaphoreCount = " .
showsPrec d (getField @"waitSemaphoreCount" x) .
showString ", " .
showString "pWaitSemaphores = " .
showsPrec d (getField @"pWaitSemaphores" x) .
showString ", " .
showString "pWaitDstStageMask = " .
showsPrec d (getField @"pWaitDstStageMask" x) .
showString ", " .
showString "commandBufferCount = " .
showsPrec d (getField @"commandBufferCount" x) .
showString ", " .
showString "pCommandBuffers = " .
showsPrec d (getField @"pCommandBuffers" x) .
showString ", " .
showString "signalSemaphoreCount = " .
showsPrec d
(getField @"signalSemaphoreCount" x)
.
showString ", " .
showString "pSignalSemaphores = " .
showsPrec d
(getField @"pSignalSemaphores" x)
. showChar '}'