module Graphics.Vulkan.Types.Struct.DrawInd
(VkDrawIndexedIndirectCommand(..), VkDrawIndirectCommand(..)) 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 VkDrawIndexedIndirectCommand = VkDrawIndexedIndirectCommand# Addr#
ByteArray#
instance Eq VkDrawIndexedIndirectCommand where
(VkDrawIndexedIndirectCommand# a _) ==
x@(VkDrawIndexedIndirectCommand# b _)
= EQ == cmpBytes# (sizeOf x) a b
instance Ord VkDrawIndexedIndirectCommand where
(VkDrawIndexedIndirectCommand# a _) `compare`
x@(VkDrawIndexedIndirectCommand# b _) = cmpBytes# (sizeOf x) a b
instance Storable VkDrawIndexedIndirectCommand where
sizeOf ~_ = (20)
alignment ~_
= (4)
peek = peekVkData#
poke = pokeVkData#
instance VulkanMarshalPrim VkDrawIndexedIndirectCommand where
unsafeAddr (VkDrawIndexedIndirectCommand# a _) = a
unsafeByteArray (VkDrawIndexedIndirectCommand# _ b) = b
unsafeFromByteArrayOffset off b
= VkDrawIndexedIndirectCommand#
(plusAddr# (byteArrayContents# b) off)
b
instance VulkanMarshal VkDrawIndexedIndirectCommand where
type StructFields VkDrawIndexedIndirectCommand =
'["indexCount", "instanceCount", "firstIndex", "vertexOffset",
"firstInstance"]
type CUnionType VkDrawIndexedIndirectCommand = 'False
type ReturnedOnly VkDrawIndexedIndirectCommand = 'False
type StructExtends VkDrawIndexedIndirectCommand = '[]
instance
HasField "indexCount" VkDrawIndexedIndirectCommand where
type FieldType "indexCount" VkDrawIndexedIndirectCommand = Word32
type FieldOptional "indexCount" VkDrawIndexedIndirectCommand =
'False
type FieldOffset "indexCount" VkDrawIndexedIndirectCommand =
(0)
type FieldIsArray "indexCount" VkDrawIndexedIndirectCommand =
'False
fieldOptional = False
fieldOffset
= (0)
instance
CanReadField "indexCount" VkDrawIndexedIndirectCommand where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (0))
readField p
= peekByteOff p (0)
instance
CanWriteField "indexCount" VkDrawIndexedIndirectCommand where
writeField p
= pokeByteOff p (0)
instance
HasField "instanceCount" VkDrawIndexedIndirectCommand where
type FieldType "instanceCount" VkDrawIndexedIndirectCommand =
Word32
type FieldOptional "instanceCount" VkDrawIndexedIndirectCommand =
'False
type FieldOffset "instanceCount" VkDrawIndexedIndirectCommand =
(4)
type FieldIsArray "instanceCount" VkDrawIndexedIndirectCommand =
'False
fieldOptional = False
fieldOffset
= (4)
instance
CanReadField "instanceCount" VkDrawIndexedIndirectCommand where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (4))
readField p
= peekByteOff p (4)
instance
CanWriteField "instanceCount" VkDrawIndexedIndirectCommand where
writeField p
= pokeByteOff p (4)
instance
HasField "firstIndex" VkDrawIndexedIndirectCommand where
type FieldType "firstIndex" VkDrawIndexedIndirectCommand = Word32
type FieldOptional "firstIndex" VkDrawIndexedIndirectCommand =
'False
type FieldOffset "firstIndex" VkDrawIndexedIndirectCommand =
(8)
type FieldIsArray "firstIndex" VkDrawIndexedIndirectCommand =
'False
fieldOptional = False
fieldOffset
= (8)
instance
CanReadField "firstIndex" VkDrawIndexedIndirectCommand where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (8))
readField p
= peekByteOff p (8)
instance
CanWriteField "firstIndex" VkDrawIndexedIndirectCommand where
writeField p
= pokeByteOff p (8)
instance
HasField "vertexOffset" VkDrawIndexedIndirectCommand where
type FieldType "vertexOffset" VkDrawIndexedIndirectCommand = Int32
type FieldOptional "vertexOffset" VkDrawIndexedIndirectCommand =
'False
type FieldOffset "vertexOffset" VkDrawIndexedIndirectCommand =
(12)
type FieldIsArray "vertexOffset" VkDrawIndexedIndirectCommand =
'False
fieldOptional = False
fieldOffset
= (12)
instance
CanReadField "vertexOffset" VkDrawIndexedIndirectCommand where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (12))
readField p
= peekByteOff p (12)
instance
CanWriteField "vertexOffset" VkDrawIndexedIndirectCommand where
writeField p
= pokeByteOff p (12)
instance
HasField "firstInstance" VkDrawIndexedIndirectCommand where
type FieldType "firstInstance" VkDrawIndexedIndirectCommand =
Word32
type FieldOptional "firstInstance" VkDrawIndexedIndirectCommand =
'False
type FieldOffset "firstInstance" VkDrawIndexedIndirectCommand =
(16)
type FieldIsArray "firstInstance" VkDrawIndexedIndirectCommand =
'False
fieldOptional = False
fieldOffset
= (16)
instance
CanReadField "firstInstance" VkDrawIndexedIndirectCommand where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (16))
readField p
= peekByteOff p (16)
instance
CanWriteField "firstInstance" VkDrawIndexedIndirectCommand where
writeField p
= pokeByteOff p (16)
instance Show VkDrawIndexedIndirectCommand where
showsPrec d x
= showString "VkDrawIndexedIndirectCommand {" .
showString "indexCount = " .
showsPrec d (getField @"indexCount" x) .
showString ", " .
showString "instanceCount = " .
showsPrec d (getField @"instanceCount" x) .
showString ", " .
showString "firstIndex = " .
showsPrec d (getField @"firstIndex" x) .
showString ", " .
showString "vertexOffset = " .
showsPrec d (getField @"vertexOffset" x) .
showString ", " .
showString "firstInstance = " .
showsPrec d (getField @"firstInstance" x) . showChar '}'
data VkDrawIndirectCommand = VkDrawIndirectCommand# Addr#
ByteArray#
instance Eq VkDrawIndirectCommand where
(VkDrawIndirectCommand# a _) == x@(VkDrawIndirectCommand# b _)
= EQ == cmpBytes# (sizeOf x) a b
instance Ord VkDrawIndirectCommand where
(VkDrawIndirectCommand# a _) `compare`
x@(VkDrawIndirectCommand# b _) = cmpBytes# (sizeOf x) a b
instance Storable VkDrawIndirectCommand where
sizeOf ~_ = (16)
alignment ~_ = (4)
peek = peekVkData#
poke = pokeVkData#
instance VulkanMarshalPrim VkDrawIndirectCommand where
unsafeAddr (VkDrawIndirectCommand# a _) = a
unsafeByteArray (VkDrawIndirectCommand# _ b) = b
unsafeFromByteArrayOffset off b
= VkDrawIndirectCommand# (plusAddr# (byteArrayContents# b) off) b
instance VulkanMarshal VkDrawIndirectCommand where
type StructFields VkDrawIndirectCommand =
'["vertexCount", "instanceCount", "firstVertex", "firstInstance"]
type CUnionType VkDrawIndirectCommand = 'False
type ReturnedOnly VkDrawIndirectCommand = 'False
type StructExtends VkDrawIndirectCommand = '[]
instance
HasField "vertexCount" VkDrawIndirectCommand where
type FieldType "vertexCount" VkDrawIndirectCommand = Word32
type FieldOptional "vertexCount" VkDrawIndirectCommand = 'False
type FieldOffset "vertexCount" VkDrawIndirectCommand =
(0)
type FieldIsArray "vertexCount" VkDrawIndirectCommand = 'False
fieldOptional = False
fieldOffset
= (0)
instance
CanReadField "vertexCount" VkDrawIndirectCommand where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (0))
readField p
= peekByteOff p (0)
instance
CanWriteField "vertexCount" VkDrawIndirectCommand where
writeField p
= pokeByteOff p (0)
instance
HasField "instanceCount" VkDrawIndirectCommand where
type FieldType "instanceCount" VkDrawIndirectCommand = Word32
type FieldOptional "instanceCount" VkDrawIndirectCommand = 'False
type FieldOffset "instanceCount" VkDrawIndirectCommand =
(4)
type FieldIsArray "instanceCount" VkDrawIndirectCommand = 'False
fieldOptional = False
fieldOffset
= (4)
instance
CanReadField "instanceCount" VkDrawIndirectCommand where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (4))
readField p
= peekByteOff p (4)
instance
CanWriteField "instanceCount" VkDrawIndirectCommand where
writeField p
= pokeByteOff p (4)
instance
HasField "firstVertex" VkDrawIndirectCommand where
type FieldType "firstVertex" VkDrawIndirectCommand = Word32
type FieldOptional "firstVertex" VkDrawIndirectCommand = 'False
type FieldOffset "firstVertex" VkDrawIndirectCommand =
(8)
type FieldIsArray "firstVertex" VkDrawIndirectCommand = 'False
fieldOptional = False
fieldOffset
= (8)
instance
CanReadField "firstVertex" VkDrawIndirectCommand where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (8))
readField p
= peekByteOff p (8)
instance
CanWriteField "firstVertex" VkDrawIndirectCommand where
writeField p
= pokeByteOff p (8)
instance
HasField "firstInstance" VkDrawIndirectCommand where
type FieldType "firstInstance" VkDrawIndirectCommand = Word32
type FieldOptional "firstInstance" VkDrawIndirectCommand = 'False
type FieldOffset "firstInstance" VkDrawIndirectCommand =
(12)
type FieldIsArray "firstInstance" VkDrawIndirectCommand = 'False
fieldOptional = False
fieldOffset
= (12)
instance
CanReadField "firstInstance" VkDrawIndirectCommand where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (12))
readField p
= peekByteOff p (12)
instance
CanWriteField "firstInstance" VkDrawIndirectCommand where
writeField p
= pokeByteOff p (12)
instance Show VkDrawIndirectCommand where
showsPrec d x
= showString "VkDrawIndirectCommand {" .
showString "vertexCount = " .
showsPrec d (getField @"vertexCount" x) .
showString ", " .
showString "instanceCount = " .
showsPrec d (getField @"instanceCount" x) .
showString ", " .
showString "firstVertex = " .
showsPrec d (getField @"firstVertex" x) .
showString ", " .
showString "firstInstance = " .
showsPrec d (getField @"firstInstance" x) . showChar '}'