module Graphics.Vulkan.Types.Struct.Subpass
(VkSubpassDependency(..), VkSubpassDescription(..),
VkSubpassSampleLocationsEXT(..))
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.AccessFlags (VkAccessFlags)
import Graphics.Vulkan.Types.Enum.DependencyFlags (VkDependencyFlags)
import Graphics.Vulkan.Types.Enum.Pipeline (VkPipelineBindPoint,
VkPipelineStageFlags)
import Graphics.Vulkan.Types.Enum.Subpass (VkSubpassDescriptionFlags)
import Graphics.Vulkan.Types.Struct.Attachment (VkAttachmentReference)
import Graphics.Vulkan.Types.Struct.SampleLocation (VkSampleLocationsInfoEXT)
import System.IO.Unsafe (unsafeDupablePerformIO)
data VkSubpassDependency = VkSubpassDependency# Addr# ByteArray#
instance Eq VkSubpassDependency where
(VkSubpassDependency# a _) == x@(VkSubpassDependency# b _)
= EQ == cmpBytes# (sizeOf x) a b
instance Ord VkSubpassDependency where
(VkSubpassDependency# a _) `compare` x@(VkSubpassDependency# b _)
= cmpBytes# (sizeOf x) a b
instance Storable VkSubpassDependency where
sizeOf ~_ = (28)
alignment ~_ = (4)
peek = peekVkData#
poke = pokeVkData#
instance VulkanMarshalPrim VkSubpassDependency where
unsafeAddr (VkSubpassDependency# a _) = a
unsafeByteArray (VkSubpassDependency# _ b) = b
unsafeFromByteArrayOffset off b
= VkSubpassDependency# (plusAddr# (byteArrayContents# b) off) b
instance VulkanMarshal VkSubpassDependency where
type StructFields VkSubpassDependency =
'["srcSubpass", "dstSubpass", "srcStageMask", "dstStageMask",
"srcAccessMask", "dstAccessMask", "dependencyFlags"]
type CUnionType VkSubpassDependency = 'False
type ReturnedOnly VkSubpassDependency = 'False
type StructExtends VkSubpassDependency = '[]
instance
HasField "srcSubpass" VkSubpassDependency where
type FieldType "srcSubpass" VkSubpassDependency = Word32
type FieldOptional "srcSubpass" VkSubpassDependency = 'False
type FieldOffset "srcSubpass" VkSubpassDependency =
(0)
type FieldIsArray "srcSubpass" VkSubpassDependency = 'False
fieldOptional = False
fieldOffset = (0)
instance
CanReadField "srcSubpass" VkSubpassDependency where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (0))
readField p
= peekByteOff p (0)
instance
CanWriteField "srcSubpass" VkSubpassDependency where
writeField p
= pokeByteOff p (0)
instance
HasField "dstSubpass" VkSubpassDependency where
type FieldType "dstSubpass" VkSubpassDependency = Word32
type FieldOptional "dstSubpass" VkSubpassDependency = 'False
type FieldOffset "dstSubpass" VkSubpassDependency =
(4)
type FieldIsArray "dstSubpass" VkSubpassDependency = 'False
fieldOptional = False
fieldOffset = (4)
instance
CanReadField "dstSubpass" VkSubpassDependency where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (4))
readField p
= peekByteOff p (4)
instance
CanWriteField "dstSubpass" VkSubpassDependency where
writeField p
= pokeByteOff p (4)
instance
HasField "srcStageMask" VkSubpassDependency where
type FieldType "srcStageMask" VkSubpassDependency =
VkPipelineStageFlags
type FieldOptional "srcStageMask" VkSubpassDependency = 'False
type FieldOffset "srcStageMask" VkSubpassDependency =
(8)
type FieldIsArray "srcStageMask" VkSubpassDependency = 'False
fieldOptional = False
fieldOffset
= (8)
instance
CanReadField "srcStageMask" VkSubpassDependency where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (8))
readField p
= peekByteOff p (8)
instance
CanWriteField "srcStageMask" VkSubpassDependency where
writeField p
= pokeByteOff p (8)
instance
HasField "dstStageMask" VkSubpassDependency where
type FieldType "dstStageMask" VkSubpassDependency =
VkPipelineStageFlags
type FieldOptional "dstStageMask" VkSubpassDependency = 'False
type FieldOffset "dstStageMask" VkSubpassDependency =
(12)
type FieldIsArray "dstStageMask" VkSubpassDependency = 'False
fieldOptional = False
fieldOffset
= (12)
instance
CanReadField "dstStageMask" VkSubpassDependency where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (12))
readField p
= peekByteOff p (12)
instance
CanWriteField "dstStageMask" VkSubpassDependency where
writeField p
= pokeByteOff p (12)
instance
HasField "srcAccessMask" VkSubpassDependency where
type FieldType "srcAccessMask" VkSubpassDependency = VkAccessFlags
type FieldOptional "srcAccessMask" VkSubpassDependency = 'True
type FieldOffset "srcAccessMask" VkSubpassDependency =
(16)
type FieldIsArray "srcAccessMask" VkSubpassDependency = 'False
fieldOptional = True
fieldOffset
= (16)
instance
CanReadField "srcAccessMask" VkSubpassDependency where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (16))
readField p
= peekByteOff p (16)
instance
CanWriteField "srcAccessMask" VkSubpassDependency where
writeField p
= pokeByteOff p (16)
instance
HasField "dstAccessMask" VkSubpassDependency where
type FieldType "dstAccessMask" VkSubpassDependency = VkAccessFlags
type FieldOptional "dstAccessMask" VkSubpassDependency = 'True
type FieldOffset "dstAccessMask" VkSubpassDependency =
(20)
type FieldIsArray "dstAccessMask" VkSubpassDependency = 'False
fieldOptional = True
fieldOffset
= (20)
instance
CanReadField "dstAccessMask" VkSubpassDependency where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (20))
readField p
= peekByteOff p (20)
instance
CanWriteField "dstAccessMask" VkSubpassDependency where
writeField p
= pokeByteOff p (20)
instance
HasField "dependencyFlags" VkSubpassDependency where
type FieldType "dependencyFlags" VkSubpassDependency =
VkDependencyFlags
type FieldOptional "dependencyFlags" VkSubpassDependency = 'True
type FieldOffset "dependencyFlags" VkSubpassDependency =
(24)
type FieldIsArray "dependencyFlags" VkSubpassDependency = 'False
fieldOptional = True
fieldOffset
= (24)
instance
CanReadField "dependencyFlags" VkSubpassDependency where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (24))
readField p
= peekByteOff p (24)
instance
CanWriteField "dependencyFlags" VkSubpassDependency where
writeField p
= pokeByteOff p (24)
instance Show VkSubpassDependency where
showsPrec d x
= showString "VkSubpassDependency {" .
showString "srcSubpass = " .
showsPrec d (getField @"srcSubpass" x) .
showString ", " .
showString "dstSubpass = " .
showsPrec d (getField @"dstSubpass" x) .
showString ", " .
showString "srcStageMask = " .
showsPrec d (getField @"srcStageMask" x) .
showString ", " .
showString "dstStageMask = " .
showsPrec d (getField @"dstStageMask" x) .
showString ", " .
showString "srcAccessMask = " .
showsPrec d (getField @"srcAccessMask" x) .
showString ", " .
showString "dstAccessMask = " .
showsPrec d (getField @"dstAccessMask" x) .
showString ", " .
showString "dependencyFlags = " .
showsPrec d (getField @"dependencyFlags" x) .
showChar '}'
data VkSubpassDescription = VkSubpassDescription# Addr# ByteArray#
instance Eq VkSubpassDescription where
(VkSubpassDescription# a _) == x@(VkSubpassDescription# b _)
= EQ == cmpBytes# (sizeOf x) a b
instance Ord VkSubpassDescription where
(VkSubpassDescription# a _) `compare` x@(VkSubpassDescription# b _)
= cmpBytes# (sizeOf x) a b
instance Storable VkSubpassDescription where
sizeOf ~_ = (72)
alignment ~_ = (8)
peek = peekVkData#
poke = pokeVkData#
instance VulkanMarshalPrim VkSubpassDescription where
unsafeAddr (VkSubpassDescription# a _) = a
unsafeByteArray (VkSubpassDescription# _ b) = b
unsafeFromByteArrayOffset off b
= VkSubpassDescription# (plusAddr# (byteArrayContents# b) off) b
instance VulkanMarshal VkSubpassDescription where
type StructFields VkSubpassDescription =
'["flags", "pipelineBindPoint", "inputAttachmentCount",
"pInputAttachments", "colorAttachmentCount", "pColorAttachments",
"pResolveAttachments", "pDepthStencilAttachment",
"preserveAttachmentCount", "pPreserveAttachments"]
type CUnionType VkSubpassDescription = 'False
type ReturnedOnly VkSubpassDescription = 'False
type StructExtends VkSubpassDescription = '[]
instance HasField "flags" VkSubpassDescription
where
type FieldType "flags" VkSubpassDescription =
VkSubpassDescriptionFlags
type FieldOptional "flags" VkSubpassDescription = 'True
type FieldOffset "flags" VkSubpassDescription =
(0)
type FieldIsArray "flags" VkSubpassDescription = 'False
fieldOptional = True
fieldOffset = (0)
instance
CanReadField "flags" VkSubpassDescription where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (0))
readField p
= peekByteOff p (0)
instance
CanWriteField "flags" VkSubpassDescription where
writeField p
= pokeByteOff p (0)
instance
HasField "pipelineBindPoint" VkSubpassDescription where
type FieldType "pipelineBindPoint" VkSubpassDescription =
VkPipelineBindPoint
type FieldOptional "pipelineBindPoint" VkSubpassDescription =
'False
type FieldOffset "pipelineBindPoint" VkSubpassDescription =
(4)
type FieldIsArray "pipelineBindPoint" VkSubpassDescription = 'False
fieldOptional = False
fieldOffset
= (4)
instance
CanReadField "pipelineBindPoint" VkSubpassDescription where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (4))
readField p
= peekByteOff p (4)
instance
CanWriteField "pipelineBindPoint" VkSubpassDescription where
writeField p
= pokeByteOff p (4)
instance
HasField "inputAttachmentCount" VkSubpassDescription where
type FieldType "inputAttachmentCount" VkSubpassDescription = Word32
type FieldOptional "inputAttachmentCount" VkSubpassDescription =
'True
type FieldOffset "inputAttachmentCount" VkSubpassDescription =
(8)
type FieldIsArray "inputAttachmentCount" VkSubpassDescription =
'False
fieldOptional = True
fieldOffset
= (8)
instance
CanReadField "inputAttachmentCount" VkSubpassDescription where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (8))
readField p
= peekByteOff p (8)
instance
CanWriteField "inputAttachmentCount" VkSubpassDescription where
writeField p
= pokeByteOff p (8)
instance
HasField "pInputAttachments" VkSubpassDescription where
type FieldType "pInputAttachments" VkSubpassDescription =
Ptr VkAttachmentReference
type FieldOptional "pInputAttachments" VkSubpassDescription =
'False
type FieldOffset "pInputAttachments" VkSubpassDescription =
(16)
type FieldIsArray "pInputAttachments" VkSubpassDescription = 'False
fieldOptional = False
fieldOffset
= (16)
instance
CanReadField "pInputAttachments" VkSubpassDescription where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (16))
readField p
= peekByteOff p (16)
instance
CanWriteField "pInputAttachments" VkSubpassDescription where
writeField p
= pokeByteOff p (16)
instance
HasField "colorAttachmentCount" VkSubpassDescription where
type FieldType "colorAttachmentCount" VkSubpassDescription = Word32
type FieldOptional "colorAttachmentCount" VkSubpassDescription =
'True
type FieldOffset "colorAttachmentCount" VkSubpassDescription =
(24)
type FieldIsArray "colorAttachmentCount" VkSubpassDescription =
'False
fieldOptional = True
fieldOffset
= (24)
instance
CanReadField "colorAttachmentCount" VkSubpassDescription where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (24))
readField p
= peekByteOff p (24)
instance
CanWriteField "colorAttachmentCount" VkSubpassDescription where
writeField p
= pokeByteOff p (24)
instance
HasField "pColorAttachments" VkSubpassDescription where
type FieldType "pColorAttachments" VkSubpassDescription =
Ptr VkAttachmentReference
type FieldOptional "pColorAttachments" VkSubpassDescription =
'False
type FieldOffset "pColorAttachments" VkSubpassDescription =
(32)
type FieldIsArray "pColorAttachments" VkSubpassDescription = 'False
fieldOptional = False
fieldOffset
= (32)
instance
CanReadField "pColorAttachments" VkSubpassDescription where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (32))
readField p
= peekByteOff p (32)
instance
CanWriteField "pColorAttachments" VkSubpassDescription where
writeField p
= pokeByteOff p (32)
instance
HasField "pResolveAttachments" VkSubpassDescription where
type FieldType "pResolveAttachments" VkSubpassDescription =
Ptr VkAttachmentReference
type FieldOptional "pResolveAttachments" VkSubpassDescription =
'True
type FieldOffset "pResolveAttachments" VkSubpassDescription =
(40)
type FieldIsArray "pResolveAttachments" VkSubpassDescription =
'False
fieldOptional = True
fieldOffset
= (40)
instance
CanReadField "pResolveAttachments" VkSubpassDescription where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (40))
readField p
= peekByteOff p (40)
instance
CanWriteField "pResolveAttachments" VkSubpassDescription where
writeField p
= pokeByteOff p (40)
instance
HasField "pDepthStencilAttachment" VkSubpassDescription where
type FieldType "pDepthStencilAttachment" VkSubpassDescription =
Ptr VkAttachmentReference
type FieldOptional "pDepthStencilAttachment" VkSubpassDescription =
'True
type FieldOffset "pDepthStencilAttachment" VkSubpassDescription =
(48)
type FieldIsArray "pDepthStencilAttachment" VkSubpassDescription =
'False
fieldOptional = True
fieldOffset
= (48)
instance
CanReadField "pDepthStencilAttachment" VkSubpassDescription where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (48))
readField p
= peekByteOff p (48)
instance
CanWriteField "pDepthStencilAttachment" VkSubpassDescription where
writeField p
= pokeByteOff p (48)
instance
HasField "preserveAttachmentCount" VkSubpassDescription where
type FieldType "preserveAttachmentCount" VkSubpassDescription =
Word32
type FieldOptional "preserveAttachmentCount" VkSubpassDescription =
'True
type FieldOffset "preserveAttachmentCount" VkSubpassDescription =
(56)
type FieldIsArray "preserveAttachmentCount" VkSubpassDescription =
'False
fieldOptional = True
fieldOffset
= (56)
instance
CanReadField "preserveAttachmentCount" VkSubpassDescription where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (56))
readField p
= peekByteOff p (56)
instance
CanWriteField "preserveAttachmentCount" VkSubpassDescription where
writeField p
= pokeByteOff p (56)
instance
HasField "pPreserveAttachments" VkSubpassDescription where
type FieldType "pPreserveAttachments" VkSubpassDescription =
Ptr Word32
type FieldOptional "pPreserveAttachments" VkSubpassDescription =
'False
type FieldOffset "pPreserveAttachments" VkSubpassDescription =
(64)
type FieldIsArray "pPreserveAttachments" VkSubpassDescription =
'False
fieldOptional = False
fieldOffset
= (64)
instance
CanReadField "pPreserveAttachments" VkSubpassDescription where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (64))
readField p
= peekByteOff p (64)
instance
CanWriteField "pPreserveAttachments" VkSubpassDescription where
writeField p
= pokeByteOff p (64)
instance Show VkSubpassDescription where
showsPrec d x
= showString "VkSubpassDescription {" .
showString "flags = " .
showsPrec d (getField @"flags" x) .
showString ", " .
showString "pipelineBindPoint = " .
showsPrec d (getField @"pipelineBindPoint" x) .
showString ", " .
showString "inputAttachmentCount = " .
showsPrec d (getField @"inputAttachmentCount" x) .
showString ", " .
showString "pInputAttachments = " .
showsPrec d (getField @"pInputAttachments" x) .
showString ", " .
showString "colorAttachmentCount = " .
showsPrec d (getField @"colorAttachmentCount" x) .
showString ", " .
showString "pColorAttachments = " .
showsPrec d (getField @"pColorAttachments" x) .
showString ", " .
showString "pResolveAttachments = " .
showsPrec d (getField @"pResolveAttachments" x)
.
showString ", " .
showString "pDepthStencilAttachment = " .
showsPrec d
(getField @"pDepthStencilAttachment" x)
.
showString ", " .
showString
"preserveAttachmentCount = "
.
showsPrec d
(getField
@"preserveAttachmentCount"
x)
.
showString ", " .
showString
"pPreserveAttachments = "
.
showsPrec d
(getField
@"pPreserveAttachments"
x)
. showChar '}'
data VkSubpassSampleLocationsEXT = VkSubpassSampleLocationsEXT# Addr#
ByteArray#
instance Eq VkSubpassSampleLocationsEXT where
(VkSubpassSampleLocationsEXT# a _) ==
x@(VkSubpassSampleLocationsEXT# b _)
= EQ == cmpBytes# (sizeOf x) a b
instance Ord VkSubpassSampleLocationsEXT where
(VkSubpassSampleLocationsEXT# a _) `compare`
x@(VkSubpassSampleLocationsEXT# b _) = cmpBytes# (sizeOf x) a b
instance Storable VkSubpassSampleLocationsEXT where
sizeOf ~_ = (48)
alignment ~_ = (8)
peek = peekVkData#
poke = pokeVkData#
instance VulkanMarshalPrim VkSubpassSampleLocationsEXT where
unsafeAddr (VkSubpassSampleLocationsEXT# a _) = a
unsafeByteArray (VkSubpassSampleLocationsEXT# _ b) = b
unsafeFromByteArrayOffset off b
= VkSubpassSampleLocationsEXT#
(plusAddr# (byteArrayContents# b) off)
b
instance VulkanMarshal VkSubpassSampleLocationsEXT where
type StructFields VkSubpassSampleLocationsEXT =
'["subpassIndex", "sampleLocationsInfo"]
type CUnionType VkSubpassSampleLocationsEXT = 'False
type ReturnedOnly VkSubpassSampleLocationsEXT = 'False
type StructExtends VkSubpassSampleLocationsEXT = '[]
instance
HasField "subpassIndex" VkSubpassSampleLocationsEXT where
type FieldType "subpassIndex" VkSubpassSampleLocationsEXT = Word32
type FieldOptional "subpassIndex" VkSubpassSampleLocationsEXT =
'False
type FieldOffset "subpassIndex" VkSubpassSampleLocationsEXT =
(0)
type FieldIsArray "subpassIndex" VkSubpassSampleLocationsEXT =
'False
fieldOptional = False
fieldOffset
= (0)
instance
CanReadField "subpassIndex" VkSubpassSampleLocationsEXT where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (0))
readField p
= peekByteOff p (0)
instance
CanWriteField "subpassIndex" VkSubpassSampleLocationsEXT where
writeField p
= pokeByteOff p (0)
instance
HasField "sampleLocationsInfo" VkSubpassSampleLocationsEXT where
type FieldType "sampleLocationsInfo" VkSubpassSampleLocationsEXT =
VkSampleLocationsInfoEXT
type FieldOptional "sampleLocationsInfo"
VkSubpassSampleLocationsEXT
= 'False
type FieldOffset "sampleLocationsInfo" VkSubpassSampleLocationsEXT
=
(8)
type FieldIsArray "sampleLocationsInfo" VkSubpassSampleLocationsEXT
= 'False
fieldOptional = False
fieldOffset
= (8)
instance
CanReadField "sampleLocationsInfo" VkSubpassSampleLocationsEXT
where
getField x
= unsafeDupablePerformIO
(peekByteOff (unsafePtr x) (8))
readField p
= peekByteOff p (8)
instance
CanWriteField "sampleLocationsInfo" VkSubpassSampleLocationsEXT
where
writeField p
= pokeByteOff p (8)
instance Show VkSubpassSampleLocationsEXT where
showsPrec d x
= showString "VkSubpassSampleLocationsEXT {" .
showString "subpassIndex = " .
showsPrec d (getField @"subpassIndex" x) .
showString ", " .
showString "sampleLocationsInfo = " .
showsPrec d (getField @"sampleLocationsInfo" x) . showChar '}'