{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_extended_dynamic_state2 ( cmdSetPatchControlPointsEXT
, cmdSetRasterizerDiscardEnableEXT
, cmdSetDepthBiasEnableEXT
, cmdSetLogicOpEXT
, cmdSetPrimitiveRestartEnableEXT
, PhysicalDeviceExtendedDynamicState2FeaturesEXT(..)
, EXT_EXTENDED_DYNAMIC_STATE_2_SPEC_VERSION
, pattern EXT_EXTENDED_DYNAMIC_STATE_2_SPEC_VERSION
, EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME
, pattern EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME
) where
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytes)
import GHC.IO (throwIO)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import Data.Typeable (Typeable)
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 Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import Data.Word (Word32)
import Data.Kind (Type)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.FundamentalTypes (Bool32(..))
import Vulkan.Core10.Handles (CommandBuffer)
import Vulkan.Core10.Handles (CommandBuffer(..))
import Vulkan.Core10.Handles (CommandBuffer(CommandBuffer))
import Vulkan.Core10.Handles (CommandBuffer_T)
import Vulkan.Dynamic (DeviceCmds(pVkCmdSetDepthBiasEnableEXT))
import Vulkan.Dynamic (DeviceCmds(pVkCmdSetLogicOpEXT))
import Vulkan.Dynamic (DeviceCmds(pVkCmdSetPatchControlPointsEXT))
import Vulkan.Dynamic (DeviceCmds(pVkCmdSetPrimitiveRestartEnableEXT))
import Vulkan.Dynamic (DeviceCmds(pVkCmdSetRasterizerDiscardEnableEXT))
import Vulkan.Core10.Enums.LogicOp (LogicOp)
import Vulkan.Core10.Enums.LogicOp (LogicOp(..))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdSetPatchControlPointsEXT
:: FunPtr (Ptr CommandBuffer_T -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> IO ()
cmdSetPatchControlPointsEXT :: forall io
. (MonadIO io)
=>
CommandBuffer
->
("patchControlPoints" ::: Word32)
-> io ()
cmdSetPatchControlPointsEXT :: CommandBuffer -> ("patchControlPoints" ::: Word32) -> io ()
cmdSetPatchControlPointsEXT CommandBuffer
commandBuffer "patchControlPoints" ::: Word32
patchControlPoints = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ()) -> IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkCmdSetPatchControlPointsEXTPtr :: FunPtr
(Ptr CommandBuffer_T -> ("patchControlPoints" ::: Word32) -> IO ())
vkCmdSetPatchControlPointsEXTPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T -> ("patchControlPoints" ::: Word32) -> IO ())
pVkCmdSetPatchControlPointsEXT (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T -> ("patchControlPoints" ::: Word32) -> IO ())
vkCmdSetPatchControlPointsEXTPtr FunPtr
(Ptr CommandBuffer_T -> ("patchControlPoints" ::: Word32) -> IO ())
-> FunPtr
(Ptr CommandBuffer_T -> ("patchControlPoints" ::: Word32) -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T -> ("patchControlPoints" ::: Word32) -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdSetPatchControlPointsEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdSetPatchControlPointsEXT' :: Ptr CommandBuffer_T -> ("patchControlPoints" ::: Word32) -> IO ()
vkCmdSetPatchControlPointsEXT' = FunPtr
(Ptr CommandBuffer_T -> ("patchControlPoints" ::: Word32) -> IO ())
-> Ptr CommandBuffer_T
-> ("patchControlPoints" ::: Word32)
-> IO ()
mkVkCmdSetPatchControlPointsEXT FunPtr
(Ptr CommandBuffer_T -> ("patchControlPoints" ::: Word32) -> IO ())
vkCmdSetPatchControlPointsEXTPtr
String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdSetPatchControlPointsEXT" (Ptr CommandBuffer_T -> ("patchControlPoints" ::: Word32) -> IO ()
vkCmdSetPatchControlPointsEXT' (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer)) ("patchControlPoints" ::: Word32
patchControlPoints))
() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> IO ()) -> () -> IO ()
forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdSetRasterizerDiscardEnableEXT
:: FunPtr (Ptr CommandBuffer_T -> Bool32 -> IO ()) -> Ptr CommandBuffer_T -> Bool32 -> IO ()
cmdSetRasterizerDiscardEnableEXT :: forall io
. (MonadIO io)
=>
CommandBuffer
->
("rasterizerDiscardEnable" ::: Bool)
-> io ()
cmdSetRasterizerDiscardEnableEXT :: CommandBuffer -> Bool -> io ()
cmdSetRasterizerDiscardEnableEXT CommandBuffer
commandBuffer Bool
rasterizerDiscardEnable = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ()) -> IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkCmdSetRasterizerDiscardEnableEXTPtr :: FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
vkCmdSetRasterizerDiscardEnableEXTPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
pVkCmdSetRasterizerDiscardEnableEXT (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
vkCmdSetRasterizerDiscardEnableEXTPtr FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdSetRasterizerDiscardEnableEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdSetRasterizerDiscardEnableEXT' :: Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()
vkCmdSetRasterizerDiscardEnableEXT' = FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
-> Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32)
-> IO ()
mkVkCmdSetRasterizerDiscardEnableEXT FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
vkCmdSetRasterizerDiscardEnableEXTPtr
String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdSetRasterizerDiscardEnableEXT" (Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()
vkCmdSetRasterizerDiscardEnableEXT' (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer)) (Bool -> "rasterizerDiscardEnable" ::: Bool32
boolToBool32 (Bool
rasterizerDiscardEnable)))
() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> IO ()) -> () -> IO ()
forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdSetDepthBiasEnableEXT
:: FunPtr (Ptr CommandBuffer_T -> Bool32 -> IO ()) -> Ptr CommandBuffer_T -> Bool32 -> IO ()
cmdSetDepthBiasEnableEXT :: forall io
. (MonadIO io)
=>
CommandBuffer
->
("depthBiasEnable" ::: Bool)
-> io ()
cmdSetDepthBiasEnableEXT :: CommandBuffer -> Bool -> io ()
cmdSetDepthBiasEnableEXT CommandBuffer
commandBuffer Bool
depthBiasEnable = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ()) -> IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkCmdSetDepthBiasEnableEXTPtr :: FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
vkCmdSetDepthBiasEnableEXTPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
pVkCmdSetDepthBiasEnableEXT (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
vkCmdSetDepthBiasEnableEXTPtr FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdSetDepthBiasEnableEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdSetDepthBiasEnableEXT' :: Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()
vkCmdSetDepthBiasEnableEXT' = FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
-> Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32)
-> IO ()
mkVkCmdSetDepthBiasEnableEXT FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
vkCmdSetDepthBiasEnableEXTPtr
String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdSetDepthBiasEnableEXT" (Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()
vkCmdSetDepthBiasEnableEXT' (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer)) (Bool -> "rasterizerDiscardEnable" ::: Bool32
boolToBool32 (Bool
depthBiasEnable)))
() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> IO ()) -> () -> IO ()
forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdSetLogicOpEXT
:: FunPtr (Ptr CommandBuffer_T -> LogicOp -> IO ()) -> Ptr CommandBuffer_T -> LogicOp -> IO ()
cmdSetLogicOpEXT :: forall io
. (MonadIO io)
=>
CommandBuffer
->
LogicOp
-> io ()
cmdSetLogicOpEXT :: CommandBuffer -> LogicOp -> io ()
cmdSetLogicOpEXT CommandBuffer
commandBuffer LogicOp
logicOp = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ()) -> IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkCmdSetLogicOpEXTPtr :: FunPtr (Ptr CommandBuffer_T -> LogicOp -> IO ())
vkCmdSetLogicOpEXTPtr = DeviceCmds -> FunPtr (Ptr CommandBuffer_T -> LogicOp -> IO ())
pVkCmdSetLogicOpEXT (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr (Ptr CommandBuffer_T -> LogicOp -> IO ())
vkCmdSetLogicOpEXTPtr FunPtr (Ptr CommandBuffer_T -> LogicOp -> IO ())
-> FunPtr (Ptr CommandBuffer_T -> LogicOp -> IO ()) -> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr (Ptr CommandBuffer_T -> LogicOp -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdSetLogicOpEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdSetLogicOpEXT' :: Ptr CommandBuffer_T -> LogicOp -> IO ()
vkCmdSetLogicOpEXT' = FunPtr (Ptr CommandBuffer_T -> LogicOp -> IO ())
-> Ptr CommandBuffer_T -> LogicOp -> IO ()
mkVkCmdSetLogicOpEXT FunPtr (Ptr CommandBuffer_T -> LogicOp -> IO ())
vkCmdSetLogicOpEXTPtr
String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdSetLogicOpEXT" (Ptr CommandBuffer_T -> LogicOp -> IO ()
vkCmdSetLogicOpEXT' (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer)) (LogicOp
logicOp))
() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> IO ()) -> () -> IO ()
forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdSetPrimitiveRestartEnableEXT
:: FunPtr (Ptr CommandBuffer_T -> Bool32 -> IO ()) -> Ptr CommandBuffer_T -> Bool32 -> IO ()
cmdSetPrimitiveRestartEnableEXT :: forall io
. (MonadIO io)
=>
CommandBuffer
->
("primitiveRestartEnable" ::: Bool)
-> io ()
cmdSetPrimitiveRestartEnableEXT :: CommandBuffer -> Bool -> io ()
cmdSetPrimitiveRestartEnableEXT CommandBuffer
commandBuffer Bool
primitiveRestartEnable = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ()) -> IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkCmdSetPrimitiveRestartEnableEXTPtr :: FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
vkCmdSetPrimitiveRestartEnableEXTPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
pVkCmdSetPrimitiveRestartEnableEXT (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
vkCmdSetPrimitiveRestartEnableEXTPtr FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdSetPrimitiveRestartEnableEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdSetPrimitiveRestartEnableEXT' :: Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()
vkCmdSetPrimitiveRestartEnableEXT' = FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
-> Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32)
-> IO ()
mkVkCmdSetPrimitiveRestartEnableEXT FunPtr
(Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ())
vkCmdSetPrimitiveRestartEnableEXTPtr
String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdSetPrimitiveRestartEnableEXT" (Ptr CommandBuffer_T
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()
vkCmdSetPrimitiveRestartEnableEXT' (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer)) (Bool -> "rasterizerDiscardEnable" ::: Bool32
boolToBool32 (Bool
primitiveRestartEnable)))
() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> IO ()) -> () -> IO ()
forall a b. (a -> b) -> a -> b
$ ()
data PhysicalDeviceExtendedDynamicState2FeaturesEXT = PhysicalDeviceExtendedDynamicState2FeaturesEXT
{
PhysicalDeviceExtendedDynamicState2FeaturesEXT -> Bool
extendedDynamicState2 :: Bool
,
PhysicalDeviceExtendedDynamicState2FeaturesEXT -> Bool
extendedDynamicState2LogicOp :: Bool
,
PhysicalDeviceExtendedDynamicState2FeaturesEXT -> Bool
extendedDynamicState2PatchControlPoints :: Bool
}
deriving (Typeable, PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> PhysicalDeviceExtendedDynamicState2FeaturesEXT -> Bool
(PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> PhysicalDeviceExtendedDynamicState2FeaturesEXT -> Bool)
-> (PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> PhysicalDeviceExtendedDynamicState2FeaturesEXT -> Bool)
-> Eq PhysicalDeviceExtendedDynamicState2FeaturesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> PhysicalDeviceExtendedDynamicState2FeaturesEXT -> Bool
$c/= :: PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> PhysicalDeviceExtendedDynamicState2FeaturesEXT -> Bool
== :: PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> PhysicalDeviceExtendedDynamicState2FeaturesEXT -> Bool
$c== :: PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> PhysicalDeviceExtendedDynamicState2FeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceExtendedDynamicState2FeaturesEXT)
#endif
deriving instance Show PhysicalDeviceExtendedDynamicState2FeaturesEXT
instance ToCStruct PhysicalDeviceExtendedDynamicState2FeaturesEXT where
withCStruct :: PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> (Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT -> IO b)
-> IO b
withCStruct PhysicalDeviceExtendedDynamicState2FeaturesEXT
x Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT -> IO b
f = Int
-> (Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT -> IO b)
-> IO b)
-> (Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
p -> Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> PhysicalDeviceExtendedDynamicState2FeaturesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
p PhysicalDeviceExtendedDynamicState2FeaturesEXT
x (Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT -> IO b
f Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
p)
pokeCStruct :: Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> PhysicalDeviceExtendedDynamicState2FeaturesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
p PhysicalDeviceExtendedDynamicState2FeaturesEXT{Bool
extendedDynamicState2PatchControlPoints :: Bool
extendedDynamicState2LogicOp :: Bool
extendedDynamicState2 :: Bool
$sel:extendedDynamicState2PatchControlPoints:PhysicalDeviceExtendedDynamicState2FeaturesEXT :: PhysicalDeviceExtendedDynamicState2FeaturesEXT -> Bool
$sel:extendedDynamicState2LogicOp:PhysicalDeviceExtendedDynamicState2FeaturesEXT :: PhysicalDeviceExtendedDynamicState2FeaturesEXT -> Bool
$sel:extendedDynamicState2:PhysicalDeviceExtendedDynamicState2FeaturesEXT :: PhysicalDeviceExtendedDynamicState2FeaturesEXT -> Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
p Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
p Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("rasterizerDiscardEnable" ::: Bool32)
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
p Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> Int -> Ptr ("rasterizerDiscardEnable" ::: Bool32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> "rasterizerDiscardEnable" ::: Bool32
boolToBool32 (Bool
extendedDynamicState2))
Ptr ("rasterizerDiscardEnable" ::: Bool32)
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
p Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> Int -> Ptr ("rasterizerDiscardEnable" ::: Bool32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> "rasterizerDiscardEnable" ::: Bool32
boolToBool32 (Bool
extendedDynamicState2LogicOp))
Ptr ("rasterizerDiscardEnable" ::: Bool32)
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
p Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> Int -> Ptr ("rasterizerDiscardEnable" ::: Bool32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> "rasterizerDiscardEnable" ::: Bool32
boolToBool32 (Bool
extendedDynamicState2PatchControlPoints))
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
p Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
p Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("rasterizerDiscardEnable" ::: Bool32)
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
p Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> Int -> Ptr ("rasterizerDiscardEnable" ::: Bool32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> "rasterizerDiscardEnable" ::: Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr ("rasterizerDiscardEnable" ::: Bool32)
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
p Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> Int -> Ptr ("rasterizerDiscardEnable" ::: Bool32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> "rasterizerDiscardEnable" ::: Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr ("rasterizerDiscardEnable" ::: Bool32)
-> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
p Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> Int -> Ptr ("rasterizerDiscardEnable" ::: Bool32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> "rasterizerDiscardEnable" ::: Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceExtendedDynamicState2FeaturesEXT where
peekCStruct :: Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> IO PhysicalDeviceExtendedDynamicState2FeaturesEXT
peekCStruct Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
p = do
"rasterizerDiscardEnable" ::: Bool32
extendedDynamicState2 <- Ptr ("rasterizerDiscardEnable" ::: Bool32)
-> IO ("rasterizerDiscardEnable" ::: Bool32)
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
p Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> Int -> Ptr ("rasterizerDiscardEnable" ::: Bool32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
"rasterizerDiscardEnable" ::: Bool32
extendedDynamicState2LogicOp <- Ptr ("rasterizerDiscardEnable" ::: Bool32)
-> IO ("rasterizerDiscardEnable" ::: Bool32)
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
p Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> Int -> Ptr ("rasterizerDiscardEnable" ::: Bool32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
"rasterizerDiscardEnable" ::: Bool32
extendedDynamicState2PatchControlPoints <- Ptr ("rasterizerDiscardEnable" ::: Bool32)
-> IO ("rasterizerDiscardEnable" ::: Bool32)
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
p Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> Int -> Ptr ("rasterizerDiscardEnable" ::: Bool32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32))
PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> IO PhysicalDeviceExtendedDynamicState2FeaturesEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> IO PhysicalDeviceExtendedDynamicState2FeaturesEXT)
-> PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> IO PhysicalDeviceExtendedDynamicState2FeaturesEXT
forall a b. (a -> b) -> a -> b
$ Bool
-> Bool -> Bool -> PhysicalDeviceExtendedDynamicState2FeaturesEXT
PhysicalDeviceExtendedDynamicState2FeaturesEXT
(("rasterizerDiscardEnable" ::: Bool32) -> Bool
bool32ToBool "rasterizerDiscardEnable" ::: Bool32
extendedDynamicState2) (("rasterizerDiscardEnable" ::: Bool32) -> Bool
bool32ToBool "rasterizerDiscardEnable" ::: Bool32
extendedDynamicState2LogicOp) (("rasterizerDiscardEnable" ::: Bool32) -> Bool
bool32ToBool "rasterizerDiscardEnable" ::: Bool32
extendedDynamicState2PatchControlPoints)
instance Storable PhysicalDeviceExtendedDynamicState2FeaturesEXT where
sizeOf :: PhysicalDeviceExtendedDynamicState2FeaturesEXT -> Int
sizeOf ~PhysicalDeviceExtendedDynamicState2FeaturesEXT
_ = Int
32
alignment :: PhysicalDeviceExtendedDynamicState2FeaturesEXT -> Int
alignment ~PhysicalDeviceExtendedDynamicState2FeaturesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> IO PhysicalDeviceExtendedDynamicState2FeaturesEXT
peek = Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> IO PhysicalDeviceExtendedDynamicState2FeaturesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> PhysicalDeviceExtendedDynamicState2FeaturesEXT -> IO ()
poke Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
poked = Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
-> PhysicalDeviceExtendedDynamicState2FeaturesEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
ptr PhysicalDeviceExtendedDynamicState2FeaturesEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceExtendedDynamicState2FeaturesEXT where
zero :: PhysicalDeviceExtendedDynamicState2FeaturesEXT
zero = Bool
-> Bool -> Bool -> PhysicalDeviceExtendedDynamicState2FeaturesEXT
PhysicalDeviceExtendedDynamicState2FeaturesEXT
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
type EXT_EXTENDED_DYNAMIC_STATE_2_SPEC_VERSION = 1
pattern EXT_EXTENDED_DYNAMIC_STATE_2_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_EXTENDED_DYNAMIC_STATE_2_SPEC_VERSION :: a
$mEXT_EXTENDED_DYNAMIC_STATE_2_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
EXT_EXTENDED_DYNAMIC_STATE_2_SPEC_VERSION = 1
type EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME = "VK_EXT_extended_dynamic_state2"
pattern EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME :: a
$mEXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME = "VK_EXT_extended_dynamic_state2"