{-# language CPP #-}
-- | = Name
--
-- VK_EXT_conditional_rendering - device extension
--
-- == VK_EXT_conditional_rendering
--
-- [__Name String__]
--     @VK_EXT_conditional_rendering@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     82
--
-- [__Revision__]
--     2
--
-- [__Ratification Status__]
--     Not ratified
--
-- [__Extension and Version Dependencies__]
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_get_physical_device_properties2 VK_KHR_get_physical_device_properties2>
--
-- [__Contact__]
--
--     -   Vikram Kushwaha
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_EXT_conditional_rendering] @vkushwaha%0A*Here describe the issue or question you have about the VK_EXT_conditional_rendering extension* >
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2018-05-21
--
-- [__IP Status__]
--     No known IP claims.
--
-- [__Contributors__]
--
--     -   Vikram Kushwaha, NVIDIA
--
--     -   Daniel Rakos, AMD
--
--     -   Jesse Hall, Google
--
--     -   Jeff Bolz, NVIDIA
--
--     -   Piers Daniell, NVIDIA
--
--     -   Stuart Smith, Imagination Technologies
--
-- == Description
--
-- This extension allows the execution of one or more rendering commands to
-- be conditional on a value in buffer memory. This may help an application
-- reduce the latency by conditionally discarding rendering commands
-- without application intervention. The conditional rendering commands are
-- limited to draws, compute dispatches and clearing attachments within a
-- conditional rendering block.
--
-- == New Commands
--
-- -   'cmdBeginConditionalRenderingEXT'
--
-- -   'cmdEndConditionalRenderingEXT'
--
-- == New Structures
--
-- -   'ConditionalRenderingBeginInfoEXT'
--
-- -   Extending
--     'Vulkan.Core10.CommandBuffer.CommandBufferInheritanceInfo':
--
--     -   'CommandBufferInheritanceConditionalRenderingInfoEXT'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
--     'Vulkan.Core10.Device.DeviceCreateInfo':
--
--     -   'PhysicalDeviceConditionalRenderingFeaturesEXT'
--
-- == New Enums
--
-- -   'ConditionalRenderingFlagBitsEXT'
--
-- == New Bitmasks
--
-- -   'ConditionalRenderingFlagsEXT'
--
-- == New Enum Constants
--
-- -   'EXT_CONDITIONAL_RENDERING_EXTENSION_NAME'
--
-- -   'EXT_CONDITIONAL_RENDERING_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.AccessFlagBits.AccessFlagBits':
--
--     -   'Vulkan.Core10.Enums.AccessFlagBits.ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT'
--
-- -   Extending
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BufferUsageFlagBits':
--
--     -   'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT'
--
-- -   Extending
--     'Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits':
--
--     -   'Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT'
--
-- == Issues
--
-- 1) Should conditional rendering affect copy and blit commands?
--
-- __RESOLVED__: Conditional rendering should not affect copies and blits.
--
-- 2) Should secondary command buffers be allowed to execute while
-- conditional rendering is active in the primary command buffer?
--
-- __RESOLVED__: The rendering commands in secondary command buffer will be
-- affected by an active conditional rendering in primary command buffer if
-- the @conditionalRenderingEnable@ is set to
-- 'Vulkan.Core10.FundamentalTypes.TRUE'. Conditional rendering /must/ not
-- be active in the primary command buffer if @conditionalRenderingEnable@
-- is 'Vulkan.Core10.FundamentalTypes.FALSE'.
--
-- == Examples
--
-- None.
--
-- == Version History
--
-- -   Revision 1, 2018-04-19 (Vikram Kushwaha)
--
--     -   First Version
--
-- -   Revision 2, 2018-05-21 (Vikram Kushwaha)
--
--     -   Add new pipeline stage, access flags and limit conditional
--         rendering to a subpass or entire render pass.
--
-- == See Also
--
-- 'CommandBufferInheritanceConditionalRenderingInfoEXT',
-- 'ConditionalRenderingBeginInfoEXT', 'ConditionalRenderingFlagBitsEXT',
-- 'ConditionalRenderingFlagsEXT',
-- 'PhysicalDeviceConditionalRenderingFeaturesEXT',
-- 'cmdBeginConditionalRenderingEXT', 'cmdEndConditionalRenderingEXT'
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VK_EXT_conditional_rendering Vulkan Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_EXT_conditional_rendering  ( cmdBeginConditionalRenderingEXT
                                                       , cmdUseConditionalRenderingEXT
                                                       , cmdEndConditionalRenderingEXT
                                                       , ConditionalRenderingBeginInfoEXT(..)
                                                       , CommandBufferInheritanceConditionalRenderingInfoEXT(..)
                                                       , PhysicalDeviceConditionalRenderingFeaturesEXT(..)
                                                       , ConditionalRenderingFlagsEXT
                                                       , ConditionalRenderingFlagBitsEXT( CONDITIONAL_RENDERING_INVERTED_BIT_EXT
                                                                                        , ..
                                                                                        )
                                                       , EXT_CONDITIONAL_RENDERING_SPEC_VERSION
                                                       , pattern EXT_CONDITIONAL_RENDERING_SPEC_VERSION
                                                       , EXT_CONDITIONAL_RENDERING_EXTENSION_NAME
                                                       , pattern EXT_CONDITIONAL_RENDERING_EXTENSION_NAME
                                                       ) where

import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
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 GHC.Show (showString)
import Numeric (showHex)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
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.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 GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.Handles (Buffer)
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(pVkCmdBeginConditionalRenderingEXT))
import Vulkan.Dynamic (DeviceCmds(pVkCmdEndConditionalRenderingEXT))
import Vulkan.Core10.FundamentalTypes (DeviceSize)
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCmdBeginConditionalRenderingEXT
  :: FunPtr (Ptr CommandBuffer_T -> Ptr ConditionalRenderingBeginInfoEXT -> IO ()) -> Ptr CommandBuffer_T -> Ptr ConditionalRenderingBeginInfoEXT -> IO ()

-- | vkCmdBeginConditionalRenderingEXT - Define the beginning of a
-- conditional rendering block
--
-- == Valid Usage
--
-- -   #VUID-vkCmdBeginConditionalRenderingEXT-None-01980# Conditional
--     rendering /must/ not already be
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#active-conditional-rendering active>
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCmdBeginConditionalRenderingEXT-commandBuffer-parameter#
--     @commandBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.CommandBuffer' handle
--
-- -   #VUID-vkCmdBeginConditionalRenderingEXT-pConditionalRenderingBegin-parameter#
--     @pConditionalRenderingBegin@ /must/ be a valid pointer to a valid
--     'ConditionalRenderingBeginInfoEXT' structure
--
-- -   #VUID-vkCmdBeginConditionalRenderingEXT-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-vkCmdBeginConditionalRenderingEXT-commandBuffer-cmdpool# The
--     'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was
--     allocated from /must/ support graphics, or compute operations
--
-- -   #VUID-vkCmdBeginConditionalRenderingEXT-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                                                                                                              | Action                                                                                                                                 |
-- | Secondary                                                                                                                  |                                                                                                                        |                                                                                                                             | Compute                                                                                                               | State                                                                                                                                  |
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_conditional_rendering VK_EXT_conditional_rendering>,
-- 'Vulkan.Core10.Handles.CommandBuffer',
-- 'ConditionalRenderingBeginInfoEXT'
cmdBeginConditionalRenderingEXT :: forall io
                                 . (MonadIO io)
                                => -- | @commandBuffer@ is the command buffer into which this command will be
                                   -- recorded.
                                   CommandBuffer
                                -> -- | @pConditionalRenderingBegin@ is a pointer to a
                                   -- 'ConditionalRenderingBeginInfoEXT' structure specifying parameters of
                                   -- conditional rendering.
                                   ConditionalRenderingBeginInfoEXT
                                -> io ()
cmdBeginConditionalRenderingEXT :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer -> ConditionalRenderingBeginInfoEXT -> io ()
cmdBeginConditionalRenderingEXT CommandBuffer
commandBuffer
                                  ConditionalRenderingBeginInfoEXT
conditionalRenderingBegin = 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 vkCmdBeginConditionalRenderingEXTPtr :: FunPtr
  (Ptr CommandBuffer_T
   -> ("pConditionalRenderingBegin"
       ::: Ptr ConditionalRenderingBeginInfoEXT)
   -> IO ())
vkCmdBeginConditionalRenderingEXTPtr = DeviceCmds
-> FunPtr
     (Ptr CommandBuffer_T
      -> ("pConditionalRenderingBegin"
          ::: Ptr ConditionalRenderingBeginInfoEXT)
      -> IO ())
pVkCmdBeginConditionalRenderingEXT (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
   -> ("pConditionalRenderingBegin"
       ::: Ptr ConditionalRenderingBeginInfoEXT)
   -> IO ())
vkCmdBeginConditionalRenderingEXTPtr 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 vkCmdBeginConditionalRenderingEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkCmdBeginConditionalRenderingEXT' :: Ptr CommandBuffer_T
-> ("pConditionalRenderingBegin"
    ::: Ptr ConditionalRenderingBeginInfoEXT)
-> IO ()
vkCmdBeginConditionalRenderingEXT' = FunPtr
  (Ptr CommandBuffer_T
   -> ("pConditionalRenderingBegin"
       ::: Ptr ConditionalRenderingBeginInfoEXT)
   -> IO ())
-> Ptr CommandBuffer_T
-> ("pConditionalRenderingBegin"
    ::: Ptr ConditionalRenderingBeginInfoEXT)
-> IO ()
mkVkCmdBeginConditionalRenderingEXT FunPtr
  (Ptr CommandBuffer_T
   -> ("pConditionalRenderingBegin"
       ::: Ptr ConditionalRenderingBeginInfoEXT)
   -> IO ())
vkCmdBeginConditionalRenderingEXTPtr
  "pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
pConditionalRenderingBegin <- 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 (ConditionalRenderingBeginInfoEXT
conditionalRenderingBegin)
  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
"vkCmdBeginConditionalRenderingEXT" (Ptr CommandBuffer_T
-> ("pConditionalRenderingBegin"
    ::: Ptr ConditionalRenderingBeginInfoEXT)
-> IO ()
vkCmdBeginConditionalRenderingEXT'
                                                                 (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
                                                                 "pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
pConditionalRenderingBegin)
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()

-- | This function will call the supplied action between calls to
-- 'cmdBeginConditionalRenderingEXT' and 'cmdEndConditionalRenderingEXT'
--
-- Note that 'cmdEndConditionalRenderingEXT' is *not* called if an
-- exception is thrown by the inner action.
cmdUseConditionalRenderingEXT :: forall io r . MonadIO io => CommandBuffer -> ConditionalRenderingBeginInfoEXT -> io r -> io r
cmdUseConditionalRenderingEXT :: forall (io :: * -> *) r.
MonadIO io =>
CommandBuffer -> ConditionalRenderingBeginInfoEXT -> io r -> io r
cmdUseConditionalRenderingEXT CommandBuffer
commandBuffer ConditionalRenderingBeginInfoEXT
pConditionalRenderingBegin io r
a =
  (forall (io :: * -> *).
MonadIO io =>
CommandBuffer -> ConditionalRenderingBeginInfoEXT -> io ()
cmdBeginConditionalRenderingEXT CommandBuffer
commandBuffer
                                     ConditionalRenderingBeginInfoEXT
pConditionalRenderingBegin) forall (f :: * -> *) a b. Applicative f => f a -> f b -> f b
*> io r
a forall (f :: * -> *) a b. Applicative f => f a -> f b -> f a
<* (forall (io :: * -> *). MonadIO io => CommandBuffer -> io ()
cmdEndConditionalRenderingEXT CommandBuffer
commandBuffer)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCmdEndConditionalRenderingEXT
  :: FunPtr (Ptr CommandBuffer_T -> IO ()) -> Ptr CommandBuffer_T -> IO ()

-- | vkCmdEndConditionalRenderingEXT - Define the end of a conditional
-- rendering block
--
-- = Description
--
-- Once ended, conditional rendering becomes inactive.
--
-- == Valid Usage
--
-- -   #VUID-vkCmdEndConditionalRenderingEXT-None-01985# Conditional
--     rendering /must/ be
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#active-conditional-rendering active>
--
-- -   #VUID-vkCmdEndConditionalRenderingEXT-None-01986# If conditional
--     rendering was made
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#active-conditional-rendering active>
--     outside of a render pass instance, it /must/ not be ended inside a
--     render pass instance
--
-- -   #VUID-vkCmdEndConditionalRenderingEXT-None-01987# If conditional
--     rendering was made
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#active-conditional-rendering active>
--     within a subpass it /must/ be ended in the same subpass
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCmdEndConditionalRenderingEXT-commandBuffer-parameter#
--     @commandBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.CommandBuffer' handle
--
-- -   #VUID-vkCmdEndConditionalRenderingEXT-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-vkCmdEndConditionalRenderingEXT-commandBuffer-cmdpool# The
--     'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was
--     allocated from /must/ support graphics, or compute operations
--
-- -   #VUID-vkCmdEndConditionalRenderingEXT-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                                                                                                              | Action                                                                                                                                 |
-- | Secondary                                                                                                                  |                                                                                                                        |                                                                                                                             | Compute                                                                                                               | State                                                                                                                                  |
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_conditional_rendering VK_EXT_conditional_rendering>,
-- 'Vulkan.Core10.Handles.CommandBuffer'
cmdEndConditionalRenderingEXT :: forall io
                               . (MonadIO io)
                              => -- | @commandBuffer@ is the command buffer into which this command will be
                                 -- recorded.
                                 CommandBuffer
                              -> io ()
cmdEndConditionalRenderingEXT :: forall (io :: * -> *). MonadIO io => CommandBuffer -> io ()
cmdEndConditionalRenderingEXT CommandBuffer
commandBuffer = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
  let vkCmdEndConditionalRenderingEXTPtr :: FunPtr (Ptr CommandBuffer_T -> IO ())
vkCmdEndConditionalRenderingEXTPtr = DeviceCmds -> FunPtr (Ptr CommandBuffer_T -> IO ())
pVkCmdEndConditionalRenderingEXT (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr (Ptr CommandBuffer_T -> IO ())
vkCmdEndConditionalRenderingEXTPtr 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 vkCmdEndConditionalRenderingEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkCmdEndConditionalRenderingEXT' :: Ptr CommandBuffer_T -> IO ()
vkCmdEndConditionalRenderingEXT' = FunPtr (Ptr CommandBuffer_T -> IO ())
-> Ptr CommandBuffer_T -> IO ()
mkVkCmdEndConditionalRenderingEXT FunPtr (Ptr CommandBuffer_T -> IO ())
vkCmdEndConditionalRenderingEXTPtr
  forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdEndConditionalRenderingEXT" (Ptr CommandBuffer_T -> IO ()
vkCmdEndConditionalRenderingEXT'
                                                        (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer)))
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()


-- | VkConditionalRenderingBeginInfoEXT - Structure specifying conditional
-- rendering begin information
--
-- = Description
--
-- If the 32-bit value at @offset@ in @buffer@ memory is zero, then the
-- rendering commands are discarded, otherwise they are executed as normal.
-- If the value of the predicate in buffer memory changes while conditional
-- rendering is active, the rendering commands /may/ be discarded in an
-- implementation-dependent way. Some implementations may latch the value
-- of the predicate upon beginning conditional rendering while others may
-- read it before every rendering command.
--
-- == Valid Usage
--
-- -   #VUID-VkConditionalRenderingBeginInfoEXT-buffer-01981# If @buffer@
--     is non-sparse then it /must/ be bound completely and contiguously to
--     a single 'Vulkan.Core10.Handles.DeviceMemory' object
--
-- -   #VUID-VkConditionalRenderingBeginInfoEXT-buffer-01982# @buffer@
--     /must/ have been created with the
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT'
--     bit set
--
-- -   #VUID-VkConditionalRenderingBeginInfoEXT-offset-01983# @offset@
--     /must/ be less than the size of @buffer@ by at least 32 bits
--
-- -   #VUID-VkConditionalRenderingBeginInfoEXT-offset-01984# @offset@
--     /must/ be a multiple of 4
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkConditionalRenderingBeginInfoEXT-sType-sType# @sType@ /must/
--     be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT'
--
-- -   #VUID-VkConditionalRenderingBeginInfoEXT-pNext-pNext# @pNext@ /must/
--     be @NULL@
--
-- -   #VUID-VkConditionalRenderingBeginInfoEXT-buffer-parameter# @buffer@
--     /must/ be a valid 'Vulkan.Core10.Handles.Buffer' handle
--
-- -   #VUID-VkConditionalRenderingBeginInfoEXT-flags-parameter# @flags@
--     /must/ be a valid combination of 'ConditionalRenderingFlagBitsEXT'
--     values
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_conditional_rendering VK_EXT_conditional_rendering>,
-- 'Vulkan.Core10.Handles.Buffer', 'ConditionalRenderingFlagsEXT',
-- 'Vulkan.Core10.FundamentalTypes.DeviceSize',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'cmdBeginConditionalRenderingEXT'
data ConditionalRenderingBeginInfoEXT = ConditionalRenderingBeginInfoEXT
  { -- | @buffer@ is a buffer containing the predicate for conditional rendering.
    ConditionalRenderingBeginInfoEXT -> Buffer
buffer :: Buffer
  , -- | @offset@ is the byte offset into @buffer@ where the predicate is
    -- located.
    ConditionalRenderingBeginInfoEXT -> DeviceSize
offset :: DeviceSize
  , -- | @flags@ is a bitmask of 'ConditionalRenderingFlagsEXT' specifying the
    -- behavior of conditional rendering.
    ConditionalRenderingBeginInfoEXT -> ConditionalRenderingFlagBitsEXT
flags :: ConditionalRenderingFlagsEXT
  }
  deriving (Typeable, ConditionalRenderingBeginInfoEXT
-> ConditionalRenderingBeginInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConditionalRenderingBeginInfoEXT
-> ConditionalRenderingBeginInfoEXT -> Bool
$c/= :: ConditionalRenderingBeginInfoEXT
-> ConditionalRenderingBeginInfoEXT -> Bool
== :: ConditionalRenderingBeginInfoEXT
-> ConditionalRenderingBeginInfoEXT -> Bool
$c== :: ConditionalRenderingBeginInfoEXT
-> ConditionalRenderingBeginInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ConditionalRenderingBeginInfoEXT)
#endif
deriving instance Show ConditionalRenderingBeginInfoEXT

instance ToCStruct ConditionalRenderingBeginInfoEXT where
  withCStruct :: forall b.
ConditionalRenderingBeginInfoEXT
-> (("pConditionalRenderingBegin"
     ::: Ptr ConditionalRenderingBeginInfoEXT)
    -> IO b)
-> IO b
withCStruct ConditionalRenderingBeginInfoEXT
x ("pConditionalRenderingBegin"
 ::: Ptr ConditionalRenderingBeginInfoEXT)
-> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 forall a b. (a -> b) -> a -> b
$ \"pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
p ConditionalRenderingBeginInfoEXT
x (("pConditionalRenderingBegin"
 ::: Ptr ConditionalRenderingBeginInfoEXT)
-> IO b
f "pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
p)
  pokeCStruct :: forall b.
("pConditionalRenderingBegin"
 ::: Ptr ConditionalRenderingBeginInfoEXT)
-> ConditionalRenderingBeginInfoEXT -> IO b -> IO b
pokeCStruct "pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
p ConditionalRenderingBeginInfoEXT{DeviceSize
Buffer
ConditionalRenderingFlagBitsEXT
flags :: ConditionalRenderingFlagBitsEXT
offset :: DeviceSize
buffer :: Buffer
$sel:flags:ConditionalRenderingBeginInfoEXT :: ConditionalRenderingBeginInfoEXT -> ConditionalRenderingFlagBitsEXT
$sel:offset:ConditionalRenderingBeginInfoEXT :: ConditionalRenderingBeginInfoEXT -> DeviceSize
$sel:buffer:ConditionalRenderingBeginInfoEXT :: ConditionalRenderingBeginInfoEXT -> Buffer
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
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 (("pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Buffer)) (Buffer
buffer)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize)) (DeviceSize
offset)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr ConditionalRenderingFlagsEXT)) (ConditionalRenderingFlagBitsEXT
flags)
    IO b
f
  cStructSize :: Int
cStructSize = Int
40
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
("pConditionalRenderingBegin"
 ::: Ptr ConditionalRenderingBeginInfoEXT)
-> IO b -> IO b
pokeZeroCStruct "pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
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 (("pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Buffer)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct ConditionalRenderingBeginInfoEXT where
  peekCStruct :: ("pConditionalRenderingBegin"
 ::: Ptr ConditionalRenderingBeginInfoEXT)
-> IO ConditionalRenderingBeginInfoEXT
peekCStruct "pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
p = do
    Buffer
buffer <- forall a. Storable a => Ptr a -> IO a
peek @Buffer (("pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Buffer))
    DeviceSize
offset <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize))
    ConditionalRenderingFlagBitsEXT
flags <- forall a. Storable a => Ptr a -> IO a
peek @ConditionalRenderingFlagsEXT (("pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr ConditionalRenderingFlagsEXT))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Buffer
-> DeviceSize
-> ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingBeginInfoEXT
ConditionalRenderingBeginInfoEXT
             Buffer
buffer DeviceSize
offset ConditionalRenderingFlagBitsEXT
flags

instance Storable ConditionalRenderingBeginInfoEXT where
  sizeOf :: ConditionalRenderingBeginInfoEXT -> Int
sizeOf ~ConditionalRenderingBeginInfoEXT
_ = Int
40
  alignment :: ConditionalRenderingBeginInfoEXT -> Int
alignment ~ConditionalRenderingBeginInfoEXT
_ = Int
8
  peek :: ("pConditionalRenderingBegin"
 ::: Ptr ConditionalRenderingBeginInfoEXT)
-> IO ConditionalRenderingBeginInfoEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: ("pConditionalRenderingBegin"
 ::: Ptr ConditionalRenderingBeginInfoEXT)
-> ConditionalRenderingBeginInfoEXT -> IO ()
poke "pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
ptr ConditionalRenderingBeginInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pConditionalRenderingBegin"
::: Ptr ConditionalRenderingBeginInfoEXT
ptr ConditionalRenderingBeginInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero ConditionalRenderingBeginInfoEXT where
  zero :: ConditionalRenderingBeginInfoEXT
zero = Buffer
-> DeviceSize
-> ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingBeginInfoEXT
ConditionalRenderingBeginInfoEXT
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


-- | VkCommandBufferInheritanceConditionalRenderingInfoEXT - Structure
-- specifying command buffer inheritance information
--
-- = Description
--
-- If this structure is not present, the behavior is as if
-- @conditionalRenderingEnable@ is 'Vulkan.Core10.FundamentalTypes.FALSE'.
--
-- == Valid Usage
--
-- -   #VUID-VkCommandBufferInheritanceConditionalRenderingInfoEXT-conditionalRenderingEnable-01977#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-inheritedConditionalRendering inheritedConditionalRendering>
--     feature is not enabled, @conditionalRenderingEnable@ /must/ be
--     'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkCommandBufferInheritanceConditionalRenderingInfoEXT-sType-sType#
--     @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_conditional_rendering VK_EXT_conditional_rendering>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data CommandBufferInheritanceConditionalRenderingInfoEXT = CommandBufferInheritanceConditionalRenderingInfoEXT
  { -- | @conditionalRenderingEnable@ specifies whether the command buffer /can/
    -- be executed while conditional rendering is active in the primary command
    -- buffer. If this is 'Vulkan.Core10.FundamentalTypes.TRUE', then this
    -- command buffer /can/ be executed whether the primary command buffer has
    -- active conditional rendering or not. If this is
    -- 'Vulkan.Core10.FundamentalTypes.FALSE', then the primary command buffer
    -- /must/ not have conditional rendering active.
    CommandBufferInheritanceConditionalRenderingInfoEXT -> Bool
conditionalRenderingEnable :: Bool }
  deriving (Typeable, CommandBufferInheritanceConditionalRenderingInfoEXT
-> CommandBufferInheritanceConditionalRenderingInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CommandBufferInheritanceConditionalRenderingInfoEXT
-> CommandBufferInheritanceConditionalRenderingInfoEXT -> Bool
$c/= :: CommandBufferInheritanceConditionalRenderingInfoEXT
-> CommandBufferInheritanceConditionalRenderingInfoEXT -> Bool
== :: CommandBufferInheritanceConditionalRenderingInfoEXT
-> CommandBufferInheritanceConditionalRenderingInfoEXT -> Bool
$c== :: CommandBufferInheritanceConditionalRenderingInfoEXT
-> CommandBufferInheritanceConditionalRenderingInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (CommandBufferInheritanceConditionalRenderingInfoEXT)
#endif
deriving instance Show CommandBufferInheritanceConditionalRenderingInfoEXT

instance ToCStruct CommandBufferInheritanceConditionalRenderingInfoEXT where
  withCStruct :: forall b.
CommandBufferInheritanceConditionalRenderingInfoEXT
-> (Ptr CommandBufferInheritanceConditionalRenderingInfoEXT
    -> IO b)
-> IO b
withCStruct CommandBufferInheritanceConditionalRenderingInfoEXT
x Ptr CommandBufferInheritanceConditionalRenderingInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr CommandBufferInheritanceConditionalRenderingInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr CommandBufferInheritanceConditionalRenderingInfoEXT
p CommandBufferInheritanceConditionalRenderingInfoEXT
x (Ptr CommandBufferInheritanceConditionalRenderingInfoEXT -> IO b
f Ptr CommandBufferInheritanceConditionalRenderingInfoEXT
p)
  pokeCStruct :: forall b.
Ptr CommandBufferInheritanceConditionalRenderingInfoEXT
-> CommandBufferInheritanceConditionalRenderingInfoEXT
-> IO b
-> IO b
pokeCStruct Ptr CommandBufferInheritanceConditionalRenderingInfoEXT
p CommandBufferInheritanceConditionalRenderingInfoEXT{Bool
conditionalRenderingEnable :: Bool
$sel:conditionalRenderingEnable:CommandBufferInheritanceConditionalRenderingInfoEXT :: CommandBufferInheritanceConditionalRenderingInfoEXT -> Bool
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CommandBufferInheritanceConditionalRenderingInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CommandBufferInheritanceConditionalRenderingInfoEXT
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 CommandBufferInheritanceConditionalRenderingInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
conditionalRenderingEnable))
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr CommandBufferInheritanceConditionalRenderingInfoEXT
-> IO b -> IO b
pokeZeroCStruct Ptr CommandBufferInheritanceConditionalRenderingInfoEXT
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CommandBufferInheritanceConditionalRenderingInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CommandBufferInheritanceConditionalRenderingInfoEXT
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 CommandBufferInheritanceConditionalRenderingInfoEXT
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 CommandBufferInheritanceConditionalRenderingInfoEXT where
  peekCStruct :: Ptr CommandBufferInheritanceConditionalRenderingInfoEXT
-> IO CommandBufferInheritanceConditionalRenderingInfoEXT
peekCStruct Ptr CommandBufferInheritanceConditionalRenderingInfoEXT
p = do
    Bool32
conditionalRenderingEnable <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr CommandBufferInheritanceConditionalRenderingInfoEXT
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 -> CommandBufferInheritanceConditionalRenderingInfoEXT
CommandBufferInheritanceConditionalRenderingInfoEXT
             (Bool32 -> Bool
bool32ToBool Bool32
conditionalRenderingEnable)

instance Storable CommandBufferInheritanceConditionalRenderingInfoEXT where
  sizeOf :: CommandBufferInheritanceConditionalRenderingInfoEXT -> Int
sizeOf ~CommandBufferInheritanceConditionalRenderingInfoEXT
_ = Int
24
  alignment :: CommandBufferInheritanceConditionalRenderingInfoEXT -> Int
alignment ~CommandBufferInheritanceConditionalRenderingInfoEXT
_ = Int
8
  peek :: Ptr CommandBufferInheritanceConditionalRenderingInfoEXT
-> IO CommandBufferInheritanceConditionalRenderingInfoEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr CommandBufferInheritanceConditionalRenderingInfoEXT
-> CommandBufferInheritanceConditionalRenderingInfoEXT -> IO ()
poke Ptr CommandBufferInheritanceConditionalRenderingInfoEXT
ptr CommandBufferInheritanceConditionalRenderingInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr CommandBufferInheritanceConditionalRenderingInfoEXT
ptr CommandBufferInheritanceConditionalRenderingInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero CommandBufferInheritanceConditionalRenderingInfoEXT where
  zero :: CommandBufferInheritanceConditionalRenderingInfoEXT
zero = Bool -> CommandBufferInheritanceConditionalRenderingInfoEXT
CommandBufferInheritanceConditionalRenderingInfoEXT
           forall a. Zero a => a
zero


-- | VkPhysicalDeviceConditionalRenderingFeaturesEXT - Structure describing
-- if a secondary command buffer can be executed if conditional rendering
-- is active in the primary command buffer
--
-- = Members
--
-- This structure describes the following features:
--
-- = Description
--
-- If the 'PhysicalDeviceConditionalRenderingFeaturesEXT' structure is
-- included in the @pNext@ chain of the
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2'
-- structure passed to
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceFeatures2',
-- it is filled in to indicate whether each corresponding feature is
-- supported. 'PhysicalDeviceConditionalRenderingFeaturesEXT' /can/ also be
-- used in the @pNext@ chain of 'Vulkan.Core10.Device.DeviceCreateInfo' to
-- selectively enable these features.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_conditional_rendering VK_EXT_conditional_rendering>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceConditionalRenderingFeaturesEXT = PhysicalDeviceConditionalRenderingFeaturesEXT
  { -- | #features-conditionalRendering# @conditionalRendering@ specifies whether
    -- conditional rendering is supported.
    PhysicalDeviceConditionalRenderingFeaturesEXT -> Bool
conditionalRendering :: Bool
  , -- | #features-inheritedConditionalRendering# @inheritedConditionalRendering@
    -- specifies whether a secondary command buffer /can/ be executed while
    -- conditional rendering is active in the primary command buffer.
    PhysicalDeviceConditionalRenderingFeaturesEXT -> Bool
inheritedConditionalRendering :: Bool
  }
  deriving (Typeable, PhysicalDeviceConditionalRenderingFeaturesEXT
-> PhysicalDeviceConditionalRenderingFeaturesEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceConditionalRenderingFeaturesEXT
-> PhysicalDeviceConditionalRenderingFeaturesEXT -> Bool
$c/= :: PhysicalDeviceConditionalRenderingFeaturesEXT
-> PhysicalDeviceConditionalRenderingFeaturesEXT -> Bool
== :: PhysicalDeviceConditionalRenderingFeaturesEXT
-> PhysicalDeviceConditionalRenderingFeaturesEXT -> Bool
$c== :: PhysicalDeviceConditionalRenderingFeaturesEXT
-> PhysicalDeviceConditionalRenderingFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceConditionalRenderingFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceConditionalRenderingFeaturesEXT

instance ToCStruct PhysicalDeviceConditionalRenderingFeaturesEXT where
  withCStruct :: forall b.
PhysicalDeviceConditionalRenderingFeaturesEXT
-> (Ptr PhysicalDeviceConditionalRenderingFeaturesEXT -> IO b)
-> IO b
withCStruct PhysicalDeviceConditionalRenderingFeaturesEXT
x Ptr PhysicalDeviceConditionalRenderingFeaturesEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
p PhysicalDeviceConditionalRenderingFeaturesEXT
x (Ptr PhysicalDeviceConditionalRenderingFeaturesEXT -> IO b
f Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
-> PhysicalDeviceConditionalRenderingFeaturesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
p PhysicalDeviceConditionalRenderingFeaturesEXT{Bool
inheritedConditionalRendering :: Bool
conditionalRendering :: Bool
$sel:inheritedConditionalRendering:PhysicalDeviceConditionalRenderingFeaturesEXT :: PhysicalDeviceConditionalRenderingFeaturesEXT -> Bool
$sel:conditionalRendering:PhysicalDeviceConditionalRenderingFeaturesEXT :: PhysicalDeviceConditionalRenderingFeaturesEXT -> Bool
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
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 PhysicalDeviceConditionalRenderingFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
conditionalRendering))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
inheritedConditionalRendering))
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceConditionalRenderingFeaturesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
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 PhysicalDeviceConditionalRenderingFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDeviceConditionalRenderingFeaturesEXT where
  peekCStruct :: Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
-> IO PhysicalDeviceConditionalRenderingFeaturesEXT
peekCStruct Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
p = do
    Bool32
conditionalRendering <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
    Bool32
inheritedConditionalRendering <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Bool -> Bool -> PhysicalDeviceConditionalRenderingFeaturesEXT
PhysicalDeviceConditionalRenderingFeaturesEXT
             (Bool32 -> Bool
bool32ToBool Bool32
conditionalRendering)
             (Bool32 -> Bool
bool32ToBool Bool32
inheritedConditionalRendering)

instance Storable PhysicalDeviceConditionalRenderingFeaturesEXT where
  sizeOf :: PhysicalDeviceConditionalRenderingFeaturesEXT -> Int
sizeOf ~PhysicalDeviceConditionalRenderingFeaturesEXT
_ = Int
24
  alignment :: PhysicalDeviceConditionalRenderingFeaturesEXT -> Int
alignment ~PhysicalDeviceConditionalRenderingFeaturesEXT
_ = Int
8
  peek :: Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
-> IO PhysicalDeviceConditionalRenderingFeaturesEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
-> PhysicalDeviceConditionalRenderingFeaturesEXT -> IO ()
poke Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
ptr PhysicalDeviceConditionalRenderingFeaturesEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceConditionalRenderingFeaturesEXT
ptr PhysicalDeviceConditionalRenderingFeaturesEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PhysicalDeviceConditionalRenderingFeaturesEXT where
  zero :: PhysicalDeviceConditionalRenderingFeaturesEXT
zero = Bool -> Bool -> PhysicalDeviceConditionalRenderingFeaturesEXT
PhysicalDeviceConditionalRenderingFeaturesEXT
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


type ConditionalRenderingFlagsEXT = ConditionalRenderingFlagBitsEXT

-- | VkConditionalRenderingFlagBitsEXT - Specify the behavior of conditional
-- rendering
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_conditional_rendering VK_EXT_conditional_rendering>,
-- 'ConditionalRenderingFlagsEXT'
newtype ConditionalRenderingFlagBitsEXT = ConditionalRenderingFlagBitsEXT Flags
  deriving newtype (ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> Bool
$c/= :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> Bool
== :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> Bool
$c== :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> Bool
Eq, Eq ConditionalRenderingFlagBitsEXT
ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> Bool
ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> Ordering
ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
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 :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
$cmin :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
max :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
$cmax :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
>= :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> Bool
$c>= :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> Bool
> :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> Bool
$c> :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> Bool
<= :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> Bool
$c<= :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> Bool
< :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> Bool
$c< :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> Bool
compare :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> Ordering
$ccompare :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> Ordering
Ord, Ptr ConditionalRenderingFlagBitsEXT
-> IO ConditionalRenderingFlagBitsEXT
Ptr ConditionalRenderingFlagBitsEXT
-> Int -> IO ConditionalRenderingFlagBitsEXT
Ptr ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT -> IO ()
Ptr ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> IO ()
ConditionalRenderingFlagBitsEXT -> Int
forall b. Ptr b -> Int -> IO ConditionalRenderingFlagBitsEXT
forall b. Ptr b -> Int -> ConditionalRenderingFlagBitsEXT -> 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 ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> IO ()
$cpoke :: Ptr ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT -> IO ()
peek :: Ptr ConditionalRenderingFlagBitsEXT
-> IO ConditionalRenderingFlagBitsEXT
$cpeek :: Ptr ConditionalRenderingFlagBitsEXT
-> IO ConditionalRenderingFlagBitsEXT
pokeByteOff :: forall b. Ptr b -> Int -> ConditionalRenderingFlagBitsEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ConditionalRenderingFlagBitsEXT -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO ConditionalRenderingFlagBitsEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ConditionalRenderingFlagBitsEXT
pokeElemOff :: Ptr ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT -> IO ()
$cpokeElemOff :: Ptr ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT -> IO ()
peekElemOff :: Ptr ConditionalRenderingFlagBitsEXT
-> Int -> IO ConditionalRenderingFlagBitsEXT
$cpeekElemOff :: Ptr ConditionalRenderingFlagBitsEXT
-> Int -> IO ConditionalRenderingFlagBitsEXT
alignment :: ConditionalRenderingFlagBitsEXT -> Int
$calignment :: ConditionalRenderingFlagBitsEXT -> Int
sizeOf :: ConditionalRenderingFlagBitsEXT -> Int
$csizeOf :: ConditionalRenderingFlagBitsEXT -> Int
Storable, ConditionalRenderingFlagBitsEXT
forall a. a -> Zero a
zero :: ConditionalRenderingFlagBitsEXT
$czero :: ConditionalRenderingFlagBitsEXT
Zero, Eq ConditionalRenderingFlagBitsEXT
ConditionalRenderingFlagBitsEXT
Int -> ConditionalRenderingFlagBitsEXT
ConditionalRenderingFlagBitsEXT -> Bool
ConditionalRenderingFlagBitsEXT -> Int
ConditionalRenderingFlagBitsEXT -> Maybe Int
ConditionalRenderingFlagBitsEXT -> ConditionalRenderingFlagBitsEXT
ConditionalRenderingFlagBitsEXT -> Int -> Bool
ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
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 :: ConditionalRenderingFlagBitsEXT -> Int
$cpopCount :: ConditionalRenderingFlagBitsEXT -> Int
rotateR :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
$crotateR :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
rotateL :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
$crotateL :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
unsafeShiftR :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
$cunsafeShiftR :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
shiftR :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
$cshiftR :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
unsafeShiftL :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
$cunsafeShiftL :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
shiftL :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
$cshiftL :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
isSigned :: ConditionalRenderingFlagBitsEXT -> Bool
$cisSigned :: ConditionalRenderingFlagBitsEXT -> Bool
bitSize :: ConditionalRenderingFlagBitsEXT -> Int
$cbitSize :: ConditionalRenderingFlagBitsEXT -> Int
bitSizeMaybe :: ConditionalRenderingFlagBitsEXT -> Maybe Int
$cbitSizeMaybe :: ConditionalRenderingFlagBitsEXT -> Maybe Int
testBit :: ConditionalRenderingFlagBitsEXT -> Int -> Bool
$ctestBit :: ConditionalRenderingFlagBitsEXT -> Int -> Bool
complementBit :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
$ccomplementBit :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
clearBit :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
$cclearBit :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
setBit :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
$csetBit :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
bit :: Int -> ConditionalRenderingFlagBitsEXT
$cbit :: Int -> ConditionalRenderingFlagBitsEXT
zeroBits :: ConditionalRenderingFlagBitsEXT
$czeroBits :: ConditionalRenderingFlagBitsEXT
rotate :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
$crotate :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
shift :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
$cshift :: ConditionalRenderingFlagBitsEXT
-> Int -> ConditionalRenderingFlagBitsEXT
complement :: ConditionalRenderingFlagBitsEXT -> ConditionalRenderingFlagBitsEXT
$ccomplement :: ConditionalRenderingFlagBitsEXT -> ConditionalRenderingFlagBitsEXT
xor :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
$cxor :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
.|. :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
$c.|. :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
.&. :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
$c.&. :: ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
-> ConditionalRenderingFlagBitsEXT
Bits, Bits ConditionalRenderingFlagBitsEXT
ConditionalRenderingFlagBitsEXT -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: ConditionalRenderingFlagBitsEXT -> Int
$ccountTrailingZeros :: ConditionalRenderingFlagBitsEXT -> Int
countLeadingZeros :: ConditionalRenderingFlagBitsEXT -> Int
$ccountLeadingZeros :: ConditionalRenderingFlagBitsEXT -> Int
finiteBitSize :: ConditionalRenderingFlagBitsEXT -> Int
$cfiniteBitSize :: ConditionalRenderingFlagBitsEXT -> Int
FiniteBits)

-- | 'CONDITIONAL_RENDERING_INVERTED_BIT_EXT' specifies the condition used to
-- determine whether to discard rendering commands or not. That is, if the
-- 32-bit predicate read from @buffer@ memory at @offset@ is zero, the
-- rendering commands are not discarded, and if non zero, then they are
-- discarded.
pattern $bCONDITIONAL_RENDERING_INVERTED_BIT_EXT :: ConditionalRenderingFlagBitsEXT
$mCONDITIONAL_RENDERING_INVERTED_BIT_EXT :: forall {r}.
ConditionalRenderingFlagBitsEXT
-> ((# #) -> r) -> ((# #) -> r) -> r
CONDITIONAL_RENDERING_INVERTED_BIT_EXT = ConditionalRenderingFlagBitsEXT 0x00000001

conNameConditionalRenderingFlagBitsEXT :: String
conNameConditionalRenderingFlagBitsEXT :: String
conNameConditionalRenderingFlagBitsEXT = String
"ConditionalRenderingFlagBitsEXT"

enumPrefixConditionalRenderingFlagBitsEXT :: String
enumPrefixConditionalRenderingFlagBitsEXT :: String
enumPrefixConditionalRenderingFlagBitsEXT = String
"CONDITIONAL_RENDERING_INVERTED_BIT_EXT"

showTableConditionalRenderingFlagBitsEXT :: [(ConditionalRenderingFlagBitsEXT, String)]
showTableConditionalRenderingFlagBitsEXT :: [(ConditionalRenderingFlagBitsEXT, String)]
showTableConditionalRenderingFlagBitsEXT =
  [
    ( ConditionalRenderingFlagBitsEXT
CONDITIONAL_RENDERING_INVERTED_BIT_EXT
    , String
""
    )
  ]

instance Show ConditionalRenderingFlagBitsEXT where
  showsPrec :: Int -> ConditionalRenderingFlagBitsEXT -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixConditionalRenderingFlagBitsEXT
      [(ConditionalRenderingFlagBitsEXT, String)]
showTableConditionalRenderingFlagBitsEXT
      String
conNameConditionalRenderingFlagBitsEXT
      (\(ConditionalRenderingFlagBitsEXT 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 ConditionalRenderingFlagBitsEXT where
  readPrec :: ReadPrec ConditionalRenderingFlagBitsEXT
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixConditionalRenderingFlagBitsEXT
      [(ConditionalRenderingFlagBitsEXT, String)]
showTableConditionalRenderingFlagBitsEXT
      String
conNameConditionalRenderingFlagBitsEXT
      Flags -> ConditionalRenderingFlagBitsEXT
ConditionalRenderingFlagBitsEXT

type EXT_CONDITIONAL_RENDERING_SPEC_VERSION = 2

-- No documentation found for TopLevel "VK_EXT_CONDITIONAL_RENDERING_SPEC_VERSION"
pattern EXT_CONDITIONAL_RENDERING_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_CONDITIONAL_RENDERING_SPEC_VERSION :: forall a. Integral a => a
$mEXT_CONDITIONAL_RENDERING_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_CONDITIONAL_RENDERING_SPEC_VERSION = 2


type EXT_CONDITIONAL_RENDERING_EXTENSION_NAME = "VK_EXT_conditional_rendering"

-- No documentation found for TopLevel "VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME"
pattern EXT_CONDITIONAL_RENDERING_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_CONDITIONAL_RENDERING_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_CONDITIONAL_RENDERING_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_CONDITIONAL_RENDERING_EXTENSION_NAME = "VK_EXT_conditional_rendering"