{-# language CPP #-}
module Vulkan.Extensions.VK_KHR_maintenance6 ( cmdSetDescriptorBufferOffsets2EXT
, cmdBindDescriptorBufferEmbeddedSamplers2EXT
, pattern STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES_KHR
, pattern STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES_KHR
, pattern STRUCTURE_TYPE_BIND_MEMORY_STATUS_KHR
, pattern STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO_KHR
, pattern STRUCTURE_TYPE_PUSH_CONSTANTS_INFO_KHR
, pattern STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO_KHR
, pattern STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO_KHR
, cmdBindDescriptorSets2KHR
, cmdPushConstants2KHR
, cmdPushDescriptorSet2KHR
, cmdPushDescriptorSetWithTemplate2KHR
, SetDescriptorBufferOffsetsInfoEXT(..)
, BindDescriptorBufferEmbeddedSamplersInfoEXT(..)
, PhysicalDeviceMaintenance6FeaturesKHR
, PhysicalDeviceMaintenance6PropertiesKHR
, BindMemoryStatusKHR
, BindDescriptorSetsInfoKHR
, PushConstantsInfoKHR
, PushDescriptorSetInfoKHR
, PushDescriptorSetWithTemplateInfoKHR
, KHR_MAINTENANCE_6_SPEC_VERSION
, pattern KHR_MAINTENANCE_6_SPEC_VERSION
, KHR_MAINTENANCE_6_EXTENSION_NAME
, pattern KHR_MAINTENANCE_6_EXTENSION_NAME
) where
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Data.Typeable (eqT)
import Foreign.Marshal.Alloc (allocaBytes)
import GHC.IO (throwIO)
import GHC.Ptr (castPtr)
import GHC.Ptr (nullFunPtr)
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 Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import Data.Type.Equality ((:~:)(Refl))
import Data.Typeable (Typeable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Foreign.Ptr (FunPtr)
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.Core14.Promoted_From_VK_KHR_maintenance6AdditionalFunctionality' (cmdBindDescriptorSets2)
import Vulkan.Core14.Promoted_From_VK_KHR_maintenance6AdditionalFunctionality' (cmdPushConstants2)
import Vulkan.Core14.Promoted_From_VK_KHR_maintenance6AdditionalFunctionality' (cmdPushDescriptorSet2)
import Vulkan.Core14.Promoted_From_VK_KHR_maintenance6AdditionalFunctionality' (cmdPushDescriptorSetWithTemplate2)
import Vulkan.CStruct.Extends (forgetExtensions)
import Vulkan.Core14.Promoted_From_VK_KHR_maintenance6AdditionalFunctionality' (BindDescriptorSetsInfo)
import Vulkan.Core14.Promoted_From_VK_KHR_maintenance6AdditionalFunctionality' (BindMemoryStatus)
import Vulkan.CStruct.Extends (Chain)
import Vulkan.Core10.Handles (CommandBuffer)
import Vulkan.Core10.Handles (CommandBuffer(..))
import Vulkan.Core10.Handles (CommandBuffer(CommandBuffer))
import Vulkan.Core10.Handles (CommandBuffer_T)
import Vulkan.Dynamic (DeviceCmds(pVkCmdBindDescriptorBufferEmbeddedSamplers2EXT))
import Vulkan.Dynamic (DeviceCmds(pVkCmdSetDescriptorBufferOffsets2EXT))
import Vulkan.Core10.FundamentalTypes (DeviceSize)
import Vulkan.CStruct.Extends (Extends)
import Vulkan.CStruct.Extends (Extendss)
import Vulkan.CStruct.Extends (Extensible(..))
import Vulkan.CStruct.Extends (PeekChain)
import Vulkan.CStruct.Extends (PeekChain(..))
import Vulkan.Core14.Promoted_From_VK_KHR_maintenance6AdditionalFunctionality' (PhysicalDeviceMaintenance6Features)
import Vulkan.Core14.Promoted_From_VK_KHR_maintenance6AdditionalFunctionality' (PhysicalDeviceMaintenance6Properties)
import Vulkan.Core10.Handles (PipelineLayout)
import {-# SOURCE #-} Vulkan.Core10.PipelineLayout (PipelineLayoutCreateInfo)
import Vulkan.CStruct.Extends (PokeChain)
import Vulkan.CStruct.Extends (PokeChain(..))
import Vulkan.Core14.Promoted_From_VK_KHR_maintenance6AdditionalFunctionality' (PushConstantsInfo)
import Vulkan.Core14.Promoted_From_VK_KHR_maintenance6AdditionalFunctionality' (PushDescriptorSetInfo)
import Vulkan.Core14.Promoted_From_VK_KHR_maintenance6AdditionalFunctionality' (PushDescriptorSetWithTemplateInfo)
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlags)
import Vulkan.CStruct.Extends (SomeStruct)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_BIND_DESCRIPTOR_BUFFER_EMBEDDED_SAMPLERS_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_BIND_MEMORY_STATUS))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PUSH_CONSTANTS_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SET_DESCRIPTOR_BUFFER_OFFSETS_INFO_EXT))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdSetDescriptorBufferOffsets2EXT
:: FunPtr (Ptr CommandBuffer_T -> Ptr (SomeStruct SetDescriptorBufferOffsetsInfoEXT) -> IO ()) -> Ptr CommandBuffer_T -> Ptr (SomeStruct SetDescriptorBufferOffsetsInfoEXT) -> IO ()
cmdSetDescriptorBufferOffsets2EXT :: forall a io
. ( Extendss SetDescriptorBufferOffsetsInfoEXT a
, PokeChain a
, MonadIO io )
=>
CommandBuffer
->
(SetDescriptorBufferOffsetsInfoEXT a)
-> io ()
cmdSetDescriptorBufferOffsets2EXT :: forall (a :: [*]) (io :: * -> *).
(Extendss SetDescriptorBufferOffsetsInfoEXT a, PokeChain a,
MonadIO io) =>
CommandBuffer -> SetDescriptorBufferOffsetsInfoEXT a -> io ()
cmdSetDescriptorBufferOffsets2EXT CommandBuffer
commandBuffer
SetDescriptorBufferOffsetsInfoEXT a
setDescriptorBufferOffsetsInfo = IO () -> io ()
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkCmdSetDescriptorBufferOffsets2EXTPtr :: FunPtr
(Ptr CommandBuffer_T
-> Ptr (SomeStruct SetDescriptorBufferOffsetsInfoEXT) -> IO ())
vkCmdSetDescriptorBufferOffsets2EXTPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> Ptr (SomeStruct SetDescriptorBufferOffsetsInfoEXT) -> IO ())
pVkCmdSetDescriptorBufferOffsets2EXT (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT () IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT () m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> Ptr (SomeStruct SetDescriptorBufferOffsetsInfoEXT) -> IO ())
vkCmdSetDescriptorBufferOffsets2EXTPtr FunPtr
(Ptr CommandBuffer_T
-> Ptr (SomeStruct SetDescriptorBufferOffsetsInfoEXT) -> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> Ptr (SomeStruct SetDescriptorBufferOffsetsInfoEXT) -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> Ptr (SomeStruct SetDescriptorBufferOffsetsInfoEXT) -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdSetDescriptorBufferOffsets2EXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdSetDescriptorBufferOffsets2EXT' :: Ptr CommandBuffer_T
-> Ptr (SomeStruct SetDescriptorBufferOffsetsInfoEXT) -> IO ()
vkCmdSetDescriptorBufferOffsets2EXT' = FunPtr
(Ptr CommandBuffer_T
-> Ptr (SomeStruct SetDescriptorBufferOffsetsInfoEXT) -> IO ())
-> Ptr CommandBuffer_T
-> Ptr (SomeStruct SetDescriptorBufferOffsetsInfoEXT)
-> IO ()
mkVkCmdSetDescriptorBufferOffsets2EXT FunPtr
(Ptr CommandBuffer_T
-> Ptr (SomeStruct SetDescriptorBufferOffsetsInfoEXT) -> IO ())
vkCmdSetDescriptorBufferOffsets2EXTPtr
pSetDescriptorBufferOffsetsInfo <- ((Ptr (SetDescriptorBufferOffsetsInfoEXT a) -> IO ()) -> IO ())
-> ContT () IO (Ptr (SetDescriptorBufferOffsetsInfoEXT a))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (SetDescriptorBufferOffsetsInfoEXT a) -> IO ()) -> IO ())
-> ContT () IO (Ptr (SetDescriptorBufferOffsetsInfoEXT a)))
-> ((Ptr (SetDescriptorBufferOffsetsInfoEXT a) -> IO ()) -> IO ())
-> ContT () IO (Ptr (SetDescriptorBufferOffsetsInfoEXT a))
forall a b. (a -> b) -> a -> b
$ SetDescriptorBufferOffsetsInfoEXT a
-> (Ptr (SetDescriptorBufferOffsetsInfoEXT a) -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
SetDescriptorBufferOffsetsInfoEXT a
-> (Ptr (SetDescriptorBufferOffsetsInfoEXT a) -> IO b) -> IO b
withCStruct (SetDescriptorBufferOffsetsInfoEXT a
setDescriptorBufferOffsetsInfo)
lift $ traceAroundEvent "vkCmdSetDescriptorBufferOffsets2EXT" (vkCmdSetDescriptorBufferOffsets2EXT'
(commandBufferHandle (commandBuffer))
(forgetExtensions pSetDescriptorBufferOffsetsInfo))
pure $ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdBindDescriptorBufferEmbeddedSamplers2EXT
:: FunPtr (Ptr CommandBuffer_T -> Ptr (SomeStruct BindDescriptorBufferEmbeddedSamplersInfoEXT) -> IO ()) -> Ptr CommandBuffer_T -> Ptr (SomeStruct BindDescriptorBufferEmbeddedSamplersInfoEXT) -> IO ()
cmdBindDescriptorBufferEmbeddedSamplers2EXT :: forall a io
. ( Extendss BindDescriptorBufferEmbeddedSamplersInfoEXT a
, PokeChain a
, MonadIO io )
=>
CommandBuffer
->
(BindDescriptorBufferEmbeddedSamplersInfoEXT a)
-> io ()
cmdBindDescriptorBufferEmbeddedSamplers2EXT :: forall (a :: [*]) (io :: * -> *).
(Extendss BindDescriptorBufferEmbeddedSamplersInfoEXT a,
PokeChain a, MonadIO io) =>
CommandBuffer
-> BindDescriptorBufferEmbeddedSamplersInfoEXT a -> io ()
cmdBindDescriptorBufferEmbeddedSamplers2EXT CommandBuffer
commandBuffer
BindDescriptorBufferEmbeddedSamplersInfoEXT a
bindDescriptorBufferEmbeddedSamplersInfo = IO () -> io ()
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkCmdBindDescriptorBufferEmbeddedSamplers2EXTPtr :: FunPtr
(Ptr CommandBuffer_T
-> Ptr (SomeStruct BindDescriptorBufferEmbeddedSamplersInfoEXT)
-> IO ())
vkCmdBindDescriptorBufferEmbeddedSamplers2EXTPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> Ptr (SomeStruct BindDescriptorBufferEmbeddedSamplersInfoEXT)
-> IO ())
pVkCmdBindDescriptorBufferEmbeddedSamplers2EXT (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: CommandBuffer -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT () IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT () m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> Ptr (SomeStruct BindDescriptorBufferEmbeddedSamplersInfoEXT)
-> IO ())
vkCmdBindDescriptorBufferEmbeddedSamplers2EXTPtr FunPtr
(Ptr CommandBuffer_T
-> Ptr (SomeStruct BindDescriptorBufferEmbeddedSamplersInfoEXT)
-> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> Ptr (SomeStruct BindDescriptorBufferEmbeddedSamplersInfoEXT)
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> Ptr (SomeStruct BindDescriptorBufferEmbeddedSamplersInfoEXT)
-> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdBindDescriptorBufferEmbeddedSamplers2EXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdBindDescriptorBufferEmbeddedSamplers2EXT' :: Ptr CommandBuffer_T
-> Ptr (SomeStruct BindDescriptorBufferEmbeddedSamplersInfoEXT)
-> IO ()
vkCmdBindDescriptorBufferEmbeddedSamplers2EXT' = FunPtr
(Ptr CommandBuffer_T
-> Ptr (SomeStruct BindDescriptorBufferEmbeddedSamplersInfoEXT)
-> IO ())
-> Ptr CommandBuffer_T
-> Ptr (SomeStruct BindDescriptorBufferEmbeddedSamplersInfoEXT)
-> IO ()
mkVkCmdBindDescriptorBufferEmbeddedSamplers2EXT FunPtr
(Ptr CommandBuffer_T
-> Ptr (SomeStruct BindDescriptorBufferEmbeddedSamplersInfoEXT)
-> IO ())
vkCmdBindDescriptorBufferEmbeddedSamplers2EXTPtr
pBindDescriptorBufferEmbeddedSamplersInfo <- ((Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT a) -> IO ())
-> IO ())
-> ContT
() IO (Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT a))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT a) -> IO ())
-> IO ())
-> ContT
() IO (Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT a)))
-> ((Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT a) -> IO ())
-> IO ())
-> ContT
() IO (Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT a))
forall a b. (a -> b) -> a -> b
$ BindDescriptorBufferEmbeddedSamplersInfoEXT a
-> (Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT a) -> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
BindDescriptorBufferEmbeddedSamplersInfoEXT a
-> (Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT a) -> IO b)
-> IO b
withCStruct (BindDescriptorBufferEmbeddedSamplersInfoEXT a
bindDescriptorBufferEmbeddedSamplersInfo)
lift $ traceAroundEvent "vkCmdBindDescriptorBufferEmbeddedSamplers2EXT" (vkCmdBindDescriptorBufferEmbeddedSamplers2EXT'
(commandBufferHandle (commandBuffer))
(forgetExtensions pBindDescriptorBufferEmbeddedSamplersInfo))
pure $ ()
pattern $mSTRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES_KHR :: forall {r}. StructureType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSTRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES_KHR :: StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES_KHR = STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES
pattern $mSTRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES_KHR :: forall {r}. StructureType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSTRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES_KHR :: StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES_KHR = STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES
pattern $mSTRUCTURE_TYPE_BIND_MEMORY_STATUS_KHR :: forall {r}. StructureType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSTRUCTURE_TYPE_BIND_MEMORY_STATUS_KHR :: StructureType
STRUCTURE_TYPE_BIND_MEMORY_STATUS_KHR = STRUCTURE_TYPE_BIND_MEMORY_STATUS
pattern $mSTRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO_KHR :: forall {r}. StructureType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSTRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO_KHR :: StructureType
STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO_KHR = STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO
pattern $mSTRUCTURE_TYPE_PUSH_CONSTANTS_INFO_KHR :: forall {r}. StructureType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSTRUCTURE_TYPE_PUSH_CONSTANTS_INFO_KHR :: StructureType
STRUCTURE_TYPE_PUSH_CONSTANTS_INFO_KHR = STRUCTURE_TYPE_PUSH_CONSTANTS_INFO
pattern $mSTRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO_KHR :: forall {r}. StructureType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSTRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO_KHR :: StructureType
STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO_KHR = STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO
pattern $mSTRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO_KHR :: forall {r}. StructureType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSTRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO_KHR :: StructureType
STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO_KHR = STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO
cmdBindDescriptorSets2KHR :: CommandBuffer -> BindDescriptorSetsInfo a -> io ()
cmdBindDescriptorSets2KHR = CommandBuffer -> BindDescriptorSetsInfo a -> io ()
forall (a :: [*]) (io :: * -> *).
(Extendss BindDescriptorSetsInfo a, PokeChain a, MonadIO io) =>
CommandBuffer -> BindDescriptorSetsInfo a -> io ()
cmdBindDescriptorSets2
cmdPushConstants2KHR :: CommandBuffer -> PushConstantsInfo a -> io ()
cmdPushConstants2KHR = CommandBuffer -> PushConstantsInfo a -> io ()
forall (a :: [*]) (io :: * -> *).
(Extendss PushConstantsInfo a, PokeChain a, MonadIO io) =>
CommandBuffer -> PushConstantsInfo a -> io ()
cmdPushConstants2
cmdPushDescriptorSet2KHR :: CommandBuffer -> PushDescriptorSetInfo a -> io ()
cmdPushDescriptorSet2KHR = CommandBuffer -> PushDescriptorSetInfo a -> io ()
forall (a :: [*]) (io :: * -> *).
(Extendss PushDescriptorSetInfo a, PokeChain a, MonadIO io) =>
CommandBuffer -> PushDescriptorSetInfo a -> io ()
cmdPushDescriptorSet2
cmdPushDescriptorSetWithTemplate2KHR :: CommandBuffer -> PushDescriptorSetWithTemplateInfo a -> io ()
cmdPushDescriptorSetWithTemplate2KHR = CommandBuffer -> PushDescriptorSetWithTemplateInfo a -> io ()
forall (a :: [*]) (io :: * -> *).
(Extendss PushDescriptorSetWithTemplateInfo a, PokeChain a,
MonadIO io) =>
CommandBuffer -> PushDescriptorSetWithTemplateInfo a -> io ()
cmdPushDescriptorSetWithTemplate2
data SetDescriptorBufferOffsetsInfoEXT (es :: [Type]) = SetDescriptorBufferOffsetsInfoEXT
{
forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> Chain es
next :: Chain es
,
forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> ShaderStageFlags
stageFlags :: ShaderStageFlags
,
forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> PipelineLayout
layout :: PipelineLayout
,
forall (es :: [*]). SetDescriptorBufferOffsetsInfoEXT es -> Word32
firstSet :: Word32
,
forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> Vector Word32
bufferIndices :: Vector Word32
,
forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> Vector DeviceSize
offsets :: Vector DeviceSize
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SetDescriptorBufferOffsetsInfoEXT (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (SetDescriptorBufferOffsetsInfoEXT es)
instance Extensible SetDescriptorBufferOffsetsInfoEXT where
extensibleTypeName :: String
extensibleTypeName = String
"SetDescriptorBufferOffsetsInfoEXT"
setNext :: forall (ds :: [*]) (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT ds
-> Chain es -> SetDescriptorBufferOffsetsInfoEXT es
setNext SetDescriptorBufferOffsetsInfoEXT{Word32
Vector Word32
Vector DeviceSize
ShaderStageFlags
PipelineLayout
Chain ds
next :: forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> Chain es
stageFlags :: forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> ShaderStageFlags
layout :: forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> PipelineLayout
firstSet :: forall (es :: [*]). SetDescriptorBufferOffsetsInfoEXT es -> Word32
bufferIndices :: forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> Vector Word32
offsets :: forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> Vector DeviceSize
next :: Chain ds
stageFlags :: ShaderStageFlags
layout :: PipelineLayout
firstSet :: Word32
bufferIndices :: Vector Word32
offsets :: Vector DeviceSize
..} Chain es
next' = SetDescriptorBufferOffsetsInfoEXT{next :: Chain es
next = Chain es
next', Word32
Vector Word32
Vector DeviceSize
ShaderStageFlags
PipelineLayout
stageFlags :: ShaderStageFlags
layout :: PipelineLayout
firstSet :: Word32
bufferIndices :: Vector Word32
offsets :: Vector DeviceSize
stageFlags :: ShaderStageFlags
layout :: PipelineLayout
firstSet :: Word32
bufferIndices :: Vector Word32
offsets :: Vector DeviceSize
..}
getNext :: forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> Chain es
getNext SetDescriptorBufferOffsetsInfoEXT{Word32
Vector Word32
Vector DeviceSize
ShaderStageFlags
PipelineLayout
Chain es
next :: forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> Chain es
stageFlags :: forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> ShaderStageFlags
layout :: forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> PipelineLayout
firstSet :: forall (es :: [*]). SetDescriptorBufferOffsetsInfoEXT es -> Word32
bufferIndices :: forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> Vector Word32
offsets :: forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> Vector DeviceSize
next :: Chain es
stageFlags :: ShaderStageFlags
layout :: PipelineLayout
firstSet :: Word32
bufferIndices :: Vector Word32
offsets :: Vector DeviceSize
..} = Chain es
next
extends :: forall e b proxy. Typeable e => proxy e -> (Extends SetDescriptorBufferOffsetsInfoEXT e => b) -> Maybe b
extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e
-> (Extends SetDescriptorBufferOffsetsInfoEXT e => b) -> Maybe b
extends proxy e
_ Extends SetDescriptorBufferOffsetsInfoEXT e => b
f
| Just e :~: PipelineLayoutCreateInfo
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PipelineLayoutCreateInfo = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends SetDescriptorBufferOffsetsInfoEXT e => b
f
| Bool
otherwise = Maybe b
forall a. Maybe a
Nothing
instance ( Extendss SetDescriptorBufferOffsetsInfoEXT es
, PokeChain es ) => ToCStruct (SetDescriptorBufferOffsetsInfoEXT es) where
withCStruct :: forall b.
SetDescriptorBufferOffsetsInfoEXT es
-> (Ptr (SetDescriptorBufferOffsetsInfoEXT es) -> IO b) -> IO b
withCStruct SetDescriptorBufferOffsetsInfoEXT es
x Ptr (SetDescriptorBufferOffsetsInfoEXT es) -> IO b
f = Int -> (Ptr (SetDescriptorBufferOffsetsInfoEXT es) -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
56 ((Ptr (SetDescriptorBufferOffsetsInfoEXT es) -> IO b) -> IO b)
-> (Ptr (SetDescriptorBufferOffsetsInfoEXT es) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr (SetDescriptorBufferOffsetsInfoEXT es)
p -> Ptr (SetDescriptorBufferOffsetsInfoEXT es)
-> SetDescriptorBufferOffsetsInfoEXT es -> IO b -> IO b
forall b.
Ptr (SetDescriptorBufferOffsetsInfoEXT es)
-> SetDescriptorBufferOffsetsInfoEXT es -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (SetDescriptorBufferOffsetsInfoEXT es)
p SetDescriptorBufferOffsetsInfoEXT es
x (Ptr (SetDescriptorBufferOffsetsInfoEXT es) -> IO b
f Ptr (SetDescriptorBufferOffsetsInfoEXT es)
p)
pokeCStruct :: forall b.
Ptr (SetDescriptorBufferOffsetsInfoEXT es)
-> SetDescriptorBufferOffsetsInfoEXT es -> IO b -> IO b
pokeCStruct Ptr (SetDescriptorBufferOffsetsInfoEXT es)
p SetDescriptorBufferOffsetsInfoEXT{Word32
Vector Word32
Vector DeviceSize
ShaderStageFlags
PipelineLayout
Chain es
next :: forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> Chain es
stageFlags :: forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> ShaderStageFlags
layout :: forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> PipelineLayout
firstSet :: forall (es :: [*]). SetDescriptorBufferOffsetsInfoEXT es -> Word32
bufferIndices :: forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> Vector Word32
offsets :: forall (es :: [*]).
SetDescriptorBufferOffsetsInfoEXT es -> Vector DeviceSize
next :: Chain es
stageFlags :: ShaderStageFlags
layout :: PipelineLayout
firstSet :: Word32
bufferIndices :: Vector Word32
offsets :: Vector DeviceSize
..} 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 (m :: * -> *) a. Monad m => m a -> ContT b m a
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 (SetDescriptorBufferOffsetsInfoEXT es)
p Ptr (SetDescriptorBufferOffsetsInfoEXT es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SET_DESCRIPTOR_BUFFER_OFFSETS_INFO_EXT)
pNext'' <- (Ptr (Chain es) -> Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> ContT b IO a -> ContT b IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ Chain es -> (Ptr (Chain es) -> IO b) -> IO b
forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
forall a. Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext''
lift $ poke ((p `plusPtr` 16 :: Ptr ShaderStageFlags)) (stageFlags)
lift $ poke ((p `plusPtr` 24 :: Ptr PipelineLayout)) (layout)
lift $ poke ((p `plusPtr` 32 :: Ptr Word32)) (firstSet)
let pBufferIndicesLength = 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
bufferIndices)
lift $ unless ((Data.Vector.length $ (offsets)) == pBufferIndicesLength) $
throwIO $ IOError Nothing InvalidArgument "" "pOffsets and pBufferIndices must have the same length" Nothing Nothing
lift $ poke ((p `plusPtr` 36 :: Ptr Word32)) ((fromIntegral pBufferIndicesLength :: Word32))
pPBufferIndices' <- ContT $ allocaBytes @Word32 ((Data.Vector.length (bufferIndices)) * 4)
lift $ Data.Vector.imapM_ (\Int
i Word32
e -> Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Word32
pPBufferIndices' Ptr Word32 -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) (Word32
e)) (bufferIndices)
lift $ poke ((p `plusPtr` 40 :: Ptr (Ptr Word32))) (pPBufferIndices')
pPOffsets' <- ContT $ allocaBytes @DeviceSize ((Data.Vector.length (offsets)) * 8)
lift $ Data.Vector.imapM_ (\Int
i DeviceSize
e -> Ptr DeviceSize -> DeviceSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DeviceSize
pPOffsets' Ptr DeviceSize -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr DeviceSize) (DeviceSize
e)) (offsets)
lift $ poke ((p `plusPtr` 48 :: Ptr (Ptr DeviceSize))) (pPOffsets')
lift $ f
cStructSize :: Int
cStructSize = Int
56
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr (SetDescriptorBufferOffsetsInfoEXT es) -> IO b -> IO b
pokeZeroCStruct Ptr (SetDescriptorBufferOffsetsInfoEXT es)
p 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 (m :: * -> *) a. Monad m => m a -> ContT b m a
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 (SetDescriptorBufferOffsetsInfoEXT es)
p Ptr (SetDescriptorBufferOffsetsInfoEXT es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SET_DESCRIPTOR_BUFFER_OFFSETS_INFO_EXT)
pNext' <- (Ptr (Chain es) -> Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> ContT b IO a -> ContT b IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext'
lift $ poke ((p `plusPtr` 16 :: Ptr ShaderStageFlags)) (zero)
lift $ f
instance ( Extendss SetDescriptorBufferOffsetsInfoEXT es
, PeekChain es ) => FromCStruct (SetDescriptorBufferOffsetsInfoEXT es) where
peekCStruct :: Ptr (SetDescriptorBufferOffsetsInfoEXT es)
-> IO (SetDescriptorBufferOffsetsInfoEXT es)
peekCStruct Ptr (SetDescriptorBufferOffsetsInfoEXT es)
p = do
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (SetDescriptorBufferOffsetsInfoEXT es)
p Ptr (SetDescriptorBufferOffsetsInfoEXT es) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ())))
next <- peekChain (castPtr pNext)
stageFlags <- peek @ShaderStageFlags ((p `plusPtr` 16 :: Ptr ShaderStageFlags))
layout <- peek @PipelineLayout ((p `plusPtr` 24 :: Ptr PipelineLayout))
firstSet <- peek @Word32 ((p `plusPtr` 32 :: Ptr Word32))
setCount <- peek @Word32 ((p `plusPtr` 36 :: Ptr Word32))
pBufferIndices <- peek @(Ptr Word32) ((p `plusPtr` 40 :: Ptr (Ptr Word32)))
pBufferIndices' <- generateM (fromIntegral setCount) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr Word32
pBufferIndices Ptr Word32 -> Int -> Ptr Word32
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32)))
pOffsets <- peek @(Ptr DeviceSize) ((p `plusPtr` 48 :: Ptr (Ptr DeviceSize)))
pOffsets' <- generateM (fromIntegral setCount) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr DeviceSize
pOffsets Ptr DeviceSize -> Int -> Ptr DeviceSize
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr DeviceSize)))
pure $ SetDescriptorBufferOffsetsInfoEXT
next stageFlags layout firstSet pBufferIndices' pOffsets'
instance es ~ '[] => Zero (SetDescriptorBufferOffsetsInfoEXT es) where
zero :: SetDescriptorBufferOffsetsInfoEXT es
zero = Chain es
-> ShaderStageFlags
-> PipelineLayout
-> Word32
-> Vector Word32
-> Vector DeviceSize
-> SetDescriptorBufferOffsetsInfoEXT es
forall (es :: [*]).
Chain es
-> ShaderStageFlags
-> PipelineLayout
-> Word32
-> Vector Word32
-> Vector DeviceSize
-> SetDescriptorBufferOffsetsInfoEXT es
SetDescriptorBufferOffsetsInfoEXT
()
ShaderStageFlags
forall a. Zero a => a
zero
PipelineLayout
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
Vector Word32
forall a. Monoid a => a
mempty
Vector DeviceSize
forall a. Monoid a => a
mempty
data BindDescriptorBufferEmbeddedSamplersInfoEXT (es :: [Type]) = BindDescriptorBufferEmbeddedSamplersInfoEXT
{
forall (es :: [*]).
BindDescriptorBufferEmbeddedSamplersInfoEXT es -> Chain es
next :: Chain es
,
forall (es :: [*]).
BindDescriptorBufferEmbeddedSamplersInfoEXT es -> ShaderStageFlags
stageFlags :: ShaderStageFlags
,
forall (es :: [*]).
BindDescriptorBufferEmbeddedSamplersInfoEXT es -> PipelineLayout
layout :: PipelineLayout
,
forall (es :: [*]).
BindDescriptorBufferEmbeddedSamplersInfoEXT es -> Word32
set :: Word32
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (BindDescriptorBufferEmbeddedSamplersInfoEXT (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (BindDescriptorBufferEmbeddedSamplersInfoEXT es)
instance Extensible BindDescriptorBufferEmbeddedSamplersInfoEXT where
extensibleTypeName :: String
extensibleTypeName = String
"BindDescriptorBufferEmbeddedSamplersInfoEXT"
setNext :: forall (ds :: [*]) (es :: [*]).
BindDescriptorBufferEmbeddedSamplersInfoEXT ds
-> Chain es -> BindDescriptorBufferEmbeddedSamplersInfoEXT es
setNext BindDescriptorBufferEmbeddedSamplersInfoEXT{Word32
ShaderStageFlags
PipelineLayout
Chain ds
next :: forall (es :: [*]).
BindDescriptorBufferEmbeddedSamplersInfoEXT es -> Chain es
stageFlags :: forall (es :: [*]).
BindDescriptorBufferEmbeddedSamplersInfoEXT es -> ShaderStageFlags
layout :: forall (es :: [*]).
BindDescriptorBufferEmbeddedSamplersInfoEXT es -> PipelineLayout
set :: forall (es :: [*]).
BindDescriptorBufferEmbeddedSamplersInfoEXT es -> Word32
next :: Chain ds
stageFlags :: ShaderStageFlags
layout :: PipelineLayout
set :: Word32
..} Chain es
next' = BindDescriptorBufferEmbeddedSamplersInfoEXT{next :: Chain es
next = Chain es
next', Word32
ShaderStageFlags
PipelineLayout
stageFlags :: ShaderStageFlags
layout :: PipelineLayout
set :: Word32
stageFlags :: ShaderStageFlags
layout :: PipelineLayout
set :: Word32
..}
getNext :: forall (es :: [*]).
BindDescriptorBufferEmbeddedSamplersInfoEXT es -> Chain es
getNext BindDescriptorBufferEmbeddedSamplersInfoEXT{Word32
ShaderStageFlags
PipelineLayout
Chain es
next :: forall (es :: [*]).
BindDescriptorBufferEmbeddedSamplersInfoEXT es -> Chain es
stageFlags :: forall (es :: [*]).
BindDescriptorBufferEmbeddedSamplersInfoEXT es -> ShaderStageFlags
layout :: forall (es :: [*]).
BindDescriptorBufferEmbeddedSamplersInfoEXT es -> PipelineLayout
set :: forall (es :: [*]).
BindDescriptorBufferEmbeddedSamplersInfoEXT es -> Word32
next :: Chain es
stageFlags :: ShaderStageFlags
layout :: PipelineLayout
set :: Word32
..} = Chain es
next
extends :: forall e b proxy. Typeable e => proxy e -> (Extends BindDescriptorBufferEmbeddedSamplersInfoEXT e => b) -> Maybe b
extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e
-> (Extends BindDescriptorBufferEmbeddedSamplersInfoEXT e => b)
-> Maybe b
extends proxy e
_ Extends BindDescriptorBufferEmbeddedSamplersInfoEXT e => b
f
| Just e :~: PipelineLayoutCreateInfo
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PipelineLayoutCreateInfo = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends BindDescriptorBufferEmbeddedSamplersInfoEXT e => b
f
| Bool
otherwise = Maybe b
forall a. Maybe a
Nothing
instance ( Extendss BindDescriptorBufferEmbeddedSamplersInfoEXT es
, PokeChain es ) => ToCStruct (BindDescriptorBufferEmbeddedSamplersInfoEXT es) where
withCStruct :: forall b.
BindDescriptorBufferEmbeddedSamplersInfoEXT es
-> (Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es) -> IO b)
-> IO b
withCStruct BindDescriptorBufferEmbeddedSamplersInfoEXT es
x Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es) -> IO b
f = Int
-> (Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es) -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 ((Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es) -> IO b)
-> IO b)
-> (Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es) -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es)
p -> Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es)
-> BindDescriptorBufferEmbeddedSamplersInfoEXT es -> IO b -> IO b
forall b.
Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es)
-> BindDescriptorBufferEmbeddedSamplersInfoEXT es -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es)
p BindDescriptorBufferEmbeddedSamplersInfoEXT es
x (Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es) -> IO b
f Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es)
p)
pokeCStruct :: forall b.
Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es)
-> BindDescriptorBufferEmbeddedSamplersInfoEXT es -> IO b -> IO b
pokeCStruct Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es)
p BindDescriptorBufferEmbeddedSamplersInfoEXT{Word32
ShaderStageFlags
PipelineLayout
Chain es
next :: forall (es :: [*]).
BindDescriptorBufferEmbeddedSamplersInfoEXT es -> Chain es
stageFlags :: forall (es :: [*]).
BindDescriptorBufferEmbeddedSamplersInfoEXT es -> ShaderStageFlags
layout :: forall (es :: [*]).
BindDescriptorBufferEmbeddedSamplersInfoEXT es -> PipelineLayout
set :: forall (es :: [*]).
BindDescriptorBufferEmbeddedSamplersInfoEXT es -> Word32
next :: Chain es
stageFlags :: ShaderStageFlags
layout :: PipelineLayout
set :: Word32
..} 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 (m :: * -> *) a. Monad m => m a -> ContT b m a
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 (BindDescriptorBufferEmbeddedSamplersInfoEXT es)
p Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_BIND_DESCRIPTOR_BUFFER_EMBEDDED_SAMPLERS_INFO_EXT)
pNext'' <- (Ptr (Chain es) -> Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> ContT b IO a -> ContT b IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ Chain es -> (Ptr (Chain es) -> IO b) -> IO b
forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
forall a. Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext''
lift $ poke ((p `plusPtr` 16 :: Ptr ShaderStageFlags)) (stageFlags)
lift $ poke ((p `plusPtr` 24 :: Ptr PipelineLayout)) (layout)
lift $ poke ((p `plusPtr` 32 :: Ptr Word32)) (set)
lift $ f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es)
-> IO b -> IO b
pokeZeroCStruct Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es)
p 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 (m :: * -> *) a. Monad m => m a -> ContT b m a
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 (BindDescriptorBufferEmbeddedSamplersInfoEXT es)
p Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_BIND_DESCRIPTOR_BUFFER_EMBEDDED_SAMPLERS_INFO_EXT)
pNext' <- (Ptr (Chain es) -> Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> ContT b IO a -> ContT b IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext'
lift $ poke ((p `plusPtr` 16 :: Ptr ShaderStageFlags)) (zero)
lift $ f
instance ( Extendss BindDescriptorBufferEmbeddedSamplersInfoEXT es
, PeekChain es ) => FromCStruct (BindDescriptorBufferEmbeddedSamplersInfoEXT es) where
peekCStruct :: Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es)
-> IO (BindDescriptorBufferEmbeddedSamplersInfoEXT es)
peekCStruct Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es)
p = do
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es)
p Ptr (BindDescriptorBufferEmbeddedSamplersInfoEXT es)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ())))
next <- peekChain (castPtr pNext)
stageFlags <- peek @ShaderStageFlags ((p `plusPtr` 16 :: Ptr ShaderStageFlags))
layout <- peek @PipelineLayout ((p `plusPtr` 24 :: Ptr PipelineLayout))
set <- peek @Word32 ((p `plusPtr` 32 :: Ptr Word32))
pure $ BindDescriptorBufferEmbeddedSamplersInfoEXT
next stageFlags layout set
instance es ~ '[] => Zero (BindDescriptorBufferEmbeddedSamplersInfoEXT es) where
zero :: BindDescriptorBufferEmbeddedSamplersInfoEXT es
zero = Chain es
-> ShaderStageFlags
-> PipelineLayout
-> Word32
-> BindDescriptorBufferEmbeddedSamplersInfoEXT es
forall (es :: [*]).
Chain es
-> ShaderStageFlags
-> PipelineLayout
-> Word32
-> BindDescriptorBufferEmbeddedSamplersInfoEXT es
BindDescriptorBufferEmbeddedSamplersInfoEXT
()
ShaderStageFlags
forall a. Zero a => a
zero
PipelineLayout
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
type PhysicalDeviceMaintenance6FeaturesKHR = PhysicalDeviceMaintenance6Features
type PhysicalDeviceMaintenance6PropertiesKHR = PhysicalDeviceMaintenance6Properties
type BindMemoryStatusKHR = BindMemoryStatus
type BindDescriptorSetsInfoKHR = BindDescriptorSetsInfo
type PushConstantsInfoKHR = PushConstantsInfo
type PushDescriptorSetInfoKHR = PushDescriptorSetInfo
type PushDescriptorSetWithTemplateInfoKHR = PushDescriptorSetWithTemplateInfo
type KHR_MAINTENANCE_6_SPEC_VERSION = 1
pattern KHR_MAINTENANCE_6_SPEC_VERSION :: forall a . Integral a => a
pattern $mKHR_MAINTENANCE_6_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bKHR_MAINTENANCE_6_SPEC_VERSION :: forall a. Integral a => a
KHR_MAINTENANCE_6_SPEC_VERSION = 1
type KHR_MAINTENANCE_6_EXTENSION_NAME = "VK_KHR_maintenance6"
pattern KHR_MAINTENANCE_6_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $mKHR_MAINTENANCE_6_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bKHR_MAINTENANCE_6_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
KHR_MAINTENANCE_6_EXTENSION_NAME = "VK_KHR_maintenance6"