{-# language CPP #-} -- No documentation found for Chapter "Promoted_From_VK_EXT_extended_dynamic_state2" module Vulkan.Core13.Promoted_From_VK_EXT_extended_dynamic_state2 ( cmdSetRasterizerDiscardEnable , cmdSetDepthBiasEnable , cmdSetPrimitiveRestartEnable , DynamicState(..) ) where import Vulkan.Internal.Utils (traceAroundEvent) import Control.Monad (unless) import Control.Monad.IO.Class (liftIO) import GHC.IO (throwIO) import GHC.Ptr (nullFunPtr) import Control.Monad.IO.Class (MonadIO) import GHC.IO.Exception (IOErrorType(..)) import GHC.IO.Exception (IOException(..)) import Foreign.Ptr (FunPtr) import Foreign.Ptr (Ptr) 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(pVkCmdSetDepthBiasEnable)) import Vulkan.Dynamic (DeviceCmds(pVkCmdSetPrimitiveRestartEnable)) import Vulkan.Dynamic (DeviceCmds(pVkCmdSetRasterizerDiscardEnable)) import Vulkan.Core10.Enums.DynamicState (DynamicState(..)) foreign import ccall #if !defined(SAFE_FOREIGN_CALLS) unsafe #endif "dynamic" mkVkCmdSetRasterizerDiscardEnable :: FunPtr (Ptr CommandBuffer_T -> Bool32 -> IO ()) -> Ptr CommandBuffer_T -> Bool32 -> IO () -- | vkCmdSetRasterizerDiscardEnable - Control whether primitives are -- discarded before the rasterization stage dynamically for a command -- buffer -- -- = Description -- -- This command sets the discard enable for subsequent drawing commands -- when drawing using -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#shaders-objects shader objects>, -- or when the graphics pipeline is created with -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE' -- set in -- 'Vulkan.Core10.Pipeline.PipelineDynamicStateCreateInfo'::@pDynamicStates@. -- Otherwise, this state is specified by the -- 'Vulkan.Core10.Pipeline.PipelineRasterizationStateCreateInfo'::@rasterizerDiscardEnable@ -- value used to create the currently active pipeline. -- -- == Valid Usage -- -- - #VUID-vkCmdSetRasterizerDiscardEnable-None-08970# At least one of -- the following /must/ be true: -- -- - the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-extendedDynamicState2 extendedDynamicState2> -- feature is enabled -- -- - the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-shaderObject shaderObject> -- feature is enabled -- -- - the value of -- 'Vulkan.Core10.DeviceInitialization.ApplicationInfo'::@apiVersion@ -- used to create the 'Vulkan.Core10.Handles.Instance' parent of -- @commandBuffer@ is greater than or equal to Version 1.3 -- -- == Valid Usage (Implicit) -- -- - #VUID-vkCmdSetRasterizerDiscardEnable-commandBuffer-parameter# -- @commandBuffer@ /must/ be a valid -- 'Vulkan.Core10.Handles.CommandBuffer' handle -- -- - #VUID-vkCmdSetRasterizerDiscardEnable-commandBuffer-recording# -- @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - #VUID-vkCmdSetRasterizerDiscardEnable-commandBuffer-cmdpool# The -- 'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was -- allocated from /must/ support graphics operations -- -- - #VUID-vkCmdSetRasterizerDiscardEnable-videocoding# This command -- /must/ only be called outside of a video coding scope -- -- == Host Synchronization -- -- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Vulkan.Core10.Handles.CommandPool' that -- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties -- -- \' -- -- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginVideoCodingKHR Video Coding Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-queueoperation-command-types Command Type> | -- +============================================================================================================================+========================================================================================================================+=============================================================================================================================+=======================================================================================================================+========================================================================================================================================+ -- | Primary | Both | Outside | Graphics | State | -- | Secondary | | | | | -- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -- -- = See Also -- -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_extended_dynamic_state2 VK_EXT_extended_dynamic_state2>, -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_shader_object VK_EXT_shader_object>, -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_3 VK_VERSION_1_3>, -- 'Vulkan.Core10.FundamentalTypes.Bool32', -- 'Vulkan.Core10.Handles.CommandBuffer' cmdSetRasterizerDiscardEnable :: forall io . (MonadIO io) => -- | @commandBuffer@ is the command buffer into which the command will be -- recorded. CommandBuffer -> -- | @rasterizerDiscardEnable@ controls whether primitives are discarded -- immediately before the rasterization stage. ("rasterizerDiscardEnable" ::: Bool) -> io () cmdSetRasterizerDiscardEnable :: forall (io :: * -> *). MonadIO io => CommandBuffer -> ("rasterizerDiscardEnable" ::: Bool) -> io () cmdSetRasterizerDiscardEnable CommandBuffer commandBuffer "rasterizerDiscardEnable" ::: Bool rasterizerDiscardEnable = forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO forall a b. (a -> b) -> a -> b $ do let vkCmdSetRasterizerDiscardEnablePtr :: FunPtr (Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()) vkCmdSetRasterizerDiscardEnablePtr = DeviceCmds -> FunPtr (Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()) pVkCmdSetRasterizerDiscardEnable (case CommandBuffer commandBuffer of CommandBuffer{DeviceCmds $sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds deviceCmds :: DeviceCmds deviceCmds} -> DeviceCmds deviceCmds) forall (f :: * -> *). Applicative f => ("rasterizerDiscardEnable" ::: Bool) -> f () -> f () unless (FunPtr (Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()) vkCmdSetRasterizerDiscardEnablePtr forall a. Eq a => a -> a -> "rasterizerDiscardEnable" ::: 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 vkCmdSetRasterizerDiscardEnable is null" forall a. Maybe a Nothing forall a. Maybe a Nothing let vkCmdSetRasterizerDiscardEnable' :: Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO () vkCmdSetRasterizerDiscardEnable' = FunPtr (Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()) -> Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO () mkVkCmdSetRasterizerDiscardEnable FunPtr (Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()) vkCmdSetRasterizerDiscardEnablePtr forall a. String -> IO a -> IO a traceAroundEvent String "vkCmdSetRasterizerDiscardEnable" (Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO () vkCmdSetRasterizerDiscardEnable' (CommandBuffer -> Ptr CommandBuffer_T commandBufferHandle (CommandBuffer commandBuffer)) (("rasterizerDiscardEnable" ::: Bool) -> "rasterizerDiscardEnable" ::: Bool32 boolToBool32 ("rasterizerDiscardEnable" ::: Bool rasterizerDiscardEnable))) 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" mkVkCmdSetDepthBiasEnable :: FunPtr (Ptr CommandBuffer_T -> Bool32 -> IO ()) -> Ptr CommandBuffer_T -> Bool32 -> IO () -- | vkCmdSetDepthBiasEnable - Control whether to bias fragment depth values -- dynamically for a command buffer -- -- = Description -- -- This command sets the depth bias enable for subsequent drawing commands -- when drawing using -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#shaders-objects shader objects>, -- or when the graphics pipeline is created with -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_BIAS_ENABLE' set -- in -- 'Vulkan.Core10.Pipeline.PipelineDynamicStateCreateInfo'::@pDynamicStates@. -- Otherwise, this state is specified by the -- 'Vulkan.Core10.Pipeline.PipelineRasterizationStateCreateInfo'::@depthBiasEnable@ -- value used to create the currently active pipeline. -- -- == Valid Usage -- -- - #VUID-vkCmdSetDepthBiasEnable-None-08970# At least one of the -- following /must/ be true: -- -- - the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-extendedDynamicState2 extendedDynamicState2> -- feature is enabled -- -- - the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-shaderObject shaderObject> -- feature is enabled -- -- - the value of -- 'Vulkan.Core10.DeviceInitialization.ApplicationInfo'::@apiVersion@ -- used to create the 'Vulkan.Core10.Handles.Instance' parent of -- @commandBuffer@ is greater than or equal to Version 1.3 -- -- == Valid Usage (Implicit) -- -- - #VUID-vkCmdSetDepthBiasEnable-commandBuffer-parameter# -- @commandBuffer@ /must/ be a valid -- 'Vulkan.Core10.Handles.CommandBuffer' handle -- -- - #VUID-vkCmdSetDepthBiasEnable-commandBuffer-recording# -- @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - #VUID-vkCmdSetDepthBiasEnable-commandBuffer-cmdpool# The -- 'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was -- allocated from /must/ support graphics operations -- -- - #VUID-vkCmdSetDepthBiasEnable-videocoding# This command /must/ only -- be called outside of a video coding scope -- -- == Host Synchronization -- -- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Vulkan.Core10.Handles.CommandPool' that -- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties -- -- \' -- -- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginVideoCodingKHR Video Coding Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-queueoperation-command-types Command Type> | -- +============================================================================================================================+========================================================================================================================+=============================================================================================================================+=======================================================================================================================+========================================================================================================================================+ -- | Primary | Both | Outside | Graphics | State | -- | Secondary | | | | | -- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -- -- = See Also -- -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_extended_dynamic_state2 VK_EXT_extended_dynamic_state2>, -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_shader_object VK_EXT_shader_object>, -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_3 VK_VERSION_1_3>, -- 'Vulkan.Core10.FundamentalTypes.Bool32', -- 'Vulkan.Core10.Handles.CommandBuffer' cmdSetDepthBiasEnable :: forall io . (MonadIO io) => -- | @commandBuffer@ is the command buffer into which the command will be -- recorded. CommandBuffer -> -- | @depthBiasEnable@ controls whether to bias fragment depth values. ("depthBiasEnable" ::: Bool) -> io () cmdSetDepthBiasEnable :: forall (io :: * -> *). MonadIO io => CommandBuffer -> ("rasterizerDiscardEnable" ::: Bool) -> io () cmdSetDepthBiasEnable CommandBuffer commandBuffer "rasterizerDiscardEnable" ::: Bool depthBiasEnable = forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO forall a b. (a -> b) -> a -> b $ do let vkCmdSetDepthBiasEnablePtr :: FunPtr (Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()) vkCmdSetDepthBiasEnablePtr = DeviceCmds -> FunPtr (Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()) pVkCmdSetDepthBiasEnable (case CommandBuffer commandBuffer of CommandBuffer{DeviceCmds deviceCmds :: DeviceCmds $sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds deviceCmds} -> DeviceCmds deviceCmds) forall (f :: * -> *). Applicative f => ("rasterizerDiscardEnable" ::: Bool) -> f () -> f () unless (FunPtr (Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()) vkCmdSetDepthBiasEnablePtr forall a. Eq a => a -> a -> "rasterizerDiscardEnable" ::: 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 vkCmdSetDepthBiasEnable is null" forall a. Maybe a Nothing forall a. Maybe a Nothing let vkCmdSetDepthBiasEnable' :: Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO () vkCmdSetDepthBiasEnable' = FunPtr (Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()) -> Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO () mkVkCmdSetDepthBiasEnable FunPtr (Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()) vkCmdSetDepthBiasEnablePtr forall a. String -> IO a -> IO a traceAroundEvent String "vkCmdSetDepthBiasEnable" (Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO () vkCmdSetDepthBiasEnable' (CommandBuffer -> Ptr CommandBuffer_T commandBufferHandle (CommandBuffer commandBuffer)) (("rasterizerDiscardEnable" ::: Bool) -> "rasterizerDiscardEnable" ::: Bool32 boolToBool32 ("rasterizerDiscardEnable" ::: Bool depthBiasEnable))) 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" mkVkCmdSetPrimitiveRestartEnable :: FunPtr (Ptr CommandBuffer_T -> Bool32 -> IO ()) -> Ptr CommandBuffer_T -> Bool32 -> IO () -- | vkCmdSetPrimitiveRestartEnable - Set primitive assembly restart state -- dynamically for a command buffer -- -- = Description -- -- This command sets the primitive restart enable for subsequent drawing -- commands when drawing using -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#shaders-objects shader objects>, -- or when the graphics pipeline is created with -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE' -- set in -- 'Vulkan.Core10.Pipeline.PipelineDynamicStateCreateInfo'::@pDynamicStates@. -- Otherwise, this state is specified by the -- 'Vulkan.Core10.Pipeline.PipelineInputAssemblyStateCreateInfo'::@primitiveRestartEnable@ -- value used to create the currently active pipeline. -- -- == Valid Usage -- -- - #VUID-vkCmdSetPrimitiveRestartEnable-None-08970# At least one of the -- following /must/ be true: -- -- - the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-extendedDynamicState2 extendedDynamicState2> -- feature is enabled -- -- - the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-shaderObject shaderObject> -- feature is enabled -- -- - the value of -- 'Vulkan.Core10.DeviceInitialization.ApplicationInfo'::@apiVersion@ -- used to create the 'Vulkan.Core10.Handles.Instance' parent of -- @commandBuffer@ is greater than or equal to Version 1.3 -- -- == Valid Usage (Implicit) -- -- - #VUID-vkCmdSetPrimitiveRestartEnable-commandBuffer-parameter# -- @commandBuffer@ /must/ be a valid -- 'Vulkan.Core10.Handles.CommandBuffer' handle -- -- - #VUID-vkCmdSetPrimitiveRestartEnable-commandBuffer-recording# -- @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - #VUID-vkCmdSetPrimitiveRestartEnable-commandBuffer-cmdpool# The -- 'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was -- allocated from /must/ support graphics operations -- -- - #VUID-vkCmdSetPrimitiveRestartEnable-videocoding# This command -- /must/ only be called outside of a video coding scope -- -- == Host Synchronization -- -- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Vulkan.Core10.Handles.CommandPool' that -- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties -- -- \' -- -- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginVideoCodingKHR Video Coding Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-queueoperation-command-types Command Type> | -- +============================================================================================================================+========================================================================================================================+=============================================================================================================================+=======================================================================================================================+========================================================================================================================================+ -- | Primary | Both | Outside | Graphics | State | -- | Secondary | | | | | -- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -- -- = See Also -- -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_extended_dynamic_state2 VK_EXT_extended_dynamic_state2>, -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_shader_object VK_EXT_shader_object>, -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_3 VK_VERSION_1_3>, -- 'Vulkan.Core10.FundamentalTypes.Bool32', -- 'Vulkan.Core10.Handles.CommandBuffer' cmdSetPrimitiveRestartEnable :: forall io . (MonadIO io) => -- | @commandBuffer@ is the command buffer into which the command will be -- recorded. CommandBuffer -> -- | @primitiveRestartEnable@ controls whether a special vertex index value -- is treated as restarting the assembly of primitives. It behaves in the -- same way as -- 'Vulkan.Core10.Pipeline.PipelineInputAssemblyStateCreateInfo'::@primitiveRestartEnable@ ("primitiveRestartEnable" ::: Bool) -> io () cmdSetPrimitiveRestartEnable :: forall (io :: * -> *). MonadIO io => CommandBuffer -> ("rasterizerDiscardEnable" ::: Bool) -> io () cmdSetPrimitiveRestartEnable CommandBuffer commandBuffer "rasterizerDiscardEnable" ::: Bool primitiveRestartEnable = forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO forall a b. (a -> b) -> a -> b $ do let vkCmdSetPrimitiveRestartEnablePtr :: FunPtr (Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()) vkCmdSetPrimitiveRestartEnablePtr = DeviceCmds -> FunPtr (Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()) pVkCmdSetPrimitiveRestartEnable (case CommandBuffer commandBuffer of CommandBuffer{DeviceCmds deviceCmds :: DeviceCmds $sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds deviceCmds} -> DeviceCmds deviceCmds) forall (f :: * -> *). Applicative f => ("rasterizerDiscardEnable" ::: Bool) -> f () -> f () unless (FunPtr (Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()) vkCmdSetPrimitiveRestartEnablePtr forall a. Eq a => a -> a -> "rasterizerDiscardEnable" ::: 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 vkCmdSetPrimitiveRestartEnable is null" forall a. Maybe a Nothing forall a. Maybe a Nothing let vkCmdSetPrimitiveRestartEnable' :: Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO () vkCmdSetPrimitiveRestartEnable' = FunPtr (Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()) -> Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO () mkVkCmdSetPrimitiveRestartEnable FunPtr (Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO ()) vkCmdSetPrimitiveRestartEnablePtr forall a. String -> IO a -> IO a traceAroundEvent String "vkCmdSetPrimitiveRestartEnable" (Ptr CommandBuffer_T -> ("rasterizerDiscardEnable" ::: Bool32) -> IO () vkCmdSetPrimitiveRestartEnable' (CommandBuffer -> Ptr CommandBuffer_T commandBufferHandle (CommandBuffer commandBuffer)) (("rasterizerDiscardEnable" ::: Bool) -> "rasterizerDiscardEnable" ::: Bool32 boolToBool32 ("rasterizerDiscardEnable" ::: Bool primitiveRestartEnable))) forall (f :: * -> *) a. Applicative f => a -> f a pure forall a b. (a -> b) -> a -> b $ ()