{-# language CPP #-}
-- | = Name
--
-- VK_NV_fragment_shading_rate_enums - device extension
--
-- == VK_NV_fragment_shading_rate_enums
--
-- [__Name String__]
--     @VK_NV_fragment_shading_rate_enums@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     327
--
-- [__Revision__]
--     1
--
-- [__Ratification Status__]
--     Not ratified
--
-- [__Extension and Version Dependencies__]
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_fragment_shading_rate VK_KHR_fragment_shading_rate>
--
-- [__Contact__]
--
--     -   Pat Brown
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_NV_fragment_shading_rate_enums] @nvpbrown%0A*Here describe the issue or question you have about the VK_NV_fragment_shading_rate_enums extension* >
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2020-09-02
--
-- [__Contributors__]
--
--     -   Pat Brown, NVIDIA
--
--     -   Jeff Bolz, NVIDIA
--
-- == Description
--
-- This extension builds on the fragment shading rate functionality
-- provided by the VK_KHR_fragment_shading_rate extension, adding support
-- for “supersample” fragment shading rates that trigger multiple fragment
-- shader invocations per pixel as well as a “no invocations” shading rate
-- that discards any portions of a primitive that would use that shading
-- rate.
--
-- == New Commands
--
-- -   'cmdSetFragmentShadingRateEnumNV'
--
-- == New Structures
--
-- -   Extending 'Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo':
--
--     -   'PipelineFragmentShadingRateEnumStateCreateInfoNV'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
--     'Vulkan.Core10.Device.DeviceCreateInfo':
--
--     -   'PhysicalDeviceFragmentShadingRateEnumsFeaturesNV'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2':
--
--     -   'PhysicalDeviceFragmentShadingRateEnumsPropertiesNV'
--
-- == New Enums
--
-- -   'FragmentShadingRateNV'
--
-- -   'FragmentShadingRateTypeNV'
--
-- == New Enum Constants
--
-- -   'NV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME'
--
-- -   'NV_FRAGMENT_SHADING_RATE_ENUMS_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV'
--
-- == Issues
--
-- 1.  Why was this extension created? How should it be named?
--
--     __RESOLVED__: The primary goal of this extension was to expose
--     support for supersample and “no invocations” shading rates, which
--     are supported by the VK_NV_shading_rate_image extension but not by
--     VK_KHR_fragment_shading_rate. Because VK_KHR_fragment_shading_rate
--     specifies the primitive shading rate using a fragment size in
--     pixels, it lacks a good way to specify supersample rates. To deal
--     with this, we defined enums covering shading rates supported by the
--     KHR extension as well as the new shading rates and added structures
--     and APIs accepting shading rate enums instead of fragment sizes.
--
--     Since this extension adds two different types of shading rates, both
--     expressed using enums, we chose the extension name
--     VK_NV_fragment_shading_rate_enums.
--
-- 2.  Is this a standalone extension?
--
--     __RESOLVED__: No, this extension requires
--     VK_KHR_fragment_shading_rate. In order to use the features of this
--     extension, applications must enable the relevant features of KHR
--     extension.
--
-- 3.  How are the shading rate enums used, and how were the enum values
--     assigned?
--
--     __RESOLVED__: The shading rates supported by the enums in this
--     extension are accepted as pipeline, primitive, and attachment
--     shading rates and behave identically. For the shading rates also
--     supported by the KHR extension, the values assigned to the
--     corresponding enums are identical to the values already used for the
--     primitive and attachment shading rates in the KHR extension. For
--     those enums, bits 0 and 1 specify the base two logarithm of the
--     fragment height and bits 2 and 3 specify the base two logarithm of
--     the fragment width. For the new shading rates added by this
--     extension, we chose to use 11 through 14 (10 plus the base two
--     logarithm of the invocation count) for the supersample rates and 15
--     for the “no invocations” rate. None of those values are supported as
--     primitive or attachment shading rates by the KHR extension.
--
-- 4.  Between this extension, VK_KHR_fragment_shading_rate, and
--     VK_NV_shading_rate_image, there are three different ways to specify
--     shading rate state in a pipeline. How should we handle this?
--
--     __RESOLVED__: We do not allow the concurrent use of
--     VK_NV_shading_rate_image and VK_KHR_fragment_shading_rate; it is an
--     error to enable shading rate features from both extensions. But we
--     do allow applications to enable this extension together with
--     VK_KHR_fragment_shading_rate together. While we expect that
--     applications will never attach pipeline CreateInfo structures for
--     both this extension and the KHR extension concurrently, Vulkan does
--     not have any precedent forbidding such behavior and instead
--     typically treats a pipeline created without an extension-specific
--     CreateInfo structure as equivalent to one containing default values
--     specified by the extension. Rather than adding such a rule
--     considering the presence or absence of our new CreateInfo structure,
--     we instead included a @shadingRateType@ member to
--     'PipelineFragmentShadingRateEnumStateCreateInfoNV' that selects
--     between using state specified by that structure and state specified
--     by
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'.
--
-- == Version History
--
-- -   Revision 1, 2020-09-02 (pbrown)
--
--     -   Internal revisions
--
-- == See Also
--
-- 'FragmentShadingRateNV', 'FragmentShadingRateTypeNV',
-- 'PhysicalDeviceFragmentShadingRateEnumsFeaturesNV',
-- 'PhysicalDeviceFragmentShadingRateEnumsPropertiesNV',
-- 'PipelineFragmentShadingRateEnumStateCreateInfoNV',
-- 'cmdSetFragmentShadingRateEnumNV'
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VK_NV_fragment_shading_rate_enums Vulkan Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_NV_fragment_shading_rate_enums  ( cmdSetFragmentShadingRateEnumNV
                                                            , PhysicalDeviceFragmentShadingRateEnumsFeaturesNV(..)
                                                            , PhysicalDeviceFragmentShadingRateEnumsPropertiesNV(..)
                                                            , PipelineFragmentShadingRateEnumStateCreateInfoNV(..)
                                                            , FragmentShadingRateNV( FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV
                                                                                   , FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV
                                                                                   , FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV
                                                                                   , FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV
                                                                                   , FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV
                                                                                   , FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV
                                                                                   , FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV
                                                                                   , FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV
                                                                                   , FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV
                                                                                   , FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV
                                                                                   , FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV
                                                                                   , FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV
                                                                                   , ..
                                                                                   )
                                                            , FragmentShadingRateTypeNV( FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV
                                                                                       , FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV
                                                                                       , ..
                                                                                       )
                                                            , NV_FRAGMENT_SHADING_RATE_ENUMS_SPEC_VERSION
                                                            , pattern NV_FRAGMENT_SHADING_RATE_ENUMS_SPEC_VERSION
                                                            , NV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME
                                                            , pattern NV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME
                                                            , FragmentShadingRateCombinerOpKHR(..)
                                                            ) where

import Vulkan.CStruct.Utils (FixedArray)
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 (showsPrec)
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 Data.Int (Int32)
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.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.CStruct.Utils (lowerArrayPtr)
import Vulkan.NamedType ((:::))
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(pVkCmdSetFragmentShadingRateEnumNV))
import Vulkan.Extensions.VK_KHR_fragment_shading_rate (FragmentShadingRateCombinerOpKHR)
import Vulkan.Extensions.VK_KHR_fragment_shading_rate (FragmentShadingRateCombinerOpKHR(..))
import Vulkan.Core10.Enums.SampleCountFlagBits (SampleCountFlagBits)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV))
import Vulkan.Extensions.VK_KHR_fragment_shading_rate (FragmentShadingRateCombinerOpKHR(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCmdSetFragmentShadingRateEnumNV
  :: FunPtr (Ptr CommandBuffer_T -> FragmentShadingRateNV -> Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR) -> IO ()) -> Ptr CommandBuffer_T -> FragmentShadingRateNV -> Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR) -> IO ()

-- | vkCmdSetFragmentShadingRateEnumNV - Set pipeline fragment shading rate
-- dynamically for a command buffer using enums
--
-- = Description
--
-- This command sets the pipeline fragment shading rate and combiner
-- operation 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_FRAGMENT_SHADING_RATE_KHR'
-- set in
-- 'Vulkan.Core10.Pipeline.PipelineDynamicStateCreateInfo'::@pDynamicStates@.
-- Otherwise, this state is specified by the
-- 'PipelineFragmentShadingRateEnumStateCreateInfoNV' values used to create
-- the currently active pipeline.
--
-- Note
--
-- This command allows specifying additional shading rates beyond those
-- supported by
-- 'Vulkan.Extensions.VK_KHR_fragment_shading_rate.cmdSetFragmentShadingRateKHR'.
-- For more information, refer to the @VK_NV_fragment_shading_rate_enums@
-- appendix.
--
-- == Valid Usage
--
-- -   #VUID-vkCmdSetFragmentShadingRateEnumNV-pipelineFragmentShadingRate-04576#
--     If
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-pipelineFragmentShadingRate pipelineFragmentShadingRate>
--     is not enabled, @shadingRate@ /must/ be
--     'FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV'
--
-- -   #VUID-vkCmdSetFragmentShadingRateEnumNV-supersampleFragmentShadingRates-04577#
--     If
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-supersampleFragmentShadingRates supersampleFragmentShadingRates>
--     is not enabled, @shadingRate@ /must/ not be
--     'FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV',
--     'FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV',
--     'FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV', or
--     'FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV'
--
-- -   #VUID-vkCmdSetFragmentShadingRateEnumNV-noInvocationFragmentShadingRates-04578#
--     If
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-noInvocationFragmentShadingRates noInvocationFragmentShadingRates>
--     is not enabled, @shadingRate@ /must/ not be
--     'FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV'
--
-- -   #VUID-vkCmdSetFragmentShadingRateEnumNV-fragmentShadingRateEnums-04579#
--     The
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-fragmentShadingRateEnums fragmentShadingRateEnums>
--     feature /must/ be enabled
--
-- -   #VUID-vkCmdSetFragmentShadingRateEnumNV-pipelineFragmentShadingRate-04580#
--     One of the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-pipelineFragmentShadingRate pipelineFragmentShadingRate>,
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-primitiveFragmentShadingRate primitiveFragmentShadingRate>,
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-attachmentFragmentShadingRate attachmentFragmentShadingRate>
--     features /must/ be enabled
--
-- -   #VUID-vkCmdSetFragmentShadingRateEnumNV-primitiveFragmentShadingRate-04581#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-primitiveFragmentShadingRate primitiveFragmentShadingRate>
--     feature is not enabled, @combinerOps@[0] /must/ be
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR'
--
-- -   #VUID-vkCmdSetFragmentShadingRateEnumNV-attachmentFragmentShadingRate-04582#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-attachmentFragmentShadingRate attachmentFragmentShadingRate>
--     feature is not enabled, @combinerOps@[1] /must/ be
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR'
--
-- -   #VUID-vkCmdSetFragmentShadingRateEnumNV-fragmentSizeNonTrivialCombinerOps-04583#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-fragmentShadingRateNonTrivialCombinerOps fragmentSizeNonTrivialCombinerOps>
--     limit is not supported, elements of @combinerOps@ /must/ be either
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR'
--     or
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCmdSetFragmentShadingRateEnumNV-commandBuffer-parameter#
--     @commandBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.CommandBuffer' handle
--
-- -   #VUID-vkCmdSetFragmentShadingRateEnumNV-shadingRate-parameter#
--     @shadingRate@ /must/ be a valid 'FragmentShadingRateNV' value
--
-- -   #VUID-vkCmdSetFragmentShadingRateEnumNV-combinerOps-parameter# Each
--     element of @combinerOps@ /must/ be a valid
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FragmentShadingRateCombinerOpKHR'
--     value
--
-- -   #VUID-vkCmdSetFragmentShadingRateEnumNV-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-vkCmdSetFragmentShadingRateEnumNV-commandBuffer-cmdpool# The
--     'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was
--     allocated from /must/ support graphics operations
--
-- -   #VUID-vkCmdSetFragmentShadingRateEnumNV-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_NV_fragment_shading_rate_enums VK_NV_fragment_shading_rate_enums>,
-- 'Vulkan.Core10.Handles.CommandBuffer',
-- 'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FragmentShadingRateCombinerOpKHR',
-- 'FragmentShadingRateNV'
cmdSetFragmentShadingRateEnumNV :: forall io
                                 . (MonadIO io)
                                => -- | @commandBuffer@ is the command buffer into which the command will be
                                   -- recorded.
                                   CommandBuffer
                                -> -- | @shadingRate@ specifies a 'FragmentShadingRateNV' enum indicating the
                                   -- pipeline fragment shading rate for subsequent drawing commands.
                                   FragmentShadingRateNV
                                -> -- | @combinerOps@ specifies a
                                   -- 'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FragmentShadingRateCombinerOpKHR'
                                   -- determining how the
                                   -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-fragment-shading-rate-pipeline pipeline>,
                                   -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-fragment-shading-rate-primitive primitive>,
                                   -- and
                                   -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-fragment-shading-rate-attachment attachment shading rates>
                                   -- are
                                   -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-fragment-shading-rate-combining combined>
                                   -- for fragments generated by subsequent drawing commands.
                                   ("combinerOps" ::: (FragmentShadingRateCombinerOpKHR, FragmentShadingRateCombinerOpKHR))
                                -> io ()
cmdSetFragmentShadingRateEnumNV :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> FragmentShadingRateNV
-> ("combinerOps"
    ::: (FragmentShadingRateCombinerOpKHR,
         FragmentShadingRateCombinerOpKHR))
-> io ()
cmdSetFragmentShadingRateEnumNV CommandBuffer
commandBuffer
                                  FragmentShadingRateNV
shadingRate
                                  "combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
     FragmentShadingRateCombinerOpKHR)
combinerOps = 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 vkCmdSetFragmentShadingRateEnumNVPtr :: FunPtr
  (Ptr CommandBuffer_T
   -> FragmentShadingRateNV
   -> ("combinerOps"
       ::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
   -> IO ())
vkCmdSetFragmentShadingRateEnumNVPtr = DeviceCmds
-> FunPtr
     (Ptr CommandBuffer_T
      -> FragmentShadingRateNV
      -> ("combinerOps"
          ::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
      -> IO ())
pVkCmdSetFragmentShadingRateEnumNV (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
   -> FragmentShadingRateNV
   -> ("combinerOps"
       ::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
   -> IO ())
vkCmdSetFragmentShadingRateEnumNVPtr 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 vkCmdSetFragmentShadingRateEnumNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkCmdSetFragmentShadingRateEnumNV' :: Ptr CommandBuffer_T
-> FragmentShadingRateNV
-> ("combinerOps"
    ::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ()
vkCmdSetFragmentShadingRateEnumNV' = FunPtr
  (Ptr CommandBuffer_T
   -> FragmentShadingRateNV
   -> ("combinerOps"
       ::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
   -> IO ())
-> Ptr CommandBuffer_T
-> FragmentShadingRateNV
-> ("combinerOps"
    ::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ()
mkVkCmdSetFragmentShadingRateEnumNV FunPtr
  (Ptr CommandBuffer_T
   -> FragmentShadingRateNV
   -> ("combinerOps"
       ::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
   -> IO ())
vkCmdSetFragmentShadingRateEnumNVPtr
  "combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)
pCombinerOps <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @(FixedArray 2 FragmentShadingRateCombinerOpKHR) Int
8
  let pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr "combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)
pCombinerOps
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ case ("combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
     FragmentShadingRateCombinerOpKHR)
combinerOps) of
    (FragmentShadingRateCombinerOpKHR
e0, FragmentShadingRateCombinerOpKHR
e1) -> do
      forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR) (FragmentShadingRateCombinerOpKHR
e0)
      forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr FragmentShadingRateCombinerOpKHR) (FragmentShadingRateCombinerOpKHR
e1)
  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
"vkCmdSetFragmentShadingRateEnumNV" (Ptr CommandBuffer_T
-> FragmentShadingRateNV
-> ("combinerOps"
    ::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ()
vkCmdSetFragmentShadingRateEnumNV'
                                                                 (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
                                                                 (FragmentShadingRateNV
shadingRate)
                                                                 ("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)
pCombinerOps))
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()


-- | VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV - Structure
-- indicating support for fragment shading rate enums
--
-- = Members
--
-- This structure describes the following features:
--
-- = Description
--
-- If the 'PhysicalDeviceFragmentShadingRateEnumsFeaturesNV' 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. 'PhysicalDeviceFragmentShadingRateEnumsFeaturesNV' /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_NV_fragment_shading_rate_enums VK_NV_fragment_shading_rate_enums>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceFragmentShadingRateEnumsFeaturesNV = PhysicalDeviceFragmentShadingRateEnumsFeaturesNV
  { -- | #features-fragmentShadingRateEnums# @fragmentShadingRateEnums@ indicates
    -- that the implementation supports specifying fragment shading rates using
    -- the 'FragmentShadingRateNV' enumerated type.
    PhysicalDeviceFragmentShadingRateEnumsFeaturesNV -> Bool
fragmentShadingRateEnums :: Bool
  , -- | #features-supersampleFragmentShadingRates#
    -- @supersampleFragmentShadingRates@ indicates that the implementation
    -- supports fragment shading rate enum values indicating more than one
    -- invocation per fragment.
    PhysicalDeviceFragmentShadingRateEnumsFeaturesNV -> Bool
supersampleFragmentShadingRates :: Bool
  , -- | #features-noInvocationFragmentShadingRates#
    -- @noInvocationFragmentShadingRates@ indicates that the implementation
    -- supports a fragment shading rate enum value indicating that no fragment
    -- shaders should be invoked when that shading rate is used.
    PhysicalDeviceFragmentShadingRateEnumsFeaturesNV -> Bool
noInvocationFragmentShadingRates :: Bool
  }
  deriving (Typeable, PhysicalDeviceFragmentShadingRateEnumsFeaturesNV
-> PhysicalDeviceFragmentShadingRateEnumsFeaturesNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceFragmentShadingRateEnumsFeaturesNV
-> PhysicalDeviceFragmentShadingRateEnumsFeaturesNV -> Bool
$c/= :: PhysicalDeviceFragmentShadingRateEnumsFeaturesNV
-> PhysicalDeviceFragmentShadingRateEnumsFeaturesNV -> Bool
== :: PhysicalDeviceFragmentShadingRateEnumsFeaturesNV
-> PhysicalDeviceFragmentShadingRateEnumsFeaturesNV -> Bool
$c== :: PhysicalDeviceFragmentShadingRateEnumsFeaturesNV
-> PhysicalDeviceFragmentShadingRateEnumsFeaturesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceFragmentShadingRateEnumsFeaturesNV)
#endif
deriving instance Show PhysicalDeviceFragmentShadingRateEnumsFeaturesNV

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

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

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

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


-- | VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV - Structure
-- describing fragment shading rate limits that can be supported by an
-- implementation
--
-- = Description
--
-- If the 'PhysicalDeviceFragmentShadingRateEnumsPropertiesNV' structure is
-- included in the @pNext@ chain of the
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2'
-- structure passed to
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceProperties2',
-- it is filled in with each corresponding implementation-dependent
-- property.
--
-- These properties are related to
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-fragment-shading-rate fragment shading rates>.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_fragment_shading_rate_enums VK_NV_fragment_shading_rate_enums>,
-- 'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceFragmentShadingRateEnumsPropertiesNV = PhysicalDeviceFragmentShadingRateEnumsPropertiesNV
  { -- | #limits-maxFragmentShadingRateInvocationCount#
    -- @maxFragmentShadingRateInvocationCount@ is a
    -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits' value
    -- indicating the maximum number of fragment shader invocations per
    -- fragment supported in pipeline, primitive, and attachment fragment
    -- shading rates.
    --
    -- #VUID-VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV-maxFragmentShadingRateInvocationCount-parameter#
    -- @maxFragmentShadingRateInvocationCount@ /must/ be a valid
    -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits' value
    PhysicalDeviceFragmentShadingRateEnumsPropertiesNV
-> SampleCountFlagBits
maxFragmentShadingRateInvocationCount :: SampleCountFlagBits }
  deriving (Typeable, PhysicalDeviceFragmentShadingRateEnumsPropertiesNV
-> PhysicalDeviceFragmentShadingRateEnumsPropertiesNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceFragmentShadingRateEnumsPropertiesNV
-> PhysicalDeviceFragmentShadingRateEnumsPropertiesNV -> Bool
$c/= :: PhysicalDeviceFragmentShadingRateEnumsPropertiesNV
-> PhysicalDeviceFragmentShadingRateEnumsPropertiesNV -> Bool
== :: PhysicalDeviceFragmentShadingRateEnumsPropertiesNV
-> PhysicalDeviceFragmentShadingRateEnumsPropertiesNV -> Bool
$c== :: PhysicalDeviceFragmentShadingRateEnumsPropertiesNV
-> PhysicalDeviceFragmentShadingRateEnumsPropertiesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceFragmentShadingRateEnumsPropertiesNV)
#endif
deriving instance Show PhysicalDeviceFragmentShadingRateEnumsPropertiesNV

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

instance FromCStruct PhysicalDeviceFragmentShadingRateEnumsPropertiesNV where
  peekCStruct :: Ptr PhysicalDeviceFragmentShadingRateEnumsPropertiesNV
-> IO PhysicalDeviceFragmentShadingRateEnumsPropertiesNV
peekCStruct Ptr PhysicalDeviceFragmentShadingRateEnumsPropertiesNV
p = do
    SampleCountFlagBits
maxFragmentShadingRateInvocationCount <- forall a. Storable a => Ptr a -> IO a
peek @SampleCountFlagBits ((Ptr PhysicalDeviceFragmentShadingRateEnumsPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SampleCountFlagBits))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ SampleCountFlagBits
-> PhysicalDeviceFragmentShadingRateEnumsPropertiesNV
PhysicalDeviceFragmentShadingRateEnumsPropertiesNV
             SampleCountFlagBits
maxFragmentShadingRateInvocationCount

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

instance Zero PhysicalDeviceFragmentShadingRateEnumsPropertiesNV where
  zero :: PhysicalDeviceFragmentShadingRateEnumsPropertiesNV
zero = SampleCountFlagBits
-> PhysicalDeviceFragmentShadingRateEnumsPropertiesNV
PhysicalDeviceFragmentShadingRateEnumsPropertiesNV
           forall a. Zero a => a
zero


-- | VkPipelineFragmentShadingRateEnumStateCreateInfoNV - Structure
-- specifying parameters controlling the fragment shading rate using rate
-- enums
--
-- = Description
--
-- If the @pNext@ chain of
-- 'Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' includes a
-- 'PipelineFragmentShadingRateEnumStateCreateInfoNV' structure, then that
-- structure includes parameters controlling the pipeline fragment shading
-- rate.
--
-- If this structure is not present, @shadingRateType@ is considered to be
-- equal to 'FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV', @shadingRate@ is
-- considered to be equal to
-- 'FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV', and both elements of
-- @combinerOps@ are considered to be equal to
-- 'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR'.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_fragment_shading_rate_enums VK_NV_fragment_shading_rate_enums>,
-- 'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FragmentShadingRateCombinerOpKHR',
-- 'FragmentShadingRateNV', 'FragmentShadingRateTypeNV',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PipelineFragmentShadingRateEnumStateCreateInfoNV = PipelineFragmentShadingRateEnumStateCreateInfoNV
  { -- | @shadingRateType@ specifies a 'FragmentShadingRateTypeNV' value
    -- indicating whether fragment shading rates are specified using fragment
    -- sizes or 'FragmentShadingRateNV' enums.
    PipelineFragmentShadingRateEnumStateCreateInfoNV
-> FragmentShadingRateTypeNV
shadingRateType :: FragmentShadingRateTypeNV
  , -- | @shadingRate@ specifies a 'FragmentShadingRateNV' value indicating the
    -- pipeline fragment shading rate.
    PipelineFragmentShadingRateEnumStateCreateInfoNV
-> FragmentShadingRateNV
shadingRate :: FragmentShadingRateNV
  , -- | @combinerOps@ specifies
    -- 'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FragmentShadingRateCombinerOpKHR'
    -- values determining how the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-fragment-shading-rate-pipeline pipeline>,
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-fragment-shading-rate-primitive primitive>,
    -- and
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-fragment-shading-rate-attachment attachment shading rates>
    -- are
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-fragment-shading-rate-combining combined>
    -- for fragments generated by drawing commands using the created pipeline.
    PipelineFragmentShadingRateEnumStateCreateInfoNV
-> "combinerOps"
   ::: (FragmentShadingRateCombinerOpKHR,
        FragmentShadingRateCombinerOpKHR)
combinerOps :: (FragmentShadingRateCombinerOpKHR, FragmentShadingRateCombinerOpKHR)
  }
  deriving (Typeable, PipelineFragmentShadingRateEnumStateCreateInfoNV
-> PipelineFragmentShadingRateEnumStateCreateInfoNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineFragmentShadingRateEnumStateCreateInfoNV
-> PipelineFragmentShadingRateEnumStateCreateInfoNV -> Bool
$c/= :: PipelineFragmentShadingRateEnumStateCreateInfoNV
-> PipelineFragmentShadingRateEnumStateCreateInfoNV -> Bool
== :: PipelineFragmentShadingRateEnumStateCreateInfoNV
-> PipelineFragmentShadingRateEnumStateCreateInfoNV -> Bool
$c== :: PipelineFragmentShadingRateEnumStateCreateInfoNV
-> PipelineFragmentShadingRateEnumStateCreateInfoNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineFragmentShadingRateEnumStateCreateInfoNV)
#endif
deriving instance Show PipelineFragmentShadingRateEnumStateCreateInfoNV

instance ToCStruct PipelineFragmentShadingRateEnumStateCreateInfoNV where
  withCStruct :: forall b.
PipelineFragmentShadingRateEnumStateCreateInfoNV
-> (Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV -> IO b)
-> IO b
withCStruct PipelineFragmentShadingRateEnumStateCreateInfoNV
x Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
p PipelineFragmentShadingRateEnumStateCreateInfoNV
x (Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV -> IO b
f Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
p)
  pokeCStruct :: forall b.
Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
-> PipelineFragmentShadingRateEnumStateCreateInfoNV -> IO b -> IO b
pokeCStruct Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
p PipelineFragmentShadingRateEnumStateCreateInfoNV{"combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
     FragmentShadingRateCombinerOpKHR)
FragmentShadingRateNV
FragmentShadingRateTypeNV
combinerOps :: "combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
     FragmentShadingRateCombinerOpKHR)
shadingRate :: FragmentShadingRateNV
shadingRateType :: FragmentShadingRateTypeNV
$sel:combinerOps:PipelineFragmentShadingRateEnumStateCreateInfoNV :: PipelineFragmentShadingRateEnumStateCreateInfoNV
-> "combinerOps"
   ::: (FragmentShadingRateCombinerOpKHR,
        FragmentShadingRateCombinerOpKHR)
$sel:shadingRate:PipelineFragmentShadingRateEnumStateCreateInfoNV :: PipelineFragmentShadingRateEnumStateCreateInfoNV
-> FragmentShadingRateNV
$sel:shadingRateType:PipelineFragmentShadingRateEnumStateCreateInfoNV :: PipelineFragmentShadingRateEnumStateCreateInfoNV
-> FragmentShadingRateTypeNV
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
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 PipelineFragmentShadingRateEnumStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr FragmentShadingRateTypeNV)) (FragmentShadingRateTypeNV
shadingRateType)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr FragmentShadingRateNV)) (FragmentShadingRateNV
shadingRate)
    let pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)))
    case ("combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
     FragmentShadingRateCombinerOpKHR)
combinerOps) of
      (FragmentShadingRateCombinerOpKHR
e0, FragmentShadingRateCombinerOpKHR
e1) -> do
        forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR) (FragmentShadingRateCombinerOpKHR
e0)
        forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr FragmentShadingRateCombinerOpKHR) (FragmentShadingRateCombinerOpKHR
e1)
    IO b
f
  cStructSize :: Int
cStructSize = Int
32
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
-> IO b -> IO b
pokeZeroCStruct Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
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 PipelineFragmentShadingRateEnumStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr FragmentShadingRateTypeNV)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr FragmentShadingRateNV)) (forall a. Zero a => a
zero)
    let pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)))
    case ((forall a. Zero a => a
zero, forall a. Zero a => a
zero)) of
      (FragmentShadingRateCombinerOpKHR
e0, FragmentShadingRateCombinerOpKHR
e1) -> do
        forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR) (FragmentShadingRateCombinerOpKHR
e0)
        forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr FragmentShadingRateCombinerOpKHR) (FragmentShadingRateCombinerOpKHR
e1)
    IO b
f

instance FromCStruct PipelineFragmentShadingRateEnumStateCreateInfoNV where
  peekCStruct :: Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
-> IO PipelineFragmentShadingRateEnumStateCreateInfoNV
peekCStruct Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
p = do
    FragmentShadingRateTypeNV
shadingRateType <- forall a. Storable a => Ptr a -> IO a
peek @FragmentShadingRateTypeNV ((Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr FragmentShadingRateTypeNV))
    FragmentShadingRateNV
shadingRate <- forall a. Storable a => Ptr a -> IO a
peek @FragmentShadingRateNV ((Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr FragmentShadingRateNV))
    let pcombinerOps :: Ptr FragmentShadingRateCombinerOpKHR
pcombinerOps = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @FragmentShadingRateCombinerOpKHR ((Ptr PipelineFragmentShadingRateEnumStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)))
    FragmentShadingRateCombinerOpKHR
combinerOps0 <- forall a. Storable a => Ptr a -> IO a
peek @FragmentShadingRateCombinerOpKHR ((Ptr FragmentShadingRateCombinerOpKHR
pcombinerOps forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
0 :: Ptr FragmentShadingRateCombinerOpKHR))
    FragmentShadingRateCombinerOpKHR
combinerOps1 <- forall a. Storable a => Ptr a -> IO a
peek @FragmentShadingRateCombinerOpKHR ((Ptr FragmentShadingRateCombinerOpKHR
pcombinerOps forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
4 :: Ptr FragmentShadingRateCombinerOpKHR))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ FragmentShadingRateTypeNV
-> FragmentShadingRateNV
-> ("combinerOps"
    ::: (FragmentShadingRateCombinerOpKHR,
         FragmentShadingRateCombinerOpKHR))
-> PipelineFragmentShadingRateEnumStateCreateInfoNV
PipelineFragmentShadingRateEnumStateCreateInfoNV
             FragmentShadingRateTypeNV
shadingRateType FragmentShadingRateNV
shadingRate ((FragmentShadingRateCombinerOpKHR
combinerOps0, FragmentShadingRateCombinerOpKHR
combinerOps1))

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

instance Zero PipelineFragmentShadingRateEnumStateCreateInfoNV where
  zero :: PipelineFragmentShadingRateEnumStateCreateInfoNV
zero = FragmentShadingRateTypeNV
-> FragmentShadingRateNV
-> ("combinerOps"
    ::: (FragmentShadingRateCombinerOpKHR,
         FragmentShadingRateCombinerOpKHR))
-> PipelineFragmentShadingRateEnumStateCreateInfoNV
PipelineFragmentShadingRateEnumStateCreateInfoNV
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           (forall a. Zero a => a
zero, forall a. Zero a => a
zero)


-- | VkFragmentShadingRateNV - Enumeration with fragment shading rates
--
-- = Description
--
-- To use the shading rates
-- 'FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV',
-- 'FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV',
-- 'FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV', and
-- 'FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV' as a pipeline,
-- primitive, or attachment shading rate, the
-- @supersampleFragmentShadingRates@ feature /must/ be enabled. To use the
-- shading rate 'FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV' as a pipeline,
-- primitive, or attachment shading rate, the
-- @noInvocationFragmentShadingRates@ feature /must/ be enabled.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_fragment_shading_rate_enums VK_NV_fragment_shading_rate_enums>,
-- 'PipelineFragmentShadingRateEnumStateCreateInfoNV',
-- 'cmdSetFragmentShadingRateEnumNV'
newtype FragmentShadingRateNV = FragmentShadingRateNV Int32
  deriving newtype (FragmentShadingRateNV -> FragmentShadingRateNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FragmentShadingRateNV -> FragmentShadingRateNV -> Bool
$c/= :: FragmentShadingRateNV -> FragmentShadingRateNV -> Bool
== :: FragmentShadingRateNV -> FragmentShadingRateNV -> Bool
$c== :: FragmentShadingRateNV -> FragmentShadingRateNV -> Bool
Eq, Eq FragmentShadingRateNV
FragmentShadingRateNV -> FragmentShadingRateNV -> Bool
FragmentShadingRateNV -> FragmentShadingRateNV -> Ordering
FragmentShadingRateNV
-> FragmentShadingRateNV -> FragmentShadingRateNV
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 :: FragmentShadingRateNV
-> FragmentShadingRateNV -> FragmentShadingRateNV
$cmin :: FragmentShadingRateNV
-> FragmentShadingRateNV -> FragmentShadingRateNV
max :: FragmentShadingRateNV
-> FragmentShadingRateNV -> FragmentShadingRateNV
$cmax :: FragmentShadingRateNV
-> FragmentShadingRateNV -> FragmentShadingRateNV
>= :: FragmentShadingRateNV -> FragmentShadingRateNV -> Bool
$c>= :: FragmentShadingRateNV -> FragmentShadingRateNV -> Bool
> :: FragmentShadingRateNV -> FragmentShadingRateNV -> Bool
$c> :: FragmentShadingRateNV -> FragmentShadingRateNV -> Bool
<= :: FragmentShadingRateNV -> FragmentShadingRateNV -> Bool
$c<= :: FragmentShadingRateNV -> FragmentShadingRateNV -> Bool
< :: FragmentShadingRateNV -> FragmentShadingRateNV -> Bool
$c< :: FragmentShadingRateNV -> FragmentShadingRateNV -> Bool
compare :: FragmentShadingRateNV -> FragmentShadingRateNV -> Ordering
$ccompare :: FragmentShadingRateNV -> FragmentShadingRateNV -> Ordering
Ord, Ptr FragmentShadingRateNV -> IO FragmentShadingRateNV
Ptr FragmentShadingRateNV -> Int -> IO FragmentShadingRateNV
Ptr FragmentShadingRateNV -> Int -> FragmentShadingRateNV -> IO ()
Ptr FragmentShadingRateNV -> FragmentShadingRateNV -> IO ()
FragmentShadingRateNV -> Int
forall b. Ptr b -> Int -> IO FragmentShadingRateNV
forall b. Ptr b -> Int -> FragmentShadingRateNV -> 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 FragmentShadingRateNV -> FragmentShadingRateNV -> IO ()
$cpoke :: Ptr FragmentShadingRateNV -> FragmentShadingRateNV -> IO ()
peek :: Ptr FragmentShadingRateNV -> IO FragmentShadingRateNV
$cpeek :: Ptr FragmentShadingRateNV -> IO FragmentShadingRateNV
pokeByteOff :: forall b. Ptr b -> Int -> FragmentShadingRateNV -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> FragmentShadingRateNV -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO FragmentShadingRateNV
$cpeekByteOff :: forall b. Ptr b -> Int -> IO FragmentShadingRateNV
pokeElemOff :: Ptr FragmentShadingRateNV -> Int -> FragmentShadingRateNV -> IO ()
$cpokeElemOff :: Ptr FragmentShadingRateNV -> Int -> FragmentShadingRateNV -> IO ()
peekElemOff :: Ptr FragmentShadingRateNV -> Int -> IO FragmentShadingRateNV
$cpeekElemOff :: Ptr FragmentShadingRateNV -> Int -> IO FragmentShadingRateNV
alignment :: FragmentShadingRateNV -> Int
$calignment :: FragmentShadingRateNV -> Int
sizeOf :: FragmentShadingRateNV -> Int
$csizeOf :: FragmentShadingRateNV -> Int
Storable, FragmentShadingRateNV
forall a. a -> Zero a
zero :: FragmentShadingRateNV
$czero :: FragmentShadingRateNV
Zero)

-- | 'FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV' specifies a fragment
-- size of 1x1 pixels.
pattern $bFRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV :: FragmentShadingRateNV
$mFRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV :: forall {r}.
FragmentShadingRateNV -> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV = FragmentShadingRateNV 0

-- | 'FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV' specifies a
-- fragment size of 1x2 pixels.
pattern $bFRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV :: FragmentShadingRateNV
$mFRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV :: forall {r}.
FragmentShadingRateNV -> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV = FragmentShadingRateNV 1

-- | 'FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV' specifies a
-- fragment size of 2x1 pixels.
pattern $bFRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV :: FragmentShadingRateNV
$mFRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV :: forall {r}.
FragmentShadingRateNV -> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV = FragmentShadingRateNV 4

-- | 'FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV' specifies a
-- fragment size of 2x2 pixels.
pattern $bFRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV :: FragmentShadingRateNV
$mFRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV :: forall {r}.
FragmentShadingRateNV -> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV = FragmentShadingRateNV 5

-- | 'FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV' specifies a
-- fragment size of 2x4 pixels.
pattern $bFRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV :: FragmentShadingRateNV
$mFRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV :: forall {r}.
FragmentShadingRateNV -> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV = FragmentShadingRateNV 6

-- | 'FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV' specifies a
-- fragment size of 4x2 pixels.
pattern $bFRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV :: FragmentShadingRateNV
$mFRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV :: forall {r}.
FragmentShadingRateNV -> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV = FragmentShadingRateNV 9

-- | 'FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV' specifies a
-- fragment size of 4x4 pixels.
pattern $bFRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV :: FragmentShadingRateNV
$mFRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV :: forall {r}.
FragmentShadingRateNV -> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV = FragmentShadingRateNV 10

-- | 'FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV' specifies a fragment
-- size of 1x1 pixels, with two fragment shader invocations per fragment.
pattern $bFRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV :: FragmentShadingRateNV
$mFRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV :: forall {r}.
FragmentShadingRateNV -> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV = FragmentShadingRateNV 11

-- | 'FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV' specifies a fragment
-- size of 1x1 pixels, with four fragment shader invocations per fragment.
pattern $bFRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV :: FragmentShadingRateNV
$mFRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV :: forall {r}.
FragmentShadingRateNV -> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV = FragmentShadingRateNV 12

-- | 'FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV' specifies a fragment
-- size of 1x1 pixels, with eight fragment shader invocations per fragment.
pattern $bFRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV :: FragmentShadingRateNV
$mFRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV :: forall {r}.
FragmentShadingRateNV -> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV = FragmentShadingRateNV 13

-- | 'FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV' specifies a fragment
-- size of 1x1 pixels, with sixteen fragment shader invocations per
-- fragment.
pattern $bFRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV :: FragmentShadingRateNV
$mFRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV :: forall {r}.
FragmentShadingRateNV -> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV = FragmentShadingRateNV 14

-- | 'FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV' specifies that any portions of
-- a primitive that use that shading rate should be discarded without
-- invoking any fragment shader.
pattern $bFRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV :: FragmentShadingRateNV
$mFRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV :: forall {r}.
FragmentShadingRateNV -> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV = FragmentShadingRateNV 15

{-# COMPLETE
  FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV
  , FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV
  , FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV
  , FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV
  , FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV
  , FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV
  , FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV
  , FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV
  , FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV
  , FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV
  , FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV
  , FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV ::
    FragmentShadingRateNV
  #-}

conNameFragmentShadingRateNV :: String
conNameFragmentShadingRateNV :: String
conNameFragmentShadingRateNV = String
"FragmentShadingRateNV"

enumPrefixFragmentShadingRateNV :: String
enumPrefixFragmentShadingRateNV :: String
enumPrefixFragmentShadingRateNV = String
"FRAGMENT_SHADING_RATE_"

showTableFragmentShadingRateNV :: [(FragmentShadingRateNV, String)]
showTableFragmentShadingRateNV :: [(FragmentShadingRateNV, String)]
showTableFragmentShadingRateNV =
  [
    ( FragmentShadingRateNV
FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV
    , String
"1_INVOCATION_PER_PIXEL_NV"
    )
  ,
    ( FragmentShadingRateNV
FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV
    , String
"1_INVOCATION_PER_1X2_PIXELS_NV"
    )
  ,
    ( FragmentShadingRateNV
FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV
    , String
"1_INVOCATION_PER_2X1_PIXELS_NV"
    )
  ,
    ( FragmentShadingRateNV
FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV
    , String
"1_INVOCATION_PER_2X2_PIXELS_NV"
    )
  ,
    ( FragmentShadingRateNV
FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV
    , String
"1_INVOCATION_PER_2X4_PIXELS_NV"
    )
  ,
    ( FragmentShadingRateNV
FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV
    , String
"1_INVOCATION_PER_4X2_PIXELS_NV"
    )
  ,
    ( FragmentShadingRateNV
FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV
    , String
"1_INVOCATION_PER_4X4_PIXELS_NV"
    )
  ,
    ( FragmentShadingRateNV
FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV
    , String
"2_INVOCATIONS_PER_PIXEL_NV"
    )
  ,
    ( FragmentShadingRateNV
FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV
    , String
"4_INVOCATIONS_PER_PIXEL_NV"
    )
  ,
    ( FragmentShadingRateNV
FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV
    , String
"8_INVOCATIONS_PER_PIXEL_NV"
    )
  ,
    ( FragmentShadingRateNV
FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV
    , String
"16_INVOCATIONS_PER_PIXEL_NV"
    )
  ,
    ( FragmentShadingRateNV
FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV
    , String
"NO_INVOCATIONS_NV"
    )
  ]

instance Show FragmentShadingRateNV where
  showsPrec :: Int -> FragmentShadingRateNV -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixFragmentShadingRateNV
      [(FragmentShadingRateNV, String)]
showTableFragmentShadingRateNV
      String
conNameFragmentShadingRateNV
      (\(FragmentShadingRateNV Int32
x) -> Int32
x)
      (forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read FragmentShadingRateNV where
  readPrec :: ReadPrec FragmentShadingRateNV
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixFragmentShadingRateNV
      [(FragmentShadingRateNV, String)]
showTableFragmentShadingRateNV
      String
conNameFragmentShadingRateNV
      Int32 -> FragmentShadingRateNV
FragmentShadingRateNV

-- | VkFragmentShadingRateTypeNV - Enumeration with fragment shading rate
-- types
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_fragment_shading_rate_enums VK_NV_fragment_shading_rate_enums>,
-- 'PipelineFragmentShadingRateEnumStateCreateInfoNV'
newtype FragmentShadingRateTypeNV = FragmentShadingRateTypeNV Int32
  deriving newtype (FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> Bool
$c/= :: FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> Bool
== :: FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> Bool
$c== :: FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> Bool
Eq, Eq FragmentShadingRateTypeNV
FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> Bool
FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> Ordering
FragmentShadingRateTypeNV
-> FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV
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 :: FragmentShadingRateTypeNV
-> FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV
$cmin :: FragmentShadingRateTypeNV
-> FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV
max :: FragmentShadingRateTypeNV
-> FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV
$cmax :: FragmentShadingRateTypeNV
-> FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV
>= :: FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> Bool
$c>= :: FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> Bool
> :: FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> Bool
$c> :: FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> Bool
<= :: FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> Bool
$c<= :: FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> Bool
< :: FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> Bool
$c< :: FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> Bool
compare :: FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> Ordering
$ccompare :: FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> Ordering
Ord, Ptr FragmentShadingRateTypeNV -> IO FragmentShadingRateTypeNV
Ptr FragmentShadingRateTypeNV
-> Int -> IO FragmentShadingRateTypeNV
Ptr FragmentShadingRateTypeNV
-> Int -> FragmentShadingRateTypeNV -> IO ()
Ptr FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> IO ()
FragmentShadingRateTypeNV -> Int
forall b. Ptr b -> Int -> IO FragmentShadingRateTypeNV
forall b. Ptr b -> Int -> FragmentShadingRateTypeNV -> 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 FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> IO ()
$cpoke :: Ptr FragmentShadingRateTypeNV -> FragmentShadingRateTypeNV -> IO ()
peek :: Ptr FragmentShadingRateTypeNV -> IO FragmentShadingRateTypeNV
$cpeek :: Ptr FragmentShadingRateTypeNV -> IO FragmentShadingRateTypeNV
pokeByteOff :: forall b. Ptr b -> Int -> FragmentShadingRateTypeNV -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> FragmentShadingRateTypeNV -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO FragmentShadingRateTypeNV
$cpeekByteOff :: forall b. Ptr b -> Int -> IO FragmentShadingRateTypeNV
pokeElemOff :: Ptr FragmentShadingRateTypeNV
-> Int -> FragmentShadingRateTypeNV -> IO ()
$cpokeElemOff :: Ptr FragmentShadingRateTypeNV
-> Int -> FragmentShadingRateTypeNV -> IO ()
peekElemOff :: Ptr FragmentShadingRateTypeNV
-> Int -> IO FragmentShadingRateTypeNV
$cpeekElemOff :: Ptr FragmentShadingRateTypeNV
-> Int -> IO FragmentShadingRateTypeNV
alignment :: FragmentShadingRateTypeNV -> Int
$calignment :: FragmentShadingRateTypeNV -> Int
sizeOf :: FragmentShadingRateTypeNV -> Int
$csizeOf :: FragmentShadingRateTypeNV -> Int
Storable, FragmentShadingRateTypeNV
forall a. a -> Zero a
zero :: FragmentShadingRateTypeNV
$czero :: FragmentShadingRateTypeNV
Zero)

-- | 'FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV' specifies that a graphics
-- pipeline should obtain its pipeline fragment shading rate and shading
-- rate combiner state from the
-- 'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'
-- structure and that any state specified by the
-- 'PipelineFragmentShadingRateEnumStateCreateInfoNV' structure should be
-- ignored.
pattern $bFRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV :: FragmentShadingRateTypeNV
$mFRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV :: forall {r}.
FragmentShadingRateTypeNV -> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV = FragmentShadingRateTypeNV 0

-- | 'FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV' specifies that a graphics pipeline
-- should obtain its pipeline fragment shading rate and shading rate
-- combiner state from the
-- 'PipelineFragmentShadingRateEnumStateCreateInfoNV' structure and that
-- any state specified by the
-- 'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'
-- structure should be ignored.
pattern $bFRAGMENT_SHADING_RATE_TYPE_ENUMS_NV :: FragmentShadingRateTypeNV
$mFRAGMENT_SHADING_RATE_TYPE_ENUMS_NV :: forall {r}.
FragmentShadingRateTypeNV -> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV = FragmentShadingRateTypeNV 1

{-# COMPLETE
  FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV
  , FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV ::
    FragmentShadingRateTypeNV
  #-}

conNameFragmentShadingRateTypeNV :: String
conNameFragmentShadingRateTypeNV :: String
conNameFragmentShadingRateTypeNV = String
"FragmentShadingRateTypeNV"

enumPrefixFragmentShadingRateTypeNV :: String
enumPrefixFragmentShadingRateTypeNV :: String
enumPrefixFragmentShadingRateTypeNV = String
"FRAGMENT_SHADING_RATE_TYPE_"

showTableFragmentShadingRateTypeNV :: [(FragmentShadingRateTypeNV, String)]
showTableFragmentShadingRateTypeNV :: [(FragmentShadingRateTypeNV, String)]
showTableFragmentShadingRateTypeNV =
  [
    ( FragmentShadingRateTypeNV
FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV
    , String
"FRAGMENT_SIZE_NV"
    )
  ,
    ( FragmentShadingRateTypeNV
FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV
    , String
"ENUMS_NV"
    )
  ]

instance Show FragmentShadingRateTypeNV where
  showsPrec :: Int -> FragmentShadingRateTypeNV -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixFragmentShadingRateTypeNV
      [(FragmentShadingRateTypeNV, String)]
showTableFragmentShadingRateTypeNV
      String
conNameFragmentShadingRateTypeNV
      (\(FragmentShadingRateTypeNV Int32
x) -> Int32
x)
      (forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read FragmentShadingRateTypeNV where
  readPrec :: ReadPrec FragmentShadingRateTypeNV
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixFragmentShadingRateTypeNV
      [(FragmentShadingRateTypeNV, String)]
showTableFragmentShadingRateTypeNV
      String
conNameFragmentShadingRateTypeNV
      Int32 -> FragmentShadingRateTypeNV
FragmentShadingRateTypeNV

type NV_FRAGMENT_SHADING_RATE_ENUMS_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_NV_FRAGMENT_SHADING_RATE_ENUMS_SPEC_VERSION"
pattern NV_FRAGMENT_SHADING_RATE_ENUMS_SPEC_VERSION :: forall a . Integral a => a
pattern $bNV_FRAGMENT_SHADING_RATE_ENUMS_SPEC_VERSION :: forall a. Integral a => a
$mNV_FRAGMENT_SHADING_RATE_ENUMS_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NV_FRAGMENT_SHADING_RATE_ENUMS_SPEC_VERSION = 1


type NV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME = "VK_NV_fragment_shading_rate_enums"

-- No documentation found for TopLevel "VK_NV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME"
pattern NV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bNV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mNV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME = "VK_NV_fragment_shading_rate_enums"