{-# language CPP #-}
module Vulkan.Core11.Promoted_From_VK_KHR_multiview ( PhysicalDeviceMultiviewFeatures(..)
, PhysicalDeviceMultiviewProperties(..)
, RenderPassMultiviewCreateInfo(..)
, StructureType(..)
, DependencyFlagBits(..)
, DependencyFlags
) where
import Foreign.Marshal.Alloc (allocaBytesAligned)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Data.Vector (generateM)
import qualified Data.Vector (imapM_)
import qualified Data.Vector (length)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import Data.Int (Int32)
import Foreign.Ptr (Ptr)
import Data.Word (Word32)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.BaseType (bool32ToBool)
import Vulkan.Core10.BaseType (boolToBool32)
import Vulkan.Core10.BaseType (Bool32)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO))
import Vulkan.Core10.Enums.DependencyFlagBits (DependencyFlagBits(..))
import Vulkan.Core10.Enums.DependencyFlagBits (DependencyFlags)
import Vulkan.Core10.Enums.StructureType (StructureType(..))
data PhysicalDeviceMultiviewFeatures = PhysicalDeviceMultiviewFeatures
{
PhysicalDeviceMultiviewFeatures -> Bool
multiview :: Bool
,
PhysicalDeviceMultiviewFeatures -> Bool
multiviewGeometryShader :: Bool
,
PhysicalDeviceMultiviewFeatures -> Bool
multiviewTessellationShader :: Bool
}
deriving (Typeable)
deriving instance Show PhysicalDeviceMultiviewFeatures
instance ToCStruct PhysicalDeviceMultiviewFeatures where
withCStruct :: PhysicalDeviceMultiviewFeatures
-> (Ptr PhysicalDeviceMultiviewFeatures -> IO b) -> IO b
withCStruct x :: PhysicalDeviceMultiviewFeatures
x f :: Ptr PhysicalDeviceMultiviewFeatures -> IO b
f = Int -> Int -> (Ptr PhysicalDeviceMultiviewFeatures -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((Ptr PhysicalDeviceMultiviewFeatures -> IO b) -> IO b)
-> (Ptr PhysicalDeviceMultiviewFeatures -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDeviceMultiviewFeatures
p -> Ptr PhysicalDeviceMultiviewFeatures
-> PhysicalDeviceMultiviewFeatures -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMultiviewFeatures
p PhysicalDeviceMultiviewFeatures
x (Ptr PhysicalDeviceMultiviewFeatures -> IO b
f Ptr PhysicalDeviceMultiviewFeatures
p)
pokeCStruct :: Ptr PhysicalDeviceMultiviewFeatures
-> PhysicalDeviceMultiviewFeatures -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDeviceMultiviewFeatures
p PhysicalDeviceMultiviewFeatures{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultiviewFeatures
p Ptr PhysicalDeviceMultiviewFeatures -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultiviewFeatures
p Ptr PhysicalDeviceMultiviewFeatures -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultiviewFeatures
p Ptr PhysicalDeviceMultiviewFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
multiview))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultiviewFeatures
p Ptr PhysicalDeviceMultiviewFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
multiviewGeometryShader))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultiviewFeatures
p Ptr PhysicalDeviceMultiviewFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
multiviewTessellationShader))
IO b
f
cStructSize :: Int
cStructSize = 32
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr PhysicalDeviceMultiviewFeatures -> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDeviceMultiviewFeatures
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultiviewFeatures
p Ptr PhysicalDeviceMultiviewFeatures -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultiviewFeatures
p Ptr PhysicalDeviceMultiviewFeatures -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultiviewFeatures
p Ptr PhysicalDeviceMultiviewFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultiviewFeatures
p Ptr PhysicalDeviceMultiviewFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultiviewFeatures
p Ptr PhysicalDeviceMultiviewFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceMultiviewFeatures where
peekCStruct :: Ptr PhysicalDeviceMultiviewFeatures
-> IO PhysicalDeviceMultiviewFeatures
peekCStruct p :: Ptr PhysicalDeviceMultiviewFeatures
p = do
Bool32
multiview <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceMultiviewFeatures
p Ptr PhysicalDeviceMultiviewFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32))
Bool32
multiviewGeometryShader <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceMultiviewFeatures
p Ptr PhysicalDeviceMultiviewFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32))
Bool32
multiviewTessellationShader <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceMultiviewFeatures
p Ptr PhysicalDeviceMultiviewFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32))
PhysicalDeviceMultiviewFeatures
-> IO PhysicalDeviceMultiviewFeatures
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceMultiviewFeatures
-> IO PhysicalDeviceMultiviewFeatures)
-> PhysicalDeviceMultiviewFeatures
-> IO PhysicalDeviceMultiviewFeatures
forall a b. (a -> b) -> a -> b
$ Bool -> Bool -> Bool -> PhysicalDeviceMultiviewFeatures
PhysicalDeviceMultiviewFeatures
(Bool32 -> Bool
bool32ToBool Bool32
multiview) (Bool32 -> Bool
bool32ToBool Bool32
multiviewGeometryShader) (Bool32 -> Bool
bool32ToBool Bool32
multiviewTessellationShader)
instance Storable PhysicalDeviceMultiviewFeatures where
sizeOf :: PhysicalDeviceMultiviewFeatures -> Int
sizeOf ~PhysicalDeviceMultiviewFeatures
_ = 32
alignment :: PhysicalDeviceMultiviewFeatures -> Int
alignment ~PhysicalDeviceMultiviewFeatures
_ = 8
peek :: Ptr PhysicalDeviceMultiviewFeatures
-> IO PhysicalDeviceMultiviewFeatures
peek = Ptr PhysicalDeviceMultiviewFeatures
-> IO PhysicalDeviceMultiviewFeatures
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceMultiviewFeatures
-> PhysicalDeviceMultiviewFeatures -> IO ()
poke ptr :: Ptr PhysicalDeviceMultiviewFeatures
ptr poked :: PhysicalDeviceMultiviewFeatures
poked = Ptr PhysicalDeviceMultiviewFeatures
-> PhysicalDeviceMultiviewFeatures -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMultiviewFeatures
ptr PhysicalDeviceMultiviewFeatures
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceMultiviewFeatures where
zero :: PhysicalDeviceMultiviewFeatures
zero = Bool -> Bool -> Bool -> PhysicalDeviceMultiviewFeatures
PhysicalDeviceMultiviewFeatures
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
data PhysicalDeviceMultiviewProperties = PhysicalDeviceMultiviewProperties
{
PhysicalDeviceMultiviewProperties -> Word32
maxMultiviewViewCount :: Word32
,
PhysicalDeviceMultiviewProperties -> Word32
maxMultiviewInstanceIndex :: Word32
}
deriving (Typeable)
deriving instance Show PhysicalDeviceMultiviewProperties
instance ToCStruct PhysicalDeviceMultiviewProperties where
withCStruct :: PhysicalDeviceMultiviewProperties
-> (Ptr PhysicalDeviceMultiviewProperties -> IO b) -> IO b
withCStruct x :: PhysicalDeviceMultiviewProperties
x f :: Ptr PhysicalDeviceMultiviewProperties -> IO b
f = Int
-> Int -> (Ptr PhysicalDeviceMultiviewProperties -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr PhysicalDeviceMultiviewProperties -> IO b) -> IO b)
-> (Ptr PhysicalDeviceMultiviewProperties -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDeviceMultiviewProperties
p -> Ptr PhysicalDeviceMultiviewProperties
-> PhysicalDeviceMultiviewProperties -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMultiviewProperties
p PhysicalDeviceMultiviewProperties
x (Ptr PhysicalDeviceMultiviewProperties -> IO b
f Ptr PhysicalDeviceMultiviewProperties
p)
pokeCStruct :: Ptr PhysicalDeviceMultiviewProperties
-> PhysicalDeviceMultiviewProperties -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDeviceMultiviewProperties
p PhysicalDeviceMultiviewProperties{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultiviewProperties
p Ptr PhysicalDeviceMultiviewProperties -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultiviewProperties
p Ptr PhysicalDeviceMultiviewProperties -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultiviewProperties
p Ptr PhysicalDeviceMultiviewProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) (Word32
maxMultiviewViewCount)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultiviewProperties
p Ptr PhysicalDeviceMultiviewProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) (Word32
maxMultiviewInstanceIndex)
IO b
f
cStructSize :: Int
cStructSize = 24
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr PhysicalDeviceMultiviewProperties -> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDeviceMultiviewProperties
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultiviewProperties
p Ptr PhysicalDeviceMultiviewProperties -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultiviewProperties
p Ptr PhysicalDeviceMultiviewProperties -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultiviewProperties
p Ptr PhysicalDeviceMultiviewProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultiviewProperties
p Ptr PhysicalDeviceMultiviewProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDeviceMultiviewProperties where
peekCStruct :: Ptr PhysicalDeviceMultiviewProperties
-> IO PhysicalDeviceMultiviewProperties
peekCStruct p :: Ptr PhysicalDeviceMultiviewProperties
p = do
Word32
maxMultiviewViewCount <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceMultiviewProperties
p Ptr PhysicalDeviceMultiviewProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32))
Word32
maxMultiviewInstanceIndex <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceMultiviewProperties
p Ptr PhysicalDeviceMultiviewProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32))
PhysicalDeviceMultiviewProperties
-> IO PhysicalDeviceMultiviewProperties
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceMultiviewProperties
-> IO PhysicalDeviceMultiviewProperties)
-> PhysicalDeviceMultiviewProperties
-> IO PhysicalDeviceMultiviewProperties
forall a b. (a -> b) -> a -> b
$ Word32 -> Word32 -> PhysicalDeviceMultiviewProperties
PhysicalDeviceMultiviewProperties
Word32
maxMultiviewViewCount Word32
maxMultiviewInstanceIndex
instance Storable PhysicalDeviceMultiviewProperties where
sizeOf :: PhysicalDeviceMultiviewProperties -> Int
sizeOf ~PhysicalDeviceMultiviewProperties
_ = 24
alignment :: PhysicalDeviceMultiviewProperties -> Int
alignment ~PhysicalDeviceMultiviewProperties
_ = 8
peek :: Ptr PhysicalDeviceMultiviewProperties
-> IO PhysicalDeviceMultiviewProperties
peek = Ptr PhysicalDeviceMultiviewProperties
-> IO PhysicalDeviceMultiviewProperties
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceMultiviewProperties
-> PhysicalDeviceMultiviewProperties -> IO ()
poke ptr :: Ptr PhysicalDeviceMultiviewProperties
ptr poked :: PhysicalDeviceMultiviewProperties
poked = Ptr PhysicalDeviceMultiviewProperties
-> PhysicalDeviceMultiviewProperties -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMultiviewProperties
ptr PhysicalDeviceMultiviewProperties
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceMultiviewProperties where
zero :: PhysicalDeviceMultiviewProperties
zero = Word32 -> Word32 -> PhysicalDeviceMultiviewProperties
PhysicalDeviceMultiviewProperties
Word32
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
data RenderPassMultiviewCreateInfo = RenderPassMultiviewCreateInfo
{
RenderPassMultiviewCreateInfo -> Vector Word32
viewMasks :: Vector Word32
,
RenderPassMultiviewCreateInfo -> Vector Int32
viewOffsets :: Vector Int32
,
RenderPassMultiviewCreateInfo -> Vector Word32
correlationMasks :: Vector Word32
}
deriving (Typeable)
deriving instance Show RenderPassMultiviewCreateInfo
instance ToCStruct RenderPassMultiviewCreateInfo where
withCStruct :: RenderPassMultiviewCreateInfo
-> (Ptr RenderPassMultiviewCreateInfo -> IO b) -> IO b
withCStruct x :: RenderPassMultiviewCreateInfo
x f :: Ptr RenderPassMultiviewCreateInfo -> IO b
f = Int -> Int -> (Ptr RenderPassMultiviewCreateInfo -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 64 8 ((Ptr RenderPassMultiviewCreateInfo -> IO b) -> IO b)
-> (Ptr RenderPassMultiviewCreateInfo -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr RenderPassMultiviewCreateInfo
p -> Ptr RenderPassMultiviewCreateInfo
-> RenderPassMultiviewCreateInfo -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr RenderPassMultiviewCreateInfo
p RenderPassMultiviewCreateInfo
x (Ptr RenderPassMultiviewCreateInfo -> IO b
f Ptr RenderPassMultiviewCreateInfo
p)
pokeCStruct :: Ptr RenderPassMultiviewCreateInfo
-> RenderPassMultiviewCreateInfo -> IO b -> IO b
pokeCStruct p :: Ptr RenderPassMultiviewCreateInfo
p RenderPassMultiviewCreateInfo{..} f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassMultiviewCreateInfo
p Ptr RenderPassMultiviewCreateInfo -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassMultiviewCreateInfo
p Ptr RenderPassMultiviewCreateInfo -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassMultiviewCreateInfo
p Ptr RenderPassMultiviewCreateInfo -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) ((Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector Word32 -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Word32 -> Int) -> Vector Word32 -> Int
forall a b. (a -> b) -> a -> b
$ (Vector Word32
viewMasks)) :: Word32))
Ptr Word32
pPViewMasks' <- ((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32))
-> ((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32)
forall a b. (a -> b) -> a -> b
$ Int -> Int -> (Ptr Word32 -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @Word32 ((Vector Word32 -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Word32
viewMasks)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 4) 4
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> Word32 -> IO ()) -> Vector Word32 -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: Word32
e -> Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Word32
pPViewMasks' Ptr Word32 -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) (Word32
e)) (Vector Word32
viewMasks)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr Word32) -> Ptr Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassMultiviewCreateInfo
p Ptr RenderPassMultiviewCreateInfo -> Int -> Ptr (Ptr Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr Word32))) (Ptr Word32
pPViewMasks')
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassMultiviewCreateInfo
p Ptr RenderPassMultiviewCreateInfo -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) ((Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector Int32 -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Int32 -> Int) -> Vector Int32 -> Int
forall a b. (a -> b) -> a -> b
$ (Vector Int32
viewOffsets)) :: Word32))
Ptr Int32
pPViewOffsets' <- ((Ptr Int32 -> IO b) -> IO b) -> ContT b IO (Ptr Int32)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr Int32 -> IO b) -> IO b) -> ContT b IO (Ptr Int32))
-> ((Ptr Int32 -> IO b) -> IO b) -> ContT b IO (Ptr Int32)
forall a b. (a -> b) -> a -> b
$ Int -> Int -> (Ptr Int32 -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @Int32 ((Vector Int32 -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Int32
viewOffsets)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 4) 4
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> Int32 -> IO ()) -> Vector Int32 -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: Int32
e -> Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Int32
pPViewOffsets' Ptr Int32 -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Int32) (Int32
e)) (Vector Int32
viewOffsets)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr Int32) -> Ptr Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassMultiviewCreateInfo
p Ptr RenderPassMultiviewCreateInfo -> Int -> Ptr (Ptr Int32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr Int32))) (Ptr Int32
pPViewOffsets')
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassMultiviewCreateInfo
p Ptr RenderPassMultiviewCreateInfo -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word32)) ((Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector Word32 -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Word32 -> Int) -> Vector Word32 -> Int
forall a b. (a -> b) -> a -> b
$ (Vector Word32
correlationMasks)) :: Word32))
Ptr Word32
pPCorrelationMasks' <- ((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32))
-> ((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32)
forall a b. (a -> b) -> a -> b
$ Int -> Int -> (Ptr Word32 -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @Word32 ((Vector Word32 -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Word32
correlationMasks)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 4) 4
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> Word32 -> IO ()) -> Vector Word32 -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: Word32
e -> Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Word32
pPCorrelationMasks' Ptr Word32 -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) (Word32
e)) (Vector Word32
correlationMasks)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr Word32) -> Ptr Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassMultiviewCreateInfo
p Ptr RenderPassMultiviewCreateInfo -> Int -> Ptr (Ptr Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr (Ptr Word32))) (Ptr Word32
pPCorrelationMasks')
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = 64
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr RenderPassMultiviewCreateInfo -> IO b -> IO b
pokeZeroCStruct p :: Ptr RenderPassMultiviewCreateInfo
p f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassMultiviewCreateInfo
p Ptr RenderPassMultiviewCreateInfo -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassMultiviewCreateInfo
p Ptr RenderPassMultiviewCreateInfo -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32
pPViewMasks' <- ((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32))
-> ((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32)
forall a b. (a -> b) -> a -> b
$ Int -> Int -> (Ptr Word32 -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @Word32 ((Vector Any -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Any
forall a. Monoid a => a
mempty)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 4) 4
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> Word32 -> IO ()) -> Vector Word32 -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: Word32
e -> Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Word32
pPViewMasks' Ptr Word32 -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) (Word32
e)) (Vector Word32
forall a. Monoid a => a
mempty)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr Word32) -> Ptr Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassMultiviewCreateInfo
p Ptr RenderPassMultiviewCreateInfo -> Int -> Ptr (Ptr Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr Word32))) (Ptr Word32
pPViewMasks')
Ptr Int32
pPViewOffsets' <- ((Ptr Int32 -> IO b) -> IO b) -> ContT b IO (Ptr Int32)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr Int32 -> IO b) -> IO b) -> ContT b IO (Ptr Int32))
-> ((Ptr Int32 -> IO b) -> IO b) -> ContT b IO (Ptr Int32)
forall a b. (a -> b) -> a -> b
$ Int -> Int -> (Ptr Int32 -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @Int32 ((Vector Any -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Any
forall a. Monoid a => a
mempty)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 4) 4
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> Int32 -> IO ()) -> Vector Int32 -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: Int32
e -> Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Int32
pPViewOffsets' Ptr Int32 -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Int32) (Int32
e)) (Vector Int32
forall a. Monoid a => a
mempty)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr Int32) -> Ptr Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassMultiviewCreateInfo
p Ptr RenderPassMultiviewCreateInfo -> Int -> Ptr (Ptr Int32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr Int32))) (Ptr Int32
pPViewOffsets')
Ptr Word32
pPCorrelationMasks' <- ((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32))
-> ((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32)
forall a b. (a -> b) -> a -> b
$ Int -> Int -> (Ptr Word32 -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @Word32 ((Vector Any -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Any
forall a. Monoid a => a
mempty)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 4) 4
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> Word32 -> IO ()) -> Vector Word32 -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: Word32
e -> Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Word32
pPCorrelationMasks' Ptr Word32 -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) (Word32
e)) (Vector Word32
forall a. Monoid a => a
mempty)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr Word32) -> Ptr Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassMultiviewCreateInfo
p Ptr RenderPassMultiviewCreateInfo -> Int -> Ptr (Ptr Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr (Ptr Word32))) (Ptr Word32
pPCorrelationMasks')
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
instance FromCStruct RenderPassMultiviewCreateInfo where
peekCStruct :: Ptr RenderPassMultiviewCreateInfo
-> IO RenderPassMultiviewCreateInfo
peekCStruct p :: Ptr RenderPassMultiviewCreateInfo
p = do
Word32
subpassCount <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RenderPassMultiviewCreateInfo
p Ptr RenderPassMultiviewCreateInfo -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32))
Ptr Word32
pViewMasks <- Ptr (Ptr Word32) -> IO (Ptr Word32)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr Word32) ((Ptr RenderPassMultiviewCreateInfo
p Ptr RenderPassMultiviewCreateInfo -> Int -> Ptr (Ptr Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr Word32)))
Vector Word32
pViewMasks' <- Int -> (Int -> IO Word32) -> IO (Vector Word32)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
subpassCount) (\i :: Int
i -> Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr Word32
pViewMasks Ptr Word32 -> Int -> Ptr Word32
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32)))
Word32
dependencyCount <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RenderPassMultiviewCreateInfo
p Ptr RenderPassMultiviewCreateInfo -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32))
Ptr Int32
pViewOffsets <- Ptr (Ptr Int32) -> IO (Ptr Int32)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr Int32) ((Ptr RenderPassMultiviewCreateInfo
p Ptr RenderPassMultiviewCreateInfo -> Int -> Ptr (Ptr Int32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr Int32)))
Vector Int32
pViewOffsets' <- Int -> (Int -> IO Int32) -> IO (Vector Int32)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
dependencyCount) (\i :: Int
i -> Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek @Int32 ((Ptr Int32
pViewOffsets Ptr Int32 -> Int -> Ptr Int32
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Int32)))
Word32
correlationMaskCount <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RenderPassMultiviewCreateInfo
p Ptr RenderPassMultiviewCreateInfo -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word32))
Ptr Word32
pCorrelationMasks <- Ptr (Ptr Word32) -> IO (Ptr Word32)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr Word32) ((Ptr RenderPassMultiviewCreateInfo
p Ptr RenderPassMultiviewCreateInfo -> Int -> Ptr (Ptr Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr (Ptr Word32)))
Vector Word32
pCorrelationMasks' <- Int -> (Int -> IO Word32) -> IO (Vector Word32)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
correlationMaskCount) (\i :: Int
i -> Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr Word32
pCorrelationMasks Ptr Word32 -> Int -> Ptr Word32
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32)))
RenderPassMultiviewCreateInfo -> IO RenderPassMultiviewCreateInfo
forall (f :: * -> *) a. Applicative f => a -> f a
pure (RenderPassMultiviewCreateInfo -> IO RenderPassMultiviewCreateInfo)
-> RenderPassMultiviewCreateInfo
-> IO RenderPassMultiviewCreateInfo
forall a b. (a -> b) -> a -> b
$ Vector Word32
-> Vector Int32 -> Vector Word32 -> RenderPassMultiviewCreateInfo
RenderPassMultiviewCreateInfo
Vector Word32
pViewMasks' Vector Int32
pViewOffsets' Vector Word32
pCorrelationMasks'
instance Zero RenderPassMultiviewCreateInfo where
zero :: RenderPassMultiviewCreateInfo
zero = Vector Word32
-> Vector Int32 -> Vector Word32 -> RenderPassMultiviewCreateInfo
RenderPassMultiviewCreateInfo
Vector Word32
forall a. Monoid a => a
mempty
Vector Int32
forall a. Monoid a => a
mempty
Vector Word32
forall a. Monoid a => a
mempty