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