{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_shader_object ( createShadersEXT
, withShadersEXT
, destroyShaderEXT
, getShaderBinaryDataEXT
, cmdBindShadersEXT
, pattern STRUCTURE_TYPE_SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT
, PhysicalDeviceShaderObjectFeaturesEXT(..)
, PhysicalDeviceShaderObjectPropertiesEXT(..)
, ShaderCreateInfoEXT(..)
, ShaderCreateFlagsEXT
, ShaderCreateFlagBitsEXT( SHADER_CREATE_LINK_STAGE_BIT_EXT
, SHADER_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT
, SHADER_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXT
, SHADER_CREATE_DISPATCH_BASE_BIT_EXT
, SHADER_CREATE_NO_TASK_SHADER_BIT_EXT
, SHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT
, SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT
, ..
)
, ShaderCodeTypeEXT( SHADER_CODE_TYPE_BINARY_EXT
, SHADER_CODE_TYPE_SPIRV_EXT
, ..
)
, ShaderRequiredSubgroupSizeCreateInfoEXT
, EXT_SHADER_OBJECT_SPEC_VERSION
, pattern EXT_SHADER_OBJECT_SPEC_VERSION
, EXT_SHADER_OBJECT_EXTENSION_NAME
, pattern EXT_SHADER_OBJECT_EXTENSION_NAME
, ShaderEXT(..)
, ViewportSwizzleNV(..)
, ColorBlendEquationEXT(..)
, ColorBlendAdvancedEXT(..)
, VertexInputBindingDescription2EXT(..)
, VertexInputAttributeDescription2EXT(..)
, cmdSetPatchControlPointsEXT
, cmdSetLogicOpEXT
, cmdSetTessellationDomainOriginEXT
, cmdSetDepthClampEnableEXT
, cmdSetPolygonModeEXT
, cmdSetRasterizationSamplesEXT
, cmdSetSampleMaskEXT
, cmdSetAlphaToCoverageEnableEXT
, cmdSetAlphaToOneEnableEXT
, cmdSetLogicOpEnableEXT
, cmdSetColorBlendEnableEXT
, cmdSetColorBlendEquationEXT
, cmdSetColorWriteMaskEXT
, cmdSetRasterizationStreamEXT
, cmdSetConservativeRasterizationModeEXT
, cmdSetExtraPrimitiveOverestimationSizeEXT
, cmdSetDepthClipEnableEXT
, cmdSetSampleLocationsEnableEXT
, cmdSetColorBlendAdvancedEXT
, cmdSetProvokingVertexModeEXT
, cmdSetLineRasterizationModeEXT
, cmdSetLineStippleEnableEXT
, cmdSetDepthClipNegativeOneToOneEXT
, cmdSetViewportWScalingEnableNV
, cmdSetViewportSwizzleNV
, cmdSetCoverageToColorEnableNV
, cmdSetCoverageToColorLocationNV
, cmdSetCoverageModulationModeNV
, cmdSetCoverageModulationTableEnableNV
, cmdSetCoverageModulationTableNV
, cmdSetShadingRateImageEnableNV
, cmdSetCoverageReductionModeNV
, cmdSetRepresentativeFragmentTestEnableNV
, cmdSetVertexInputEXT
, ViewportCoordinateSwizzleNV(..)
, BlendOverlapEXT(..)
, CoverageModulationModeNV(..)
, CoverageReductionModeNV(..)
, ConservativeRasterizationModeEXT(..)
, LineRasterizationModeEXT(..)
, ProvokingVertexModeEXT(..)
, cmdSetCullModeEXT
, cmdSetFrontFaceEXT
, cmdSetPrimitiveTopologyEXT
, cmdSetViewportWithCountEXT
, cmdSetScissorWithCountEXT
, cmdBindVertexBuffers2EXT
, cmdSetDepthTestEnableEXT
, cmdSetDepthWriteEnableEXT
, cmdSetDepthCompareOpEXT
, cmdSetDepthBoundsTestEnableEXT
, cmdSetStencilTestEnableEXT
, cmdSetStencilOpEXT
, cmdSetRasterizerDiscardEnableEXT
, cmdSetDepthBiasEnableEXT
, cmdSetPrimitiveRestartEnableEXT
) where
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Vulkan.CStruct.Utils (FixedArray)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Data.Foldable (traverse_)
import Data.Typeable (eqT)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import Foreign.Marshal.Utils (maybePeek)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (castPtr)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Numeric (showHex)
import Data.ByteString (packCString)
import Data.ByteString (packCStringLen)
import Data.ByteString (useAsCString)
import Data.Coerce (coerce)
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 qualified Data.Vector (null)
import Foreign.C.Types (CSize(..))
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
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.C.Types (CChar)
import Foreign.C.Types (CSize)
import Foreign.C.Types (CSize(..))
import Foreign.C.Types (CSize(CSize))
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Data.Int (Int32)
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Word (Word64)
import Data.Word (Word8)
import Data.ByteString (ByteString)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.CStruct.Extends (forgetExtensions)
import Vulkan.CStruct.Utils (peekByteStringFromSizedVectorPtr)
import Vulkan.CStruct.Utils (pokeFixedLengthByteString)
import Vulkan.CStruct.Extends (pokeSomeCStruct)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Core10.FundamentalTypes (Bool32)
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.Core10.Handles (DescriptorSetLayout)
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.Handles (Device(Device))
import Vulkan.Dynamic (DeviceCmds(pVkCmdBindShadersEXT))
import Vulkan.Dynamic (DeviceCmds(pVkCreateShadersEXT))
import Vulkan.Dynamic (DeviceCmds(pVkDestroyShaderEXT))
import Vulkan.Dynamic (DeviceCmds(pVkGetShaderBinaryDataEXT))
import Vulkan.Core10.Handles (Device_T)
import Vulkan.CStruct.Extends (Extends)
import Vulkan.CStruct.Extends (Extendss)
import Vulkan.CStruct.Extends (Extensible(..))
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.CStruct.Extends (PeekChain)
import Vulkan.CStruct.Extends (PeekChain(..))
import Vulkan.Core13.Promoted_From_VK_EXT_subgroup_size_control (PipelineShaderStageRequiredSubgroupSizeCreateInfo)
import {-# SOURCE #-} Vulkan.Core13.Promoted_From_VK_EXT_subgroup_size_control (PipelineShaderStageRequiredSubgroupSizeCreateInfo)
import Vulkan.CStruct.Extends (PokeChain)
import Vulkan.CStruct.Extends (PokeChain(..))
import Vulkan.Core10.PipelineLayout (PushConstantRange)
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Extensions.Handles (ShaderEXT)
import Vulkan.Extensions.Handles (ShaderEXT(..))
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlagBits)
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlagBits(..))
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlags)
import Vulkan.CStruct.Extends (SomeStruct)
import Vulkan.Core10.Pipeline (SpecializationInfo)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.APIConstants (UUID_SIZE)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.VK_EXT_extended_dynamic_state (cmdBindVertexBuffers2EXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetAlphaToCoverageEnableEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetAlphaToOneEnableEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetColorBlendAdvancedEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetColorBlendEnableEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetColorBlendEquationEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetColorWriteMaskEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetConservativeRasterizationModeEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetCoverageModulationModeNV)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetCoverageModulationTableEnableNV)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetCoverageModulationTableNV)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetCoverageReductionModeNV)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetCoverageToColorEnableNV)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetCoverageToColorLocationNV)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state (cmdSetCullModeEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state2 (cmdSetDepthBiasEnableEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state (cmdSetDepthBoundsTestEnableEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetDepthClampEnableEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetDepthClipEnableEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetDepthClipNegativeOneToOneEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state (cmdSetDepthCompareOpEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state (cmdSetDepthTestEnableEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state (cmdSetDepthWriteEnableEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetExtraPrimitiveOverestimationSizeEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state (cmdSetFrontFaceEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetLineRasterizationModeEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetLineStippleEnableEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state2 (cmdSetLogicOpEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetLogicOpEnableEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state2 (cmdSetPatchControlPointsEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetPolygonModeEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state2 (cmdSetPrimitiveRestartEnableEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state (cmdSetPrimitiveTopologyEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetProvokingVertexModeEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetRasterizationSamplesEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetRasterizationStreamEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state2 (cmdSetRasterizerDiscardEnableEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetRepresentativeFragmentTestEnableNV)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetSampleLocationsEnableEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetSampleMaskEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state (cmdSetScissorWithCountEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetShadingRateImageEnableNV)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state (cmdSetStencilOpEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state (cmdSetStencilTestEnableEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetTessellationDomainOriginEXT)
import Vulkan.Extensions.VK_EXT_vertex_input_dynamic_state (cmdSetVertexInputEXT)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetViewportSwizzleNV)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (cmdSetViewportWScalingEnableNV)
import Vulkan.Extensions.VK_EXT_extended_dynamic_state (cmdSetViewportWithCountEXT)
import Vulkan.Extensions.VK_EXT_blend_operation_advanced (BlendOverlapEXT(..))
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (ColorBlendAdvancedEXT(..))
import Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (ColorBlendEquationEXT(..))
import Vulkan.Extensions.VK_EXT_conservative_rasterization (ConservativeRasterizationModeEXT(..))
import Vulkan.Extensions.VK_NV_framebuffer_mixed_samples (CoverageModulationModeNV(..))
import Vulkan.Extensions.VK_NV_coverage_reduction_mode (CoverageReductionModeNV(..))
import Vulkan.Extensions.VK_EXT_line_rasterization (LineRasterizationModeEXT(..))
import Vulkan.Extensions.VK_EXT_provoking_vertex (ProvokingVertexModeEXT(..))
import Vulkan.Extensions.Handles (ShaderEXT(..))
import Vulkan.Extensions.VK_EXT_vertex_input_dynamic_state (VertexInputAttributeDescription2EXT(..))
import Vulkan.Extensions.VK_EXT_vertex_input_dynamic_state (VertexInputBindingDescription2EXT(..))
import Vulkan.Extensions.VK_NV_viewport_swizzle (ViewportCoordinateSwizzleNV(..))
import Vulkan.Extensions.VK_NV_viewport_swizzle (ViewportSwizzleNV(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCreateShadersEXT
:: FunPtr (Ptr Device_T -> Word32 -> Ptr (SomeStruct ShaderCreateInfoEXT) -> Ptr AllocationCallbacks -> Ptr ShaderEXT -> IO Result) -> Ptr Device_T -> Word32 -> Ptr (SomeStruct ShaderCreateInfoEXT) -> Ptr AllocationCallbacks -> Ptr ShaderEXT -> IO Result
createShadersEXT :: forall io
. (MonadIO io)
=>
Device
->
("createInfos" ::: Vector (SomeStruct ShaderCreateInfoEXT))
->
("allocator" ::: Maybe AllocationCallbacks)
-> io (("shaders" ::: Vector ShaderEXT))
createShadersEXT :: forall (io :: * -> *).
MonadIO io =>
Device
-> ("createInfos" ::: Vector (SomeStruct ShaderCreateInfoEXT))
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ("shaders" ::: Vector ShaderEXT)
createShadersEXT Device
device "createInfos" ::: Vector (SomeStruct ShaderCreateInfoEXT)
createInfos "allocator" ::: Maybe AllocationCallbacks
allocator = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkCreateShadersEXTPtr :: FunPtr
(Ptr Device_T
-> Flags
-> ("pCreateInfos" ::: Ptr (SomeStruct ShaderCreateInfoEXT))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pShaders" ::: Ptr ShaderEXT)
-> IO Result)
vkCreateShadersEXTPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> Flags
-> ("pCreateInfos" ::: Ptr (SomeStruct ShaderCreateInfoEXT))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pShaders" ::: Ptr ShaderEXT)
-> IO Result)
pVkCreateShadersEXT (case Device
device of Device{DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> Flags
-> ("pCreateInfos" ::: Ptr (SomeStruct ShaderCreateInfoEXT))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pShaders" ::: Ptr ShaderEXT)
-> IO Result)
vkCreateShadersEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCreateShadersEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkCreateShadersEXT' :: Ptr Device_T
-> Flags
-> ("pCreateInfos" ::: Ptr (SomeStruct ShaderCreateInfoEXT))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pShaders" ::: Ptr ShaderEXT)
-> IO Result
vkCreateShadersEXT' = FunPtr
(Ptr Device_T
-> Flags
-> ("pCreateInfos" ::: Ptr (SomeStruct ShaderCreateInfoEXT))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pShaders" ::: Ptr ShaderEXT)
-> IO Result)
-> Ptr Device_T
-> Flags
-> ("pCreateInfos" ::: Ptr (SomeStruct ShaderCreateInfoEXT))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pShaders" ::: Ptr ShaderEXT)
-> IO Result
mkVkCreateShadersEXT FunPtr
(Ptr Device_T
-> Flags
-> ("pCreateInfos" ::: Ptr (SomeStruct ShaderCreateInfoEXT))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pShaders" ::: Ptr ShaderEXT)
-> IO Result)
vkCreateShadersEXTPtr
Ptr (ShaderCreateInfoEXT Any)
pPCreateInfos <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @(ShaderCreateInfoEXT _) ((forall a. Vector a -> Int
Data.Vector.length ("createInfos" ::: Vector (SomeStruct ShaderCreateInfoEXT)
createInfos)) forall a. Num a => a -> a -> a
* Int
96)
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i SomeStruct ShaderCreateInfoEXT
e -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (a :: [*] -> *) b.
(forall (es :: [*]).
(Extendss a es, PokeChain es) =>
ToCStruct (a es)) =>
Ptr (SomeStruct a) -> SomeStruct a -> IO b -> IO b
pokeSomeCStruct (forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (ShaderCreateInfoEXT Any)
pPCreateInfos forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
96 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (ShaderCreateInfoEXT _))) (SomeStruct ShaderCreateInfoEXT
e) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())) ("createInfos" ::: Vector (SomeStruct ShaderCreateInfoEXT)
createInfos)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
"allocator" ::: Maybe AllocationCallbacks
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
"pShaders" ::: Ptr ShaderEXT
pPShaders <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @ShaderEXT ((forall a b. (Integral a, Num b) => a -> b
fromIntegral ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ ("createInfos" ::: Vector (SomeStruct ShaderCreateInfoEXT)
createInfos)) :: Word32))) forall a. Num a => a -> a -> a
* Int
8)) forall a. Ptr a -> IO ()
free
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCreateShadersEXT" (Ptr Device_T
-> Flags
-> ("pCreateInfos" ::: Ptr (SomeStruct ShaderCreateInfoEXT))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pShaders" ::: Ptr ShaderEXT)
-> IO Result
vkCreateShadersEXT'
(Device -> Ptr Device_T
deviceHandle (Device
device))
((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ ("createInfos" ::: Vector (SomeStruct ShaderCreateInfoEXT)
createInfos)) :: Word32))
(forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (ShaderCreateInfoEXT Any)
pPCreateInfos))
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator
("pShaders" ::: Ptr ShaderEXT
pPShaders))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
"shaders" ::: Vector ShaderEXT
pShaders <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ ("createInfos" ::: Vector (SomeStruct ShaderCreateInfoEXT)
createInfos)) :: Word32))) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @ShaderEXT (("pShaders" ::: Ptr ShaderEXT
pPShaders forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr ShaderEXT)))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ("shaders" ::: Vector ShaderEXT
pShaders)
withShadersEXT :: forall io r . MonadIO io => Device -> Vector (SomeStruct ShaderCreateInfoEXT) -> Maybe AllocationCallbacks -> (io (Vector ShaderEXT) -> (Vector ShaderEXT -> io ()) -> r) -> r
withShadersEXT :: forall (io :: * -> *) r.
MonadIO io =>
Device
-> ("createInfos" ::: Vector (SomeStruct ShaderCreateInfoEXT))
-> ("allocator" ::: Maybe AllocationCallbacks)
-> (io ("shaders" ::: Vector ShaderEXT)
-> (("shaders" ::: Vector ShaderEXT) -> io ()) -> r)
-> r
withShadersEXT Device
device "createInfos" ::: Vector (SomeStruct ShaderCreateInfoEXT)
pCreateInfos "allocator" ::: Maybe AllocationCallbacks
pAllocator io ("shaders" ::: Vector ShaderEXT)
-> (("shaders" ::: Vector ShaderEXT) -> io ()) -> r
b =
io ("shaders" ::: Vector ShaderEXT)
-> (("shaders" ::: Vector ShaderEXT) -> io ()) -> r
b (forall (io :: * -> *).
MonadIO io =>
Device
-> ("createInfos" ::: Vector (SomeStruct ShaderCreateInfoEXT))
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ("shaders" ::: Vector ShaderEXT)
createShadersEXT Device
device "createInfos" ::: Vector (SomeStruct ShaderCreateInfoEXT)
pCreateInfos "allocator" ::: Maybe AllocationCallbacks
pAllocator)
(\("shaders" ::: Vector ShaderEXT
o0) -> forall (t :: * -> *) (f :: * -> *) a b.
(Foldable t, Applicative f) =>
(a -> f b) -> t a -> f ()
traverse_ (\ShaderEXT
o0Elem -> forall (io :: * -> *).
MonadIO io =>
Device
-> ShaderEXT
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyShaderEXT Device
device
ShaderEXT
o0Elem
"allocator" ::: Maybe AllocationCallbacks
pAllocator) "shaders" ::: Vector ShaderEXT
o0)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkDestroyShaderEXT
:: FunPtr (Ptr Device_T -> ShaderEXT -> Ptr AllocationCallbacks -> IO ()) -> Ptr Device_T -> ShaderEXT -> Ptr AllocationCallbacks -> IO ()
destroyShaderEXT :: forall io
. (MonadIO io)
=>
Device
->
ShaderEXT
->
("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyShaderEXT :: forall (io :: * -> *).
MonadIO io =>
Device
-> ShaderEXT
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyShaderEXT Device
device ShaderEXT
shader "allocator" ::: Maybe AllocationCallbacks
allocator = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkDestroyShaderEXTPtr :: FunPtr
(Ptr Device_T
-> ShaderEXT
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroyShaderEXTPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ShaderEXT
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
pVkDestroyShaderEXT (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ShaderEXT
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroyShaderEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkDestroyShaderEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkDestroyShaderEXT' :: Ptr Device_T
-> ShaderEXT -> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()
vkDestroyShaderEXT' = FunPtr
(Ptr Device_T
-> ShaderEXT
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
-> Ptr Device_T
-> ShaderEXT
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
mkVkDestroyShaderEXT FunPtr
(Ptr Device_T
-> ShaderEXT
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroyShaderEXTPtr
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
"allocator" ::: Maybe AllocationCallbacks
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkDestroyShaderEXT" (Ptr Device_T
-> ShaderEXT -> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()
vkDestroyShaderEXT'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(ShaderEXT
shader)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator)
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetShaderBinaryDataEXT
:: FunPtr (Ptr Device_T -> ShaderEXT -> Ptr CSize -> Ptr () -> IO Result) -> Ptr Device_T -> ShaderEXT -> Ptr CSize -> Ptr () -> IO Result
getShaderBinaryDataEXT :: forall io
. (MonadIO io)
=>
Device
->
ShaderEXT
-> io (Result, ("data" ::: ByteString))
getShaderBinaryDataEXT :: forall (io :: * -> *).
MonadIO io =>
Device -> ShaderEXT -> io (Result, "data" ::: ByteString)
getShaderBinaryDataEXT Device
device ShaderEXT
shader = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkGetShaderBinaryDataEXTPtr :: FunPtr
(Ptr Device_T
-> ShaderEXT
-> ("pDataSize" ::: Ptr CSize)
-> ("pData" ::: Ptr ())
-> IO Result)
vkGetShaderBinaryDataEXTPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ShaderEXT
-> ("pDataSize" ::: Ptr CSize)
-> ("pData" ::: Ptr ())
-> IO Result)
pVkGetShaderBinaryDataEXT (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ShaderEXT
-> ("pDataSize" ::: Ptr CSize)
-> ("pData" ::: Ptr ())
-> IO Result)
vkGetShaderBinaryDataEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetShaderBinaryDataEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkGetShaderBinaryDataEXT' :: Ptr Device_T
-> ShaderEXT
-> ("pDataSize" ::: Ptr CSize)
-> ("pData" ::: Ptr ())
-> IO Result
vkGetShaderBinaryDataEXT' = FunPtr
(Ptr Device_T
-> ShaderEXT
-> ("pDataSize" ::: Ptr CSize)
-> ("pData" ::: Ptr ())
-> IO Result)
-> Ptr Device_T
-> ShaderEXT
-> ("pDataSize" ::: Ptr CSize)
-> ("pData" ::: Ptr ())
-> IO Result
mkVkGetShaderBinaryDataEXT FunPtr
(Ptr Device_T
-> ShaderEXT
-> ("pDataSize" ::: Ptr CSize)
-> ("pData" ::: Ptr ())
-> IO Result)
vkGetShaderBinaryDataEXTPtr
let device' :: Ptr Device_T
device' = Device -> Ptr Device_T
deviceHandle (Device
device)
"pDataSize" ::: Ptr CSize
pPDataSize <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @CSize Int
8) forall a. Ptr a -> IO ()
free
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetShaderBinaryDataEXT" (Ptr Device_T
-> ShaderEXT
-> ("pDataSize" ::: Ptr CSize)
-> ("pData" ::: Ptr ())
-> IO Result
vkGetShaderBinaryDataEXT'
Ptr Device_T
device'
(ShaderEXT
shader)
("pDataSize" ::: Ptr CSize
pPDataSize)
(forall a. Ptr a
nullPtr))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
CSize
pDataSize <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @CSize "pDataSize" ::: Ptr CSize
pPDataSize
"pData" ::: Ptr ()
pPData <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @(()) (forall a b. (Integral a, Num b) => a -> b
fromIntegral ((coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 CSize
pDataSize)))) forall a. Ptr a -> IO ()
free
Result
r' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetShaderBinaryDataEXT" (Ptr Device_T
-> ShaderEXT
-> ("pDataSize" ::: Ptr CSize)
-> ("pData" ::: Ptr ())
-> IO Result
vkGetShaderBinaryDataEXT'
Ptr Device_T
device'
(ShaderEXT
shader)
("pDataSize" ::: Ptr CSize
pPDataSize)
("pData" ::: Ptr ()
pPData))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r' forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r'))
CSize
pDataSize'' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @CSize "pDataSize" ::: Ptr CSize
pPDataSize
"data" ::: ByteString
pData' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ CStringLen -> IO ("data" ::: ByteString)
packCStringLen ( forall a b. Ptr a -> Ptr b
castPtr @() @CChar "pData" ::: Ptr ()
pPData
, (forall a b. (Integral a, Num b) => a -> b
fromIntegral ((coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 CSize
pDataSize''))) )
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ((Result
r'), "data" ::: ByteString
pData')
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdBindShadersEXT
:: FunPtr (Ptr CommandBuffer_T -> Word32 -> Ptr ShaderStageFlagBits -> Ptr ShaderEXT -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Ptr ShaderStageFlagBits -> Ptr ShaderEXT -> IO ()
cmdBindShadersEXT :: forall io
. (MonadIO io)
=>
CommandBuffer
->
("stages" ::: Vector ShaderStageFlagBits)
->
("shaders" ::: Vector ShaderEXT)
-> io ()
cmdBindShadersEXT :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> ("stages" ::: Vector ShaderStageFlagBits)
-> ("shaders" ::: Vector ShaderEXT)
-> io ()
cmdBindShadersEXT CommandBuffer
commandBuffer "stages" ::: Vector ShaderStageFlagBits
stages "shaders" ::: Vector ShaderEXT
shaders = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkCmdBindShadersEXTPtr :: FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pStages" ::: Ptr ShaderStageFlagBits)
-> ("pShaders" ::: Ptr ShaderEXT)
-> IO ())
vkCmdBindShadersEXTPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pStages" ::: Ptr ShaderStageFlagBits)
-> ("pShaders" ::: Ptr ShaderEXT)
-> IO ())
pVkCmdBindShadersEXT (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pStages" ::: Ptr ShaderStageFlagBits)
-> ("pShaders" ::: Ptr ShaderEXT)
-> IO ())
vkCmdBindShadersEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdBindShadersEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkCmdBindShadersEXT' :: Ptr CommandBuffer_T
-> Flags
-> ("pStages" ::: Ptr ShaderStageFlagBits)
-> ("pShaders" ::: Ptr ShaderEXT)
-> IO ()
vkCmdBindShadersEXT' = FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pStages" ::: Ptr ShaderStageFlagBits)
-> ("pShaders" ::: Ptr ShaderEXT)
-> IO ())
-> Ptr CommandBuffer_T
-> Flags
-> ("pStages" ::: Ptr ShaderStageFlagBits)
-> ("pShaders" ::: Ptr ShaderEXT)
-> IO ()
mkVkCmdBindShadersEXT FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pStages" ::: Ptr ShaderStageFlagBits)
-> ("pShaders" ::: Ptr ShaderEXT)
-> IO ())
vkCmdBindShadersEXTPtr
let pStagesLength :: Int
pStagesLength = forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ ("stages" ::: Vector ShaderStageFlagBits
stages)
let pShadersLength :: Int
pShadersLength = forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ ("shaders" ::: Vector ShaderEXT
shaders)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pShadersLength forall a. Eq a => a -> a -> Bool
== Int
pStagesLength Bool -> Bool -> Bool
|| Int
pShadersLength forall a. Eq a => a -> a -> Bool
== Int
0) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"pShaders and pStages must have the same length" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
"pStages" ::: Ptr ShaderStageFlagBits
pPStages <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @ShaderStageFlagBits ((forall a. Vector a -> Int
Data.Vector.length ("stages" ::: Vector ShaderStageFlagBits
stages)) forall a. Num a => a -> a -> a
* Int
4)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i ShaderStageFlagBits
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke ("pStages" ::: Ptr ShaderStageFlagBits
pPStages forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr ShaderStageFlagBits) (ShaderStageFlagBits
e)) ("stages" ::: Vector ShaderStageFlagBits
stages)
"pShaders" ::: Ptr ShaderEXT
pShaders <- if forall a. Vector a -> Bool
Data.Vector.null ("shaders" ::: Vector ShaderEXT
shaders)
then forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
else do
"pShaders" ::: Ptr ShaderEXT
pPShaders <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @ShaderEXT (((forall a. Vector a -> Int
Data.Vector.length ("shaders" ::: Vector ShaderEXT
shaders))) forall a. Num a => a -> a -> a
* Int
8)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i ShaderEXT
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke ("pShaders" ::: Ptr ShaderEXT
pPShaders forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr ShaderEXT) (ShaderEXT
e)) (("shaders" ::: Vector ShaderEXT
shaders))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ "pShaders" ::: Ptr ShaderEXT
pPShaders
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdBindShadersEXT" (Ptr CommandBuffer_T
-> Flags
-> ("pStages" ::: Ptr ShaderStageFlagBits)
-> ("pShaders" ::: Ptr ShaderEXT)
-> IO ()
vkCmdBindShadersEXT'
(CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
((forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pStagesLength :: Word32))
("pStages" ::: Ptr ShaderStageFlagBits
pPStages)
"pShaders" ::: Ptr ShaderEXT
pShaders)
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()
pattern $bSTRUCTURE_TYPE_SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT :: StructureType
$mSTRUCTURE_TYPE_SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT :: forall {r}. StructureType -> ((# #) -> r) -> ((# #) -> r) -> r
STRUCTURE_TYPE_SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT = STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO
data PhysicalDeviceShaderObjectFeaturesEXT = PhysicalDeviceShaderObjectFeaturesEXT
{
PhysicalDeviceShaderObjectFeaturesEXT -> Bool
shaderObject :: Bool }
deriving (Typeable, PhysicalDeviceShaderObjectFeaturesEXT
-> PhysicalDeviceShaderObjectFeaturesEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceShaderObjectFeaturesEXT
-> PhysicalDeviceShaderObjectFeaturesEXT -> Bool
$c/= :: PhysicalDeviceShaderObjectFeaturesEXT
-> PhysicalDeviceShaderObjectFeaturesEXT -> Bool
== :: PhysicalDeviceShaderObjectFeaturesEXT
-> PhysicalDeviceShaderObjectFeaturesEXT -> Bool
$c== :: PhysicalDeviceShaderObjectFeaturesEXT
-> PhysicalDeviceShaderObjectFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceShaderObjectFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceShaderObjectFeaturesEXT
instance ToCStruct PhysicalDeviceShaderObjectFeaturesEXT where
withCStruct :: forall b.
PhysicalDeviceShaderObjectFeaturesEXT
-> (Ptr PhysicalDeviceShaderObjectFeaturesEXT -> IO b) -> IO b
withCStruct PhysicalDeviceShaderObjectFeaturesEXT
x Ptr PhysicalDeviceShaderObjectFeaturesEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceShaderObjectFeaturesEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceShaderObjectFeaturesEXT
p PhysicalDeviceShaderObjectFeaturesEXT
x (Ptr PhysicalDeviceShaderObjectFeaturesEXT -> IO b
f Ptr PhysicalDeviceShaderObjectFeaturesEXT
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceShaderObjectFeaturesEXT
-> PhysicalDeviceShaderObjectFeaturesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceShaderObjectFeaturesEXT
p PhysicalDeviceShaderObjectFeaturesEXT{Bool
shaderObject :: Bool
$sel:shaderObject:PhysicalDeviceShaderObjectFeaturesEXT :: PhysicalDeviceShaderObjectFeaturesEXT -> Bool
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderObjectFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderObjectFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderObjectFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderObject))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr PhysicalDeviceShaderObjectFeaturesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceShaderObjectFeaturesEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderObjectFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderObjectFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderObjectFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceShaderObjectFeaturesEXT where
peekCStruct :: Ptr PhysicalDeviceShaderObjectFeaturesEXT
-> IO PhysicalDeviceShaderObjectFeaturesEXT
peekCStruct Ptr PhysicalDeviceShaderObjectFeaturesEXT
p = do
Bool32
shaderObject <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceShaderObjectFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Bool -> PhysicalDeviceShaderObjectFeaturesEXT
PhysicalDeviceShaderObjectFeaturesEXT
(Bool32 -> Bool
bool32ToBool Bool32
shaderObject)
instance Storable PhysicalDeviceShaderObjectFeaturesEXT where
sizeOf :: PhysicalDeviceShaderObjectFeaturesEXT -> Int
sizeOf ~PhysicalDeviceShaderObjectFeaturesEXT
_ = Int
24
alignment :: PhysicalDeviceShaderObjectFeaturesEXT -> Int
alignment ~PhysicalDeviceShaderObjectFeaturesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceShaderObjectFeaturesEXT
-> IO PhysicalDeviceShaderObjectFeaturesEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceShaderObjectFeaturesEXT
-> PhysicalDeviceShaderObjectFeaturesEXT -> IO ()
poke Ptr PhysicalDeviceShaderObjectFeaturesEXT
ptr PhysicalDeviceShaderObjectFeaturesEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceShaderObjectFeaturesEXT
ptr PhysicalDeviceShaderObjectFeaturesEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceShaderObjectFeaturesEXT where
zero :: PhysicalDeviceShaderObjectFeaturesEXT
zero = Bool -> PhysicalDeviceShaderObjectFeaturesEXT
PhysicalDeviceShaderObjectFeaturesEXT
forall a. Zero a => a
zero
data PhysicalDeviceShaderObjectPropertiesEXT = PhysicalDeviceShaderObjectPropertiesEXT
{
PhysicalDeviceShaderObjectPropertiesEXT -> "data" ::: ByteString
shaderBinaryUUID :: ByteString
,
PhysicalDeviceShaderObjectPropertiesEXT -> Flags
shaderBinaryVersion :: Word32
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceShaderObjectPropertiesEXT)
#endif
deriving instance Show PhysicalDeviceShaderObjectPropertiesEXT
instance ToCStruct PhysicalDeviceShaderObjectPropertiesEXT where
withCStruct :: forall b.
PhysicalDeviceShaderObjectPropertiesEXT
-> (Ptr PhysicalDeviceShaderObjectPropertiesEXT -> IO b) -> IO b
withCStruct PhysicalDeviceShaderObjectPropertiesEXT
x Ptr PhysicalDeviceShaderObjectPropertiesEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceShaderObjectPropertiesEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceShaderObjectPropertiesEXT
p PhysicalDeviceShaderObjectPropertiesEXT
x (Ptr PhysicalDeviceShaderObjectPropertiesEXT -> IO b
f Ptr PhysicalDeviceShaderObjectPropertiesEXT
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceShaderObjectPropertiesEXT
-> PhysicalDeviceShaderObjectPropertiesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceShaderObjectPropertiesEXT
p PhysicalDeviceShaderObjectPropertiesEXT{Flags
"data" ::: ByteString
shaderBinaryVersion :: Flags
shaderBinaryUUID :: "data" ::: ByteString
$sel:shaderBinaryVersion:PhysicalDeviceShaderObjectPropertiesEXT :: PhysicalDeviceShaderObjectPropertiesEXT -> Flags
$sel:shaderBinaryUUID:PhysicalDeviceShaderObjectPropertiesEXT :: PhysicalDeviceShaderObjectPropertiesEXT -> "data" ::: ByteString
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderObjectPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderObjectPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8) -> ("data" ::: ByteString) -> IO ()
pokeFixedLengthByteString ((Ptr PhysicalDeviceShaderObjectPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (FixedArray UUID_SIZE Word8))) ("data" ::: ByteString
shaderBinaryUUID)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderObjectPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (Flags
shaderBinaryVersion)
IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceShaderObjectPropertiesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceShaderObjectPropertiesEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderObjectPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderObjectPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8) -> ("data" ::: ByteString) -> IO ()
pokeFixedLengthByteString ((Ptr PhysicalDeviceShaderObjectPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (FixedArray UUID_SIZE Word8))) (forall a. Monoid a => a
mempty)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderObjectPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDeviceShaderObjectPropertiesEXT where
peekCStruct :: Ptr PhysicalDeviceShaderObjectPropertiesEXT
-> IO PhysicalDeviceShaderObjectPropertiesEXT
peekCStruct Ptr PhysicalDeviceShaderObjectPropertiesEXT
p = do
"data" ::: ByteString
shaderBinaryUUID <- forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8) -> IO ("data" ::: ByteString)
peekByteStringFromSizedVectorPtr ((Ptr PhysicalDeviceShaderObjectPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (FixedArray UUID_SIZE Word8)))
Flags
shaderBinaryVersion <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceShaderObjectPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ("data" ::: ByteString)
-> Flags -> PhysicalDeviceShaderObjectPropertiesEXT
PhysicalDeviceShaderObjectPropertiesEXT
"data" ::: ByteString
shaderBinaryUUID Flags
shaderBinaryVersion
instance Storable PhysicalDeviceShaderObjectPropertiesEXT where
sizeOf :: PhysicalDeviceShaderObjectPropertiesEXT -> Int
sizeOf ~PhysicalDeviceShaderObjectPropertiesEXT
_ = Int
40
alignment :: PhysicalDeviceShaderObjectPropertiesEXT -> Int
alignment ~PhysicalDeviceShaderObjectPropertiesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceShaderObjectPropertiesEXT
-> IO PhysicalDeviceShaderObjectPropertiesEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceShaderObjectPropertiesEXT
-> PhysicalDeviceShaderObjectPropertiesEXT -> IO ()
poke Ptr PhysicalDeviceShaderObjectPropertiesEXT
ptr PhysicalDeviceShaderObjectPropertiesEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceShaderObjectPropertiesEXT
ptr PhysicalDeviceShaderObjectPropertiesEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceShaderObjectPropertiesEXT where
zero :: PhysicalDeviceShaderObjectPropertiesEXT
zero = ("data" ::: ByteString)
-> Flags -> PhysicalDeviceShaderObjectPropertiesEXT
PhysicalDeviceShaderObjectPropertiesEXT
forall a. Monoid a => a
mempty
forall a. Zero a => a
zero
data ShaderCreateInfoEXT (es :: [Type]) = ShaderCreateInfoEXT
{
forall (es :: [*]). ShaderCreateInfoEXT es -> Chain es
next :: Chain es
,
forall (es :: [*]).
ShaderCreateInfoEXT es -> ShaderCreateFlagBitsEXT
flags :: ShaderCreateFlagsEXT
,
forall (es :: [*]). ShaderCreateInfoEXT es -> ShaderStageFlagBits
stage :: ShaderStageFlagBits
,
forall (es :: [*]). ShaderCreateInfoEXT es -> ShaderStageFlagBits
nextStage :: ShaderStageFlags
,
forall (es :: [*]). ShaderCreateInfoEXT es -> ShaderCodeTypeEXT
codeType :: ShaderCodeTypeEXT
,
forall (es :: [*]). ShaderCreateInfoEXT es -> Word64
codeSize :: Word64
,
forall (es :: [*]). ShaderCreateInfoEXT es -> "pData" ::: Ptr ()
code :: Ptr ()
,
forall (es :: [*]).
ShaderCreateInfoEXT es -> Maybe ("data" ::: ByteString)
name :: Maybe ByteString
,
forall (es :: [*]). ShaderCreateInfoEXT es -> Flags
setLayoutCount :: Word32
,
forall (es :: [*]).
ShaderCreateInfoEXT es -> Vector DescriptorSetLayout
setLayouts :: Vector DescriptorSetLayout
,
forall (es :: [*]). ShaderCreateInfoEXT es -> Flags
pushConstantRangeCount :: Word32
,
forall (es :: [*]).
ShaderCreateInfoEXT es -> Vector PushConstantRange
pushConstantRanges :: Vector PushConstantRange
,
forall (es :: [*]).
ShaderCreateInfoEXT es -> Maybe SpecializationInfo
specializationInfo :: Maybe SpecializationInfo
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ShaderCreateInfoEXT (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (ShaderCreateInfoEXT es)
instance Extensible ShaderCreateInfoEXT where
extensibleTypeName :: String
extensibleTypeName = String
"ShaderCreateInfoEXT"
setNext :: forall (ds :: [*]) (es :: [*]).
ShaderCreateInfoEXT ds -> Chain es -> ShaderCreateInfoEXT es
setNext ShaderCreateInfoEXT{Maybe ("data" ::: ByteString)
Maybe SpecializationInfo
Flags
Word64
"pData" ::: Ptr ()
Vector DescriptorSetLayout
Vector PushConstantRange
Chain ds
ShaderStageFlagBits
ShaderCodeTypeEXT
ShaderCreateFlagBitsEXT
specializationInfo :: Maybe SpecializationInfo
pushConstantRanges :: Vector PushConstantRange
pushConstantRangeCount :: Flags
setLayouts :: Vector DescriptorSetLayout
setLayoutCount :: Flags
name :: Maybe ("data" ::: ByteString)
code :: "pData" ::: Ptr ()
codeSize :: Word64
codeType :: ShaderCodeTypeEXT
nextStage :: ShaderStageFlagBits
stage :: ShaderStageFlagBits
flags :: ShaderCreateFlagBitsEXT
next :: Chain ds
$sel:specializationInfo:ShaderCreateInfoEXT :: forall (es :: [*]).
ShaderCreateInfoEXT es -> Maybe SpecializationInfo
$sel:pushConstantRanges:ShaderCreateInfoEXT :: forall (es :: [*]).
ShaderCreateInfoEXT es -> Vector PushConstantRange
$sel:pushConstantRangeCount:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> Flags
$sel:setLayouts:ShaderCreateInfoEXT :: forall (es :: [*]).
ShaderCreateInfoEXT es -> Vector DescriptorSetLayout
$sel:setLayoutCount:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> Flags
$sel:name:ShaderCreateInfoEXT :: forall (es :: [*]).
ShaderCreateInfoEXT es -> Maybe ("data" ::: ByteString)
$sel:code:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> "pData" ::: Ptr ()
$sel:codeSize:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> Word64
$sel:codeType:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> ShaderCodeTypeEXT
$sel:nextStage:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> ShaderStageFlagBits
$sel:stage:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> ShaderStageFlagBits
$sel:flags:ShaderCreateInfoEXT :: forall (es :: [*]).
ShaderCreateInfoEXT es -> ShaderCreateFlagBitsEXT
$sel:next:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> Chain es
..} Chain es
next' = ShaderCreateInfoEXT{$sel:next:ShaderCreateInfoEXT :: Chain es
next = Chain es
next', Maybe ("data" ::: ByteString)
Maybe SpecializationInfo
Flags
Word64
"pData" ::: Ptr ()
Vector DescriptorSetLayout
Vector PushConstantRange
ShaderStageFlagBits
ShaderCodeTypeEXT
ShaderCreateFlagBitsEXT
specializationInfo :: Maybe SpecializationInfo
pushConstantRanges :: Vector PushConstantRange
pushConstantRangeCount :: Flags
setLayouts :: Vector DescriptorSetLayout
setLayoutCount :: Flags
name :: Maybe ("data" ::: ByteString)
code :: "pData" ::: Ptr ()
codeSize :: Word64
codeType :: ShaderCodeTypeEXT
nextStage :: ShaderStageFlagBits
stage :: ShaderStageFlagBits
flags :: ShaderCreateFlagBitsEXT
$sel:specializationInfo:ShaderCreateInfoEXT :: Maybe SpecializationInfo
$sel:pushConstantRanges:ShaderCreateInfoEXT :: Vector PushConstantRange
$sel:pushConstantRangeCount:ShaderCreateInfoEXT :: Flags
$sel:setLayouts:ShaderCreateInfoEXT :: Vector DescriptorSetLayout
$sel:setLayoutCount:ShaderCreateInfoEXT :: Flags
$sel:name:ShaderCreateInfoEXT :: Maybe ("data" ::: ByteString)
$sel:code:ShaderCreateInfoEXT :: "pData" ::: Ptr ()
$sel:codeSize:ShaderCreateInfoEXT :: Word64
$sel:codeType:ShaderCreateInfoEXT :: ShaderCodeTypeEXT
$sel:nextStage:ShaderCreateInfoEXT :: ShaderStageFlagBits
$sel:stage:ShaderCreateInfoEXT :: ShaderStageFlagBits
$sel:flags:ShaderCreateInfoEXT :: ShaderCreateFlagBitsEXT
..}
getNext :: forall (es :: [*]). ShaderCreateInfoEXT es -> Chain es
getNext ShaderCreateInfoEXT{Maybe ("data" ::: ByteString)
Maybe SpecializationInfo
Flags
Word64
"pData" ::: Ptr ()
Vector DescriptorSetLayout
Vector PushConstantRange
Chain es
ShaderStageFlagBits
ShaderCodeTypeEXT
ShaderCreateFlagBitsEXT
specializationInfo :: Maybe SpecializationInfo
pushConstantRanges :: Vector PushConstantRange
pushConstantRangeCount :: Flags
setLayouts :: Vector DescriptorSetLayout
setLayoutCount :: Flags
name :: Maybe ("data" ::: ByteString)
code :: "pData" ::: Ptr ()
codeSize :: Word64
codeType :: ShaderCodeTypeEXT
nextStage :: ShaderStageFlagBits
stage :: ShaderStageFlagBits
flags :: ShaderCreateFlagBitsEXT
next :: Chain es
$sel:specializationInfo:ShaderCreateInfoEXT :: forall (es :: [*]).
ShaderCreateInfoEXT es -> Maybe SpecializationInfo
$sel:pushConstantRanges:ShaderCreateInfoEXT :: forall (es :: [*]).
ShaderCreateInfoEXT es -> Vector PushConstantRange
$sel:pushConstantRangeCount:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> Flags
$sel:setLayouts:ShaderCreateInfoEXT :: forall (es :: [*]).
ShaderCreateInfoEXT es -> Vector DescriptorSetLayout
$sel:setLayoutCount:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> Flags
$sel:name:ShaderCreateInfoEXT :: forall (es :: [*]).
ShaderCreateInfoEXT es -> Maybe ("data" ::: ByteString)
$sel:code:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> "pData" ::: Ptr ()
$sel:codeSize:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> Word64
$sel:codeType:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> ShaderCodeTypeEXT
$sel:nextStage:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> ShaderStageFlagBits
$sel:stage:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> ShaderStageFlagBits
$sel:flags:ShaderCreateInfoEXT :: forall (es :: [*]).
ShaderCreateInfoEXT es -> ShaderCreateFlagBitsEXT
$sel:next:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> Chain es
..} = Chain es
next
extends :: forall e b proxy. Typeable e => proxy e -> (Extends ShaderCreateInfoEXT e => b) -> Maybe b
extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e -> (Extends ShaderCreateInfoEXT e => b) -> Maybe b
extends proxy e
_ Extends ShaderCreateInfoEXT e => b
f
| Just e :~: PipelineShaderStageRequiredSubgroupSizeCreateInfo
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineShaderStageRequiredSubgroupSizeCreateInfo = forall a. a -> Maybe a
Just Extends ShaderCreateInfoEXT e => b
f
| Bool
otherwise = forall a. Maybe a
Nothing
instance ( Extendss ShaderCreateInfoEXT es
, PokeChain es ) => ToCStruct (ShaderCreateInfoEXT es) where
withCStruct :: forall b.
ShaderCreateInfoEXT es
-> (Ptr (ShaderCreateInfoEXT es) -> IO b) -> IO b
withCStruct ShaderCreateInfoEXT es
x Ptr (ShaderCreateInfoEXT es) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
96 forall a b. (a -> b) -> a -> b
$ \Ptr (ShaderCreateInfoEXT es)
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (ShaderCreateInfoEXT es)
p ShaderCreateInfoEXT es
x (Ptr (ShaderCreateInfoEXT es) -> IO b
f Ptr (ShaderCreateInfoEXT es)
p)
pokeCStruct :: forall b.
Ptr (ShaderCreateInfoEXT es)
-> ShaderCreateInfoEXT es -> IO b -> IO b
pokeCStruct Ptr (ShaderCreateInfoEXT es)
p ShaderCreateInfoEXT{Maybe ("data" ::: ByteString)
Maybe SpecializationInfo
Flags
Word64
"pData" ::: Ptr ()
Vector DescriptorSetLayout
Vector PushConstantRange
Chain es
ShaderStageFlagBits
ShaderCodeTypeEXT
ShaderCreateFlagBitsEXT
specializationInfo :: Maybe SpecializationInfo
pushConstantRanges :: Vector PushConstantRange
pushConstantRangeCount :: Flags
setLayouts :: Vector DescriptorSetLayout
setLayoutCount :: Flags
name :: Maybe ("data" ::: ByteString)
code :: "pData" ::: Ptr ()
codeSize :: Word64
codeType :: ShaderCodeTypeEXT
nextStage :: ShaderStageFlagBits
stage :: ShaderStageFlagBits
flags :: ShaderCreateFlagBitsEXT
next :: Chain es
$sel:specializationInfo:ShaderCreateInfoEXT :: forall (es :: [*]).
ShaderCreateInfoEXT es -> Maybe SpecializationInfo
$sel:pushConstantRanges:ShaderCreateInfoEXT :: forall (es :: [*]).
ShaderCreateInfoEXT es -> Vector PushConstantRange
$sel:pushConstantRangeCount:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> Flags
$sel:setLayouts:ShaderCreateInfoEXT :: forall (es :: [*]).
ShaderCreateInfoEXT es -> Vector DescriptorSetLayout
$sel:setLayoutCount:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> Flags
$sel:name:ShaderCreateInfoEXT :: forall (es :: [*]).
ShaderCreateInfoEXT es -> Maybe ("data" ::: ByteString)
$sel:code:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> "pData" ::: Ptr ()
$sel:codeSize:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> Word64
$sel:codeType:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> ShaderCodeTypeEXT
$sel:nextStage:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> ShaderStageFlagBits
$sel:stage:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> ShaderStageFlagBits
$sel:flags:ShaderCreateInfoEXT :: forall (es :: [*]).
ShaderCreateInfoEXT es -> ShaderCreateFlagBitsEXT
$sel:next:ShaderCreateInfoEXT :: forall (es :: [*]). ShaderCreateInfoEXT es -> Chain es
..} IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT)
"pData" ::: Ptr ()
pNext'' <- forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a b. Ptr a -> Ptr b
castPtr forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) "pData" ::: Ptr ()
pNext''
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ShaderCreateFlagsEXT)) (ShaderCreateFlagBitsEXT
flags)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr ShaderStageFlagBits)) (ShaderStageFlagBits
stage)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr ShaderStageFlags)) (ShaderStageFlagBits
nextStage)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr ShaderCodeTypeEXT)) (ShaderCodeTypeEXT
codeType)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr CSize)) (Word64 -> CSize
CSize (Word64
codeSize))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr ()))) ("pData" ::: Ptr ()
code)
Ptr CChar
pName'' <- case (Maybe ("data" ::: ByteString)
name) of
Maybe ("data" ::: ByteString)
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
Just "data" ::: ByteString
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a. ("data" ::: ByteString) -> (Ptr CChar -> IO a) -> IO a
useAsCString ("data" ::: ByteString
j)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr (Ptr CChar))) Ptr CChar
pName''
let pSetLayoutsLength :: Int
pSetLayoutsLength = forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ (Vector DescriptorSetLayout
setLayouts)
Flags
setLayoutCount'' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ if (Flags
setLayoutCount) forall a. Eq a => a -> a -> Bool
== Flags
0
then forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pSetLayoutsLength
else do
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pSetLayoutsLength forall a. Eq a => a -> a -> Bool
== (Flags
setLayoutCount) Bool -> Bool -> Bool
|| Int
pSetLayoutsLength forall a. Eq a => a -> a -> Bool
== Int
0) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"pSetLayouts must be empty or have 'setLayoutCount' elements" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Flags
setLayoutCount)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) (Flags
setLayoutCount'')
Ptr DescriptorSetLayout
pSetLayouts'' <- if forall a. Vector a -> Bool
Data.Vector.null (Vector DescriptorSetLayout
setLayouts)
then forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
else do
Ptr DescriptorSetLayout
pPSetLayouts <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @DescriptorSetLayout (((forall a. Vector a -> Int
Data.Vector.length (Vector DescriptorSetLayout
setLayouts))) forall a. Num a => a -> a -> a
* Int
8)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i DescriptorSetLayout
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DescriptorSetLayout
pPSetLayouts forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr DescriptorSetLayout) (DescriptorSetLayout
e)) ((Vector DescriptorSetLayout
setLayouts))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Ptr DescriptorSetLayout
pPSetLayouts
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr (Ptr DescriptorSetLayout))) Ptr DescriptorSetLayout
pSetLayouts''
let pPushConstantRangesLength :: Int
pPushConstantRangesLength = forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ (Vector PushConstantRange
pushConstantRanges)
Flags
pushConstantRangeCount'' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ if (Flags
pushConstantRangeCount) forall a. Eq a => a -> a -> Bool
== Flags
0
then forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pPushConstantRangesLength
else do
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pPushConstantRangesLength forall a. Eq a => a -> a -> Bool
== (Flags
pushConstantRangeCount) Bool -> Bool -> Bool
|| Int
pPushConstantRangesLength forall a. Eq a => a -> a -> Bool
== Int
0) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"pPushConstantRanges must be empty or have 'pushConstantRangeCount' elements" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Flags
pushConstantRangeCount)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Word32)) (Flags
pushConstantRangeCount'')
Ptr PushConstantRange
pPushConstantRanges'' <- if forall a. Vector a -> Bool
Data.Vector.null (Vector PushConstantRange
pushConstantRanges)
then forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
else do
Ptr PushConstantRange
pPPushConstantRanges <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @PushConstantRange (((forall a. Vector a -> Int
Data.Vector.length (Vector PushConstantRange
pushConstantRanges))) forall a. Num a => a -> a -> a
* Int
12)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i PushConstantRange
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr PushConstantRange
pPPushConstantRanges forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
12 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PushConstantRange) (PushConstantRange
e)) ((Vector PushConstantRange
pushConstantRanges))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Ptr PushConstantRange
pPPushConstantRanges
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr (Ptr PushConstantRange))) Ptr PushConstantRange
pPushConstantRanges''
Ptr SpecializationInfo
pSpecializationInfo'' <- case (Maybe SpecializationInfo
specializationInfo) of
Maybe SpecializationInfo
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
Just SpecializationInfo
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (SpecializationInfo
j)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr (Ptr SpecializationInfo))) Ptr SpecializationInfo
pSpecializationInfo''
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
96
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr (ShaderCreateInfoEXT es) -> IO b -> IO b
pokeZeroCStruct Ptr (ShaderCreateInfoEXT es)
p IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT)
"pData" ::: Ptr ()
pNext' <- forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a b. Ptr a -> Ptr b
castPtr forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) "pData" ::: Ptr ()
pNext'
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr ShaderStageFlagBits)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr ShaderCodeTypeEXT)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr CSize)) (Word64 -> CSize
CSize (forall a. Zero a => a
zero))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr ()))) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
instance ( Extendss ShaderCreateInfoEXT es
, PeekChain es ) => FromCStruct (ShaderCreateInfoEXT es) where
peekCStruct :: Ptr (ShaderCreateInfoEXT es) -> IO (ShaderCreateInfoEXT es)
peekCStruct Ptr (ShaderCreateInfoEXT es)
p = do
"pData" ::: Ptr ()
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ())))
Chain es
next <- forall (es :: [*]). PeekChain es => Ptr (Chain es) -> IO (Chain es)
peekChain (forall a b. Ptr a -> Ptr b
castPtr "pData" ::: Ptr ()
pNext)
ShaderCreateFlagBitsEXT
flags <- forall a. Storable a => Ptr a -> IO a
peek @ShaderCreateFlagsEXT ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ShaderCreateFlagsEXT))
ShaderStageFlagBits
stage <- forall a. Storable a => Ptr a -> IO a
peek @ShaderStageFlagBits ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr ShaderStageFlagBits))
ShaderStageFlagBits
nextStage <- forall a. Storable a => Ptr a -> IO a
peek @ShaderStageFlags ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr ShaderStageFlags))
ShaderCodeTypeEXT
codeType <- forall a. Storable a => Ptr a -> IO a
peek @ShaderCodeTypeEXT ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr ShaderCodeTypeEXT))
CSize
codeSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr CSize))
"pData" ::: Ptr ()
pCode <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr ())))
Ptr CChar
pName <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr CChar) ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr (Ptr CChar)))
Maybe ("data" ::: ByteString)
pName' <- forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr CChar
j -> Ptr CChar -> IO ("data" ::: ByteString)
packCString (Ptr CChar
j)) Ptr CChar
pName
Flags
setLayoutCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32))
Ptr DescriptorSetLayout
pSetLayouts <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr DescriptorSetLayout) ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr (Ptr DescriptorSetLayout)))
let pSetLayoutsLength :: Int
pSetLayoutsLength = if Ptr DescriptorSetLayout
pSetLayouts forall a. Eq a => a -> a -> Bool
== forall a. Ptr a
nullPtr then Int
0 else (forall a b. (Integral a, Num b) => a -> b
fromIntegral Flags
setLayoutCount)
Vector DescriptorSetLayout
pSetLayouts' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM Int
pSetLayoutsLength (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @DescriptorSetLayout ((Ptr DescriptorSetLayout
pSetLayouts forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr DescriptorSetLayout)))
Flags
pushConstantRangeCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Word32))
Ptr PushConstantRange
pPushConstantRanges <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr PushConstantRange) ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr (Ptr PushConstantRange)))
let pPushConstantRangesLength :: Int
pPushConstantRangesLength = if Ptr PushConstantRange
pPushConstantRanges forall a. Eq a => a -> a -> Bool
== forall a. Ptr a
nullPtr then Int
0 else (forall a b. (Integral a, Num b) => a -> b
fromIntegral Flags
pushConstantRangeCount)
Vector PushConstantRange
pPushConstantRanges' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM Int
pPushConstantRangesLength (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PushConstantRange ((Ptr PushConstantRange
pPushConstantRanges forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
12 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PushConstantRange)))
Ptr SpecializationInfo
pSpecializationInfo <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr SpecializationInfo) ((Ptr (ShaderCreateInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr (Ptr SpecializationInfo)))
Maybe SpecializationInfo
pSpecializationInfo' <- forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr SpecializationInfo
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @SpecializationInfo (Ptr SpecializationInfo
j)) Ptr SpecializationInfo
pSpecializationInfo
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall (es :: [*]).
Chain es
-> ShaderCreateFlagBitsEXT
-> ShaderStageFlagBits
-> ShaderStageFlagBits
-> ShaderCodeTypeEXT
-> Word64
-> ("pData" ::: Ptr ())
-> Maybe ("data" ::: ByteString)
-> Flags
-> Vector DescriptorSetLayout
-> Flags
-> Vector PushConstantRange
-> Maybe SpecializationInfo
-> ShaderCreateInfoEXT es
ShaderCreateInfoEXT
Chain es
next
ShaderCreateFlagBitsEXT
flags
ShaderStageFlagBits
stage
ShaderStageFlagBits
nextStage
ShaderCodeTypeEXT
codeType
(coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 CSize
codeSize)
"pData" ::: Ptr ()
pCode
Maybe ("data" ::: ByteString)
pName'
Flags
setLayoutCount
Vector DescriptorSetLayout
pSetLayouts'
Flags
pushConstantRangeCount
Vector PushConstantRange
pPushConstantRanges'
Maybe SpecializationInfo
pSpecializationInfo'
instance es ~ '[] => Zero (ShaderCreateInfoEXT es) where
zero :: ShaderCreateInfoEXT es
zero = forall (es :: [*]).
Chain es
-> ShaderCreateFlagBitsEXT
-> ShaderStageFlagBits
-> ShaderStageFlagBits
-> ShaderCodeTypeEXT
-> Word64
-> ("pData" ::: Ptr ())
-> Maybe ("data" ::: ByteString)
-> Flags
-> Vector DescriptorSetLayout
-> Flags
-> Vector PushConstantRange
-> Maybe SpecializationInfo
-> ShaderCreateInfoEXT es
ShaderCreateInfoEXT
()
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Maybe a
Nothing
forall a. Zero a => a
zero
forall a. Monoid a => a
mempty
forall a. Zero a => a
zero
forall a. Monoid a => a
mempty
forall a. Maybe a
Nothing
type ShaderCreateFlagsEXT = ShaderCreateFlagBitsEXT
newtype ShaderCreateFlagBitsEXT = ShaderCreateFlagBitsEXT Flags
deriving newtype (ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> Bool
$c/= :: ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> Bool
== :: ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> Bool
$c== :: ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> Bool
Eq, Eq ShaderCreateFlagBitsEXT
ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> Bool
ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> Ordering
ShaderCreateFlagBitsEXT
-> ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ShaderCreateFlagBitsEXT
-> ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT
$cmin :: ShaderCreateFlagBitsEXT
-> ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT
max :: ShaderCreateFlagBitsEXT
-> ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT
$cmax :: ShaderCreateFlagBitsEXT
-> ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT
>= :: ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> Bool
$c>= :: ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> Bool
> :: ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> Bool
$c> :: ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> Bool
<= :: ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> Bool
$c<= :: ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> Bool
< :: ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> Bool
$c< :: ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> Bool
compare :: ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> Ordering
$ccompare :: ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> Ordering
Ord, Ptr ShaderCreateFlagBitsEXT -> IO ShaderCreateFlagBitsEXT
Ptr ShaderCreateFlagBitsEXT -> Int -> IO ShaderCreateFlagBitsEXT
Ptr ShaderCreateFlagBitsEXT
-> Int -> ShaderCreateFlagBitsEXT -> IO ()
Ptr ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> IO ()
ShaderCreateFlagBitsEXT -> Int
forall b. Ptr b -> Int -> IO ShaderCreateFlagBitsEXT
forall b. Ptr b -> Int -> ShaderCreateFlagBitsEXT -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> IO ()
$cpoke :: Ptr ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT -> IO ()
peek :: Ptr ShaderCreateFlagBitsEXT -> IO ShaderCreateFlagBitsEXT
$cpeek :: Ptr ShaderCreateFlagBitsEXT -> IO ShaderCreateFlagBitsEXT
pokeByteOff :: forall b. Ptr b -> Int -> ShaderCreateFlagBitsEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ShaderCreateFlagBitsEXT -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO ShaderCreateFlagBitsEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ShaderCreateFlagBitsEXT
pokeElemOff :: Ptr ShaderCreateFlagBitsEXT
-> Int -> ShaderCreateFlagBitsEXT -> IO ()
$cpokeElemOff :: Ptr ShaderCreateFlagBitsEXT
-> Int -> ShaderCreateFlagBitsEXT -> IO ()
peekElemOff :: Ptr ShaderCreateFlagBitsEXT -> Int -> IO ShaderCreateFlagBitsEXT
$cpeekElemOff :: Ptr ShaderCreateFlagBitsEXT -> Int -> IO ShaderCreateFlagBitsEXT
alignment :: ShaderCreateFlagBitsEXT -> Int
$calignment :: ShaderCreateFlagBitsEXT -> Int
sizeOf :: ShaderCreateFlagBitsEXT -> Int
$csizeOf :: ShaderCreateFlagBitsEXT -> Int
Storable, ShaderCreateFlagBitsEXT
forall a. a -> Zero a
zero :: ShaderCreateFlagBitsEXT
$czero :: ShaderCreateFlagBitsEXT
Zero, Eq ShaderCreateFlagBitsEXT
ShaderCreateFlagBitsEXT
Int -> ShaderCreateFlagBitsEXT
ShaderCreateFlagBitsEXT -> Bool
ShaderCreateFlagBitsEXT -> Int
ShaderCreateFlagBitsEXT -> Maybe Int
ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT
ShaderCreateFlagBitsEXT -> Int -> Bool
ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
ShaderCreateFlagBitsEXT
-> ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT
forall a.
Eq a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: ShaderCreateFlagBitsEXT -> Int
$cpopCount :: ShaderCreateFlagBitsEXT -> Int
rotateR :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
$crotateR :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
rotateL :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
$crotateL :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
unsafeShiftR :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
$cunsafeShiftR :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
shiftR :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
$cshiftR :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
unsafeShiftL :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
$cunsafeShiftL :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
shiftL :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
$cshiftL :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
isSigned :: ShaderCreateFlagBitsEXT -> Bool
$cisSigned :: ShaderCreateFlagBitsEXT -> Bool
bitSize :: ShaderCreateFlagBitsEXT -> Int
$cbitSize :: ShaderCreateFlagBitsEXT -> Int
bitSizeMaybe :: ShaderCreateFlagBitsEXT -> Maybe Int
$cbitSizeMaybe :: ShaderCreateFlagBitsEXT -> Maybe Int
testBit :: ShaderCreateFlagBitsEXT -> Int -> Bool
$ctestBit :: ShaderCreateFlagBitsEXT -> Int -> Bool
complementBit :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
$ccomplementBit :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
clearBit :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
$cclearBit :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
setBit :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
$csetBit :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
bit :: Int -> ShaderCreateFlagBitsEXT
$cbit :: Int -> ShaderCreateFlagBitsEXT
zeroBits :: ShaderCreateFlagBitsEXT
$czeroBits :: ShaderCreateFlagBitsEXT
rotate :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
$crotate :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
shift :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
$cshift :: ShaderCreateFlagBitsEXT -> Int -> ShaderCreateFlagBitsEXT
complement :: ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT
$ccomplement :: ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT
xor :: ShaderCreateFlagBitsEXT
-> ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT
$cxor :: ShaderCreateFlagBitsEXT
-> ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT
.|. :: ShaderCreateFlagBitsEXT
-> ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT
$c.|. :: ShaderCreateFlagBitsEXT
-> ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT
.&. :: ShaderCreateFlagBitsEXT
-> ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT
$c.&. :: ShaderCreateFlagBitsEXT
-> ShaderCreateFlagBitsEXT -> ShaderCreateFlagBitsEXT
Bits, Bits ShaderCreateFlagBitsEXT
ShaderCreateFlagBitsEXT -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: ShaderCreateFlagBitsEXT -> Int
$ccountTrailingZeros :: ShaderCreateFlagBitsEXT -> Int
countLeadingZeros :: ShaderCreateFlagBitsEXT -> Int
$ccountLeadingZeros :: ShaderCreateFlagBitsEXT -> Int
finiteBitSize :: ShaderCreateFlagBitsEXT -> Int
$cfiniteBitSize :: ShaderCreateFlagBitsEXT -> Int
FiniteBits)
pattern $bSHADER_CREATE_LINK_STAGE_BIT_EXT :: ShaderCreateFlagBitsEXT
$mSHADER_CREATE_LINK_STAGE_BIT_EXT :: forall {r}.
ShaderCreateFlagBitsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SHADER_CREATE_LINK_STAGE_BIT_EXT = ShaderCreateFlagBitsEXT 0x00000001
pattern $bSHADER_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT :: ShaderCreateFlagBitsEXT
$mSHADER_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT :: forall {r}.
ShaderCreateFlagBitsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SHADER_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = ShaderCreateFlagBitsEXT 0x00000040
pattern $bSHADER_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXT :: ShaderCreateFlagBitsEXT
$mSHADER_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXT :: forall {r}.
ShaderCreateFlagBitsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SHADER_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXT = ShaderCreateFlagBitsEXT 0x00000020
pattern $bSHADER_CREATE_DISPATCH_BASE_BIT_EXT :: ShaderCreateFlagBitsEXT
$mSHADER_CREATE_DISPATCH_BASE_BIT_EXT :: forall {r}.
ShaderCreateFlagBitsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SHADER_CREATE_DISPATCH_BASE_BIT_EXT = ShaderCreateFlagBitsEXT 0x00000010
pattern $bSHADER_CREATE_NO_TASK_SHADER_BIT_EXT :: ShaderCreateFlagBitsEXT
$mSHADER_CREATE_NO_TASK_SHADER_BIT_EXT :: forall {r}.
ShaderCreateFlagBitsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SHADER_CREATE_NO_TASK_SHADER_BIT_EXT = ShaderCreateFlagBitsEXT 0x00000008
pattern $bSHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT :: ShaderCreateFlagBitsEXT
$mSHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT :: forall {r}.
ShaderCreateFlagBitsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT = ShaderCreateFlagBitsEXT 0x00000004
pattern $bSHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT :: ShaderCreateFlagBitsEXT
$mSHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT :: forall {r}.
ShaderCreateFlagBitsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT = ShaderCreateFlagBitsEXT 0x00000002
conNameShaderCreateFlagBitsEXT :: String
conNameShaderCreateFlagBitsEXT :: String
conNameShaderCreateFlagBitsEXT = String
"ShaderCreateFlagBitsEXT"
enumPrefixShaderCreateFlagBitsEXT :: String
enumPrefixShaderCreateFlagBitsEXT :: String
enumPrefixShaderCreateFlagBitsEXT = String
"SHADER_CREATE_"
showTableShaderCreateFlagBitsEXT :: [(ShaderCreateFlagBitsEXT, String)]
showTableShaderCreateFlagBitsEXT :: [(ShaderCreateFlagBitsEXT, String)]
showTableShaderCreateFlagBitsEXT =
[
( ShaderCreateFlagBitsEXT
SHADER_CREATE_LINK_STAGE_BIT_EXT
, String
"LINK_STAGE_BIT_EXT"
)
,
( ShaderCreateFlagBitsEXT
SHADER_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT
, String
"FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT"
)
,
( ShaderCreateFlagBitsEXT
SHADER_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXT
, String
"FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXT"
)
,
( ShaderCreateFlagBitsEXT
SHADER_CREATE_DISPATCH_BASE_BIT_EXT
, String
"DISPATCH_BASE_BIT_EXT"
)
,
( ShaderCreateFlagBitsEXT
SHADER_CREATE_NO_TASK_SHADER_BIT_EXT
, String
"NO_TASK_SHADER_BIT_EXT"
)
,
( ShaderCreateFlagBitsEXT
SHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT
, String
"REQUIRE_FULL_SUBGROUPS_BIT_EXT"
)
,
( ShaderCreateFlagBitsEXT
SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT
, String
"ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT"
)
]
instance Show ShaderCreateFlagBitsEXT where
showsPrec :: Int -> ShaderCreateFlagBitsEXT -> ShowS
showsPrec =
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixShaderCreateFlagBitsEXT
[(ShaderCreateFlagBitsEXT, String)]
showTableShaderCreateFlagBitsEXT
String
conNameShaderCreateFlagBitsEXT
(\(ShaderCreateFlagBitsEXT Flags
x) -> Flags
x)
(\Flags
x -> String -> ShowS
showString String
"0x" forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)
instance Read ShaderCreateFlagBitsEXT where
readPrec :: ReadPrec ShaderCreateFlagBitsEXT
readPrec =
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixShaderCreateFlagBitsEXT
[(ShaderCreateFlagBitsEXT, String)]
showTableShaderCreateFlagBitsEXT
String
conNameShaderCreateFlagBitsEXT
Flags -> ShaderCreateFlagBitsEXT
ShaderCreateFlagBitsEXT
newtype ShaderCodeTypeEXT = ShaderCodeTypeEXT Int32
deriving newtype (ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> Bool
$c/= :: ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> Bool
== :: ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> Bool
$c== :: ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> Bool
Eq, Eq ShaderCodeTypeEXT
ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> Bool
ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> Ordering
ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> ShaderCodeTypeEXT
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> ShaderCodeTypeEXT
$cmin :: ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> ShaderCodeTypeEXT
max :: ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> ShaderCodeTypeEXT
$cmax :: ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> ShaderCodeTypeEXT
>= :: ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> Bool
$c>= :: ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> Bool
> :: ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> Bool
$c> :: ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> Bool
<= :: ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> Bool
$c<= :: ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> Bool
< :: ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> Bool
$c< :: ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> Bool
compare :: ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> Ordering
$ccompare :: ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> Ordering
Ord, Ptr ShaderCodeTypeEXT -> IO ShaderCodeTypeEXT
Ptr ShaderCodeTypeEXT -> Int -> IO ShaderCodeTypeEXT
Ptr ShaderCodeTypeEXT -> Int -> ShaderCodeTypeEXT -> IO ()
Ptr ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> IO ()
ShaderCodeTypeEXT -> Int
forall b. Ptr b -> Int -> IO ShaderCodeTypeEXT
forall b. Ptr b -> Int -> ShaderCodeTypeEXT -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> IO ()
$cpoke :: Ptr ShaderCodeTypeEXT -> ShaderCodeTypeEXT -> IO ()
peek :: Ptr ShaderCodeTypeEXT -> IO ShaderCodeTypeEXT
$cpeek :: Ptr ShaderCodeTypeEXT -> IO ShaderCodeTypeEXT
pokeByteOff :: forall b. Ptr b -> Int -> ShaderCodeTypeEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ShaderCodeTypeEXT -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO ShaderCodeTypeEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ShaderCodeTypeEXT
pokeElemOff :: Ptr ShaderCodeTypeEXT -> Int -> ShaderCodeTypeEXT -> IO ()
$cpokeElemOff :: Ptr ShaderCodeTypeEXT -> Int -> ShaderCodeTypeEXT -> IO ()
peekElemOff :: Ptr ShaderCodeTypeEXT -> Int -> IO ShaderCodeTypeEXT
$cpeekElemOff :: Ptr ShaderCodeTypeEXT -> Int -> IO ShaderCodeTypeEXT
alignment :: ShaderCodeTypeEXT -> Int
$calignment :: ShaderCodeTypeEXT -> Int
sizeOf :: ShaderCodeTypeEXT -> Int
$csizeOf :: ShaderCodeTypeEXT -> Int
Storable, ShaderCodeTypeEXT
forall a. a -> Zero a
zero :: ShaderCodeTypeEXT
$czero :: ShaderCodeTypeEXT
Zero)
pattern $bSHADER_CODE_TYPE_BINARY_EXT :: ShaderCodeTypeEXT
$mSHADER_CODE_TYPE_BINARY_EXT :: forall {r}. ShaderCodeTypeEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SHADER_CODE_TYPE_BINARY_EXT = ShaderCodeTypeEXT 0
pattern $bSHADER_CODE_TYPE_SPIRV_EXT :: ShaderCodeTypeEXT
$mSHADER_CODE_TYPE_SPIRV_EXT :: forall {r}. ShaderCodeTypeEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SHADER_CODE_TYPE_SPIRV_EXT = ShaderCodeTypeEXT 1
{-# COMPLETE
SHADER_CODE_TYPE_BINARY_EXT
, SHADER_CODE_TYPE_SPIRV_EXT ::
ShaderCodeTypeEXT
#-}
conNameShaderCodeTypeEXT :: String
conNameShaderCodeTypeEXT :: String
conNameShaderCodeTypeEXT = String
"ShaderCodeTypeEXT"
enumPrefixShaderCodeTypeEXT :: String
enumPrefixShaderCodeTypeEXT :: String
enumPrefixShaderCodeTypeEXT = String
"SHADER_CODE_TYPE_"
showTableShaderCodeTypeEXT :: [(ShaderCodeTypeEXT, String)]
showTableShaderCodeTypeEXT :: [(ShaderCodeTypeEXT, String)]
showTableShaderCodeTypeEXT =
[ (ShaderCodeTypeEXT
SHADER_CODE_TYPE_BINARY_EXT, String
"BINARY_EXT")
, (ShaderCodeTypeEXT
SHADER_CODE_TYPE_SPIRV_EXT, String
"SPIRV_EXT")
]
instance Show ShaderCodeTypeEXT where
showsPrec :: Int -> ShaderCodeTypeEXT -> ShowS
showsPrec =
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixShaderCodeTypeEXT
[(ShaderCodeTypeEXT, String)]
showTableShaderCodeTypeEXT
String
conNameShaderCodeTypeEXT
(\(ShaderCodeTypeEXT Int32
x) -> Int32
x)
(forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read ShaderCodeTypeEXT where
readPrec :: ReadPrec ShaderCodeTypeEXT
readPrec =
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixShaderCodeTypeEXT
[(ShaderCodeTypeEXT, String)]
showTableShaderCodeTypeEXT
String
conNameShaderCodeTypeEXT
Int32 -> ShaderCodeTypeEXT
ShaderCodeTypeEXT
type ShaderRequiredSubgroupSizeCreateInfoEXT = PipelineShaderStageRequiredSubgroupSizeCreateInfo
type EXT_SHADER_OBJECT_SPEC_VERSION = 1
pattern EXT_SHADER_OBJECT_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_SHADER_OBJECT_SPEC_VERSION :: forall a. Integral a => a
$mEXT_SHADER_OBJECT_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_SHADER_OBJECT_SPEC_VERSION = 1
type EXT_SHADER_OBJECT_EXTENSION_NAME = "VK_EXT_shader_object"
pattern EXT_SHADER_OBJECT_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_SHADER_OBJECT_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_SHADER_OBJECT_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_SHADER_OBJECT_EXTENSION_NAME = "VK_EXT_shader_object"