module Graphics.Vulkan.Types.Struct.ProtectedSubmitInfo
(VkProtectedSubmitInfo(..)) 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.SubmitInfo (VkSubmitInfo)
import System.IO.Unsafe (unsafeDupablePerformIO)
data VkProtectedSubmitInfo = VkProtectedSubmitInfo# Addr#
ByteArray#
instance Eq VkProtectedSubmitInfo where
(VkProtectedSubmitInfo# a _) == x@(VkProtectedSubmitInfo# b _)
= EQ == cmpBytes# (sizeOf x) a b
instance Ord VkProtectedSubmitInfo where
(VkProtectedSubmitInfo# a _) `compare`
x@(VkProtectedSubmitInfo# b _) = cmpBytes# (sizeOf x) a b
instance Storable VkProtectedSubmitInfo where
sizeOf ~_ = (24)
alignment ~_ = (8)
peek = peekVkData#
poke = pokeVkData#
instance VulkanMarshalPrim VkProtectedSubmitInfo where
unsafeAddr (VkProtectedSubmitInfo# a _) = a
unsafeByteArray (VkProtectedSubmitInfo# _ b) = b
unsafeFromByteArrayOffset off b
= VkProtectedSubmitInfo# (plusAddr# (byteArrayContents# b) off) b
instance VulkanMarshal VkProtectedSubmitInfo where
type StructFields VkProtectedSubmitInfo =
'["sType", "pNext", "protectedSubmit"]
type CUnionType VkProtectedSubmitInfo = 'False
type ReturnedOnly VkProtectedSubmitInfo = 'False
type StructExtends VkProtectedSubmitInfo = '[VkSubmitInfo]
instance HasField "sType" VkProtectedSubmitInfo
where
type FieldType "sType" VkProtectedSubmitInfo = VkStructureType
type FieldOptional "sType" VkProtectedSubmitInfo = 'False
type FieldOffset "sType" VkProtectedSubmitInfo =
(0)
type FieldIsArray "sType" VkProtectedSubmitInfo = 'False
fieldOptional = False
fieldOffset = (0)
instance
CanReadField "sType" VkProtectedSubmitInfo where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (0))
readField p
= peekByteOff p (0)
instance
CanWriteField "sType" VkProtectedSubmitInfo where
writeField p
= pokeByteOff p (0)
instance HasField "pNext" VkProtectedSubmitInfo
where
type FieldType "pNext" VkProtectedSubmitInfo = Ptr Void
type FieldOptional "pNext" VkProtectedSubmitInfo = 'False
type FieldOffset "pNext" VkProtectedSubmitInfo =
(8)
type FieldIsArray "pNext" VkProtectedSubmitInfo = 'False
fieldOptional = False
fieldOffset = (8)
instance
CanReadField "pNext" VkProtectedSubmitInfo where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (8))
readField p
= peekByteOff p (8)
instance
CanWriteField "pNext" VkProtectedSubmitInfo where
writeField p
= pokeByteOff p (8)
instance
HasField "protectedSubmit" VkProtectedSubmitInfo where
type FieldType "protectedSubmit" VkProtectedSubmitInfo = VkBool32
type FieldOptional "protectedSubmit" VkProtectedSubmitInfo = 'False
type FieldOffset "protectedSubmit" VkProtectedSubmitInfo =
(16)
type FieldIsArray "protectedSubmit" VkProtectedSubmitInfo = 'False
fieldOptional = False
fieldOffset
= (16)
instance
CanReadField "protectedSubmit" VkProtectedSubmitInfo where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (16))
readField p
= peekByteOff p (16)
instance
CanWriteField "protectedSubmit" VkProtectedSubmitInfo where
writeField p
= pokeByteOff p (16)
instance Show VkProtectedSubmitInfo where
showsPrec d x
= showString "VkProtectedSubmitInfo {" .
showString "sType = " .
showsPrec d (getField @"sType" x) .
showString ", " .
showString "pNext = " .
showsPrec d (getField @"pNext" x) .
showString ", " .
showString "protectedSubmit = " .
showsPrec d (getField @"protectedSubmit" x) . showChar '}'