{-# language CPP #-}
-- | = Name
--
-- VK_KHR_fragment_shading_rate - device extension
--
-- == VK_KHR_fragment_shading_rate
--
-- [__Name String__]
--     @VK_KHR_fragment_shading_rate@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     227
--
-- [__Revision__]
--     2
--
-- [__Ratification Status__]
--     Ratified
--
-- [__Extension and Version Dependencies__]
--         
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_create_renderpass2 VK_KHR_create_renderpass2>
--          or
--         
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#versions-1.2 Version 1.2>
--     and
--         
--     <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>
--          or
--         
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#versions-1.1 Version 1.1>
--
-- [__Contact__]
--
--     -   Tobias Hector
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_KHR_fragment_shading_rate] @tobski%0A*Here describe the issue or question you have about the VK_KHR_fragment_shading_rate extension* >
--
-- [__Extension Proposal__]
--     <https://github.com/KhronosGroup/Vulkan-Docs/tree/main/proposals/VK_KHR_fragment_shading_rate.adoc VK_KHR_fragment_shading_rate>
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2021-09-30
--
-- [__Interactions and External Dependencies__]
--
--     -   This extension requires
--         <https://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/master/extensions/KHR/SPV_KHR_fragment_shading_rate.html SPV_KHR_fragment_shading_rate>.
--
--     -   This extension provides API support for
--         <https://github.com/KhronosGroup/GLSL/blob/master/extensions/ext/GLSL_EXT_fragment_shading_rate.txt GL_EXT_fragment_shading_rate>
--
-- [__Contributors__]
--
--     -   Tobias Hector, AMD
--
--     -   Guennadi Riguer, AMD
--
--     -   Matthaeus Chajdas, AMD
--
--     -   Pat Brown, Nvidia
--
--     -   Matthew Netsch, Qualcomm
--
--     -   Slawomir Grajewski, Intel
--
--     -   Jan-Harald Fredriksen, Arm
--
--     -   Jeff Bolz, Nvidia
--
--     -   Arseny Kapoulkine, Roblox
--
--     -   Contributors to the VK_NV_shading_rate_image specification
--
--     -   Contributors to the VK_EXT_fragment_density_map specification
--
-- == Description
--
-- This extension adds the ability to change the rate at which fragments
-- are shaded. Rather than the usual single fragment invocation for each
-- pixel covered by a primitive, multiple pixels can be shaded by a single
-- fragment shader invocation.
--
-- Up to three methods are available to the application to change the
-- fragment shading rate:
--
-- -   <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-fragment-shading-rate-pipeline>,
--     which allows the specification of a rate per-draw.
--
-- -   <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-fragment-shading-rate-primitive>,
--     which allows the specification of a rate per primitive, specified
--     during shading.
--
-- -   <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-fragment-shading-rate-attachment>,
--     which allows the specification of a rate per-region of the
--     framebuffer, specified in a specialized image attachment.
--
-- Additionally, these rates can all be specified and combined in order to
-- adjust the overall detail in the image at each point.
--
-- This functionality can be used to focus shading efforts where higher
-- levels of detail are needed in some parts of a scene compared to others.
-- This can be particularly useful in high resolution rendering, or for XR
-- contexts.
--
-- This extension also adds support for the @SPV_KHR_fragment_shading_rate@
-- extension which enables setting the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-fragment-shading-rate-primitive primitive fragment shading rate>,
-- and allows querying the final shading rate from a fragment shader.
--
-- == New Commands
--
-- -   'cmdSetFragmentShadingRateKHR'
--
-- -   'getPhysicalDeviceFragmentShadingRatesKHR'
--
-- == New Structures
--
-- -   'PhysicalDeviceFragmentShadingRateKHR'
--
-- -   Extending 'Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo':
--
--     -   'PipelineFragmentShadingRateStateCreateInfoKHR'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
--     'Vulkan.Core10.Device.DeviceCreateInfo':
--
--     -   'PhysicalDeviceFragmentShadingRateFeaturesKHR'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2':
--
--     -   'PhysicalDeviceFragmentShadingRatePropertiesKHR'
--
-- -   Extending
--     'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.SubpassDescription2':
--
--     -   'FragmentShadingRateAttachmentInfoKHR'
--
-- == New Enums
--
-- -   'FragmentShadingRateCombinerOpKHR'
--
-- == New Enum Constants
--
-- -   'KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME'
--
-- -   'KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.AccessFlagBits.AccessFlagBits':
--
--     -   'Vulkan.Core10.Enums.AccessFlagBits.ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR'
--
-- -   Extending 'Vulkan.Core10.Enums.DynamicState.DynamicState':
--
--     -   'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--
-- -   Extending
--     'Vulkan.Core10.Enums.FormatFeatureFlagBits.FormatFeatureFlagBits':
--
--     -   'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR'
--
-- -   Extending 'Vulkan.Core10.Enums.ImageLayout.ImageLayout':
--
--     -   'Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR'
--
-- -   Extending
--     'Vulkan.Core10.Enums.ImageUsageFlagBits.ImageUsageFlagBits':
--
--     -   'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR'
--
-- -   Extending
--     'Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits':
--
--     -   'Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR'
--
-- If
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_format_feature_flags2 VK_KHR_format_feature_flags2>
-- is supported:
--
-- -   Extending
--     'Vulkan.Core13.Enums.FormatFeatureFlags2.FormatFeatureFlagBits2':
--
--     -   'Vulkan.Core13.Enums.FormatFeatureFlags2.FORMAT_FEATURE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR'
--
-- == Version History
--
-- -   Revision 1, 2020-05-06 (Tobias Hector)
--
--     -   Initial revision
--
-- -   Revision 2, 2021-09-30 (Jon Leech)
--
--     -   Add interaction with @VK_KHR_format_feature_flags2@ to @vk.xml@
--
-- == See Also
--
-- 'FragmentShadingRateAttachmentInfoKHR',
-- 'FragmentShadingRateCombinerOpKHR',
-- 'PhysicalDeviceFragmentShadingRateFeaturesKHR',
-- 'PhysicalDeviceFragmentShadingRateKHR',
-- 'PhysicalDeviceFragmentShadingRatePropertiesKHR',
-- 'PipelineFragmentShadingRateStateCreateInfoKHR',
-- 'cmdSetFragmentShadingRateKHR',
-- 'getPhysicalDeviceFragmentShadingRatesKHR'
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VK_KHR_fragment_shading_rate Vulkan Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_KHR_fragment_shading_rate  ( cmdSetFragmentShadingRateKHR
                                                       , getPhysicalDeviceFragmentShadingRatesKHR
                                                       , FragmentShadingRateAttachmentInfoKHR(..)
                                                       , PipelineFragmentShadingRateStateCreateInfoKHR(..)
                                                       , PhysicalDeviceFragmentShadingRateFeaturesKHR(..)
                                                       , PhysicalDeviceFragmentShadingRatePropertiesKHR(..)
                                                       , PhysicalDeviceFragmentShadingRateKHR(..)
                                                       , FragmentShadingRateCombinerOpKHR( FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR
                                                                                         , FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR
                                                                                         , FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR
                                                                                         , FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR
                                                                                         , FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR
                                                                                         , ..
                                                                                         )
                                                       , KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION
                                                       , pattern KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION
                                                       , KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME
                                                       , pattern KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME
                                                       ) where

import Vulkan.CStruct.Utils (FixedArray)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import Foreign.Marshal.Utils (maybePeek)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (castPtr)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showsPrec)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Data.Vector (generateM)
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.Word (Word32)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.CStruct.Extends (forgetExtensions)
import Vulkan.CStruct.Utils (lowerArrayPtr)
import Vulkan.CStruct.Extends (peekSomeCStruct)
import Vulkan.CStruct.Extends (withSomeCStruct)
import Vulkan.NamedType ((:::))
import Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2 (AttachmentReference2)
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(pVkCmdSetFragmentShadingRateKHR))
import Vulkan.Core10.FundamentalTypes (Extent2D)
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceFragmentShadingRatesKHR))
import Vulkan.Core10.Handles (PhysicalDevice)
import Vulkan.Core10.Handles (PhysicalDevice(..))
import Vulkan.Core10.Handles (PhysicalDevice(PhysicalDevice))
import Vulkan.Core10.Handles (PhysicalDevice_T)
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Core10.Enums.SampleCountFlagBits (SampleCountFlagBits)
import Vulkan.Core10.Enums.SampleCountFlagBits (SampleCountFlags)
import Vulkan.CStruct.Extends (SomeStruct)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCmdSetFragmentShadingRateKHR
  :: FunPtr (Ptr CommandBuffer_T -> Ptr Extent2D -> Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR) -> IO ()) -> Ptr CommandBuffer_T -> Ptr Extent2D -> Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR) -> IO ()

-- | vkCmdSetFragmentShadingRateKHR - Set pipeline fragment shading rate and
-- combiner operation dynamically for a command buffer
--
-- = 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
-- 'PipelineFragmentShadingRateStateCreateInfoKHR' values used to create
-- the currently active pipeline.
--
-- == Valid Usage
--
-- -   #VUID-vkCmdSetFragmentShadingRateKHR-pipelineFragmentShadingRate-04507#
--     If
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-pipelineFragmentShadingRate pipelineFragmentShadingRate>
--     is not enabled, @pFragmentSize->width@ /must/ be @1@
--
-- -   #VUID-vkCmdSetFragmentShadingRateKHR-pipelineFragmentShadingRate-04508#
--     If
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-pipelineFragmentShadingRate pipelineFragmentShadingRate>
--     is not enabled, @pFragmentSize->height@ /must/ be @1@
--
-- -   #VUID-vkCmdSetFragmentShadingRateKHR-pipelineFragmentShadingRate-04509#
--     One of
--     <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>
--     /must/ be enabled
--
-- -   #VUID-vkCmdSetFragmentShadingRateKHR-primitiveFragmentShadingRate-04510#
--     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
--     'FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR'
--
-- -   #VUID-vkCmdSetFragmentShadingRateKHR-attachmentFragmentShadingRate-04511#
--     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
--     'FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR'
--
-- -   #VUID-vkCmdSetFragmentShadingRateKHR-fragmentSizeNonTrivialCombinerOps-04512#
--     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
--     'FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR' or
--     'FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR'
--
-- -   #VUID-vkCmdSetFragmentShadingRateKHR-pFragmentSize-04513#
--     @pFragmentSize->width@ /must/ be greater than or equal to @1@
--
-- -   #VUID-vkCmdSetFragmentShadingRateKHR-pFragmentSize-04514#
--     @pFragmentSize->height@ /must/ be greater than or equal to @1@
--
-- -   #VUID-vkCmdSetFragmentShadingRateKHR-pFragmentSize-04515#
--     @pFragmentSize->width@ /must/ be a power-of-two value
--
-- -   #VUID-vkCmdSetFragmentShadingRateKHR-pFragmentSize-04516#
--     @pFragmentSize->height@ /must/ be a power-of-two value
--
-- -   #VUID-vkCmdSetFragmentShadingRateKHR-pFragmentSize-04517#
--     @pFragmentSize->width@ /must/ be less than or equal to @4@
--
-- -   #VUID-vkCmdSetFragmentShadingRateKHR-pFragmentSize-04518#
--     @pFragmentSize->height@ /must/ be less than or equal to @4@
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCmdSetFragmentShadingRateKHR-commandBuffer-parameter#
--     @commandBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.CommandBuffer' handle
--
-- -   #VUID-vkCmdSetFragmentShadingRateKHR-pFragmentSize-parameter#
--     @pFragmentSize@ /must/ be a valid pointer to a valid
--     'Vulkan.Core10.FundamentalTypes.Extent2D' structure
--
-- -   #VUID-vkCmdSetFragmentShadingRateKHR-combinerOps-parameter# Each
--     element of @combinerOps@ /must/ be a valid
--     'FragmentShadingRateCombinerOpKHR' value
--
-- -   #VUID-vkCmdSetFragmentShadingRateKHR-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-vkCmdSetFragmentShadingRateKHR-commandBuffer-cmdpool# The
--     'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was
--     allocated from /must/ support graphics operations
--
-- -   #VUID-vkCmdSetFragmentShadingRateKHR-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_KHR_fragment_shading_rate VK_KHR_fragment_shading_rate>,
-- 'Vulkan.Core10.Handles.CommandBuffer',
-- 'Vulkan.Core10.FundamentalTypes.Extent2D',
-- 'FragmentShadingRateCombinerOpKHR'
cmdSetFragmentShadingRateKHR :: forall io
                              . (MonadIO io)
                             => -- | @commandBuffer@ is the command buffer into which the command will be
                                -- recorded.
                                CommandBuffer
                             -> -- | @pFragmentSize@ specifies the pipeline fragment shading rate for
                                -- subsequent drawing commands.
                                ("fragmentSize" ::: Extent2D)
                             -> -- | @combinerOps@ specifies a '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 ()
cmdSetFragmentShadingRateKHR :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> ("fragmentSize" ::: Extent2D)
-> ("combinerOps"
    ::: (FragmentShadingRateCombinerOpKHR,
         FragmentShadingRateCombinerOpKHR))
-> io ()
cmdSetFragmentShadingRateKHR CommandBuffer
commandBuffer
                               "fragmentSize" ::: Extent2D
fragmentSize
                               "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 vkCmdSetFragmentShadingRateKHRPtr :: FunPtr
  (Ptr CommandBuffer_T
   -> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
   -> ("combinerOps"
       ::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
   -> IO ())
vkCmdSetFragmentShadingRateKHRPtr = DeviceCmds
-> FunPtr
     (Ptr CommandBuffer_T
      -> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
      -> ("combinerOps"
          ::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
      -> IO ())
pVkCmdSetFragmentShadingRateKHR (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
   -> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
   -> ("combinerOps"
       ::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
   -> IO ())
vkCmdSetFragmentShadingRateKHRPtr 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 vkCmdSetFragmentShadingRateKHR is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkCmdSetFragmentShadingRateKHR' :: Ptr CommandBuffer_T
-> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("combinerOps"
    ::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ()
vkCmdSetFragmentShadingRateKHR' = FunPtr
  (Ptr CommandBuffer_T
   -> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
   -> ("combinerOps"
       ::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
   -> IO ())
-> Ptr CommandBuffer_T
-> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("combinerOps"
    ::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ()
mkVkCmdSetFragmentShadingRateKHR FunPtr
  (Ptr CommandBuffer_T
   -> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
   -> ("combinerOps"
       ::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
   -> IO ())
vkCmdSetFragmentShadingRateKHRPtr
  "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
pFragmentSize <- 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 ("fragmentSize" ::: Extent2D
fragmentSize)
  "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
"vkCmdSetFragmentShadingRateKHR" (Ptr CommandBuffer_T
-> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("combinerOps"
    ::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ()
vkCmdSetFragmentShadingRateKHR'
                                                              (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
                                                              "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
pFragmentSize
                                                              ("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)
pCombinerOps))
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetPhysicalDeviceFragmentShadingRatesKHR
  :: FunPtr (Ptr PhysicalDevice_T -> Ptr Word32 -> Ptr PhysicalDeviceFragmentShadingRateKHR -> IO Result) -> Ptr PhysicalDevice_T -> Ptr Word32 -> Ptr PhysicalDeviceFragmentShadingRateKHR -> IO Result

-- | vkGetPhysicalDeviceFragmentShadingRatesKHR - Get available shading rates
-- for a physical device
--
-- = Description
--
-- If @pFragmentShadingRates@ is @NULL@, then the number of fragment
-- shading rates available is returned in @pFragmentShadingRateCount@.
-- Otherwise, @pFragmentShadingRateCount@ /must/ point to a variable set by
-- the user to the number of elements in the @pFragmentShadingRates@ array,
-- and on return the variable is overwritten with the number of structures
-- actually written to @pFragmentShadingRates@. If
-- @pFragmentShadingRateCount@ is less than the number of fragment shading
-- rates available, at most @pFragmentShadingRateCount@ structures will be
-- written, and 'Vulkan.Core10.Enums.Result.INCOMPLETE' will be returned
-- instead of 'Vulkan.Core10.Enums.Result.SUCCESS', to indicate that not
-- all the available fragment shading rates were returned.
--
-- The returned array of fragment shading rates /must/ be ordered from
-- largest @fragmentSize.width@ value to smallest, and each set of fragment
-- shading rates with the same @fragmentSize.width@ value /must/ be ordered
-- from largest @fragmentSize.height@ to smallest. Any two entries in the
-- array /must/ not have the same @fragmentSize@ values.
--
-- For any entry in the array, the following rules also apply:
--
-- -   The value of @fragmentSize.width@ /must/ be less than or equal to
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-maxFragmentSize maxFragmentSize.width>.
--
-- -   The value of @fragmentSize.width@ /must/ be greater than or equal to
--     @1@.
--
-- -   The value of @fragmentSize.width@ /must/ be a power-of-two.
--
-- -   The value of @fragmentSize.height@ /must/ be less than or equal to
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-maxFragmentSize maxFragmentSize.height>.
--
-- -   The value of @fragmentSize.height@ /must/ be greater than or equal
--     to @1@.
--
-- -   The value of @fragmentSize.height@ /must/ be a power-of-two.
--
-- -   The highest sample count in @sampleCounts@ /must/ be less than or
--     equal to
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-maxFragmentShadingRateRasterizationSamples maxFragmentShadingRateRasterizationSamples>.
--
-- -   The product of @fragmentSize.width@, @fragmentSize.height@, and the
--     highest sample count in @sampleCounts@ /must/ be less than or equal
--     to
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-maxFragmentShadingRateCoverageSamples maxFragmentShadingRateCoverageSamples>.
--
-- Implementations /must/ support at least the following shading rates:
--
-- +--------------------------------------------------------------+-----------------------------------+
-- | @sampleCounts@                                               | @fragmentSize@                    |
-- +==============================================================+===================================+
-- | 'Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT' | {2,2}                             |
-- | |                                                            |                                   |
-- | 'Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_4_BIT' |                                   |
-- +--------------------------------------------------------------+-----------------------------------+
-- | 'Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT' | {2,1}                             |
-- | |                                                            |                                   |
-- | 'Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_4_BIT' |                                   |
-- +--------------------------------------------------------------+-----------------------------------+
-- | ~0                                                           | {1,1}                             |
-- +--------------------------------------------------------------+-----------------------------------+
--
-- If
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-framebufferColorSampleCounts framebufferColorSampleCounts>,
-- includes 'Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_2_BIT',
-- the required rates /must/ also include
-- 'Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_2_BIT'.
--
-- Note
--
-- Including the {1,1} fragment size is done for completeness; it has no
-- actual effect on the support of rendering without setting the fragment
-- size. All sample counts and render pass transforms are supported for
-- this rate.
--
-- The returned set of fragment shading rates /must/ be returned in the
-- native (rotated) coordinate system. For rasterization using render pass
-- @transform@ not equal to
-- 'Vulkan.Extensions.VK_KHR_surface.SURFACE_TRANSFORM_IDENTITY_BIT_KHR',
-- the application /must/ transform the returned fragment shading rates
-- into the current (unrotated) coordinate system to get the supported
-- rates for that transform.
--
-- Note
--
-- For example, consider an implementation returning support for 4x2, but
-- not 2x4 in the set of supported fragment shading rates. This means that
-- for transforms
-- 'Vulkan.Extensions.VK_KHR_surface.SURFACE_TRANSFORM_ROTATE_90_BIT_KHR'
-- and
-- 'Vulkan.Extensions.VK_KHR_surface.SURFACE_TRANSFORM_ROTATE_270_BIT_KHR',
-- 2x4 is a supported rate, but 4x2 is an unsupported rate.
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkGetPhysicalDeviceFragmentShadingRatesKHR-physicalDevice-parameter#
--     @physicalDevice@ /must/ be a valid
--     'Vulkan.Core10.Handles.PhysicalDevice' handle
--
-- -   #VUID-vkGetPhysicalDeviceFragmentShadingRatesKHR-pFragmentShadingRateCount-parameter#
--     @pFragmentShadingRateCount@ /must/ be a valid pointer to a
--     @uint32_t@ value
--
-- -   #VUID-vkGetPhysicalDeviceFragmentShadingRatesKHR-pFragmentShadingRates-parameter#
--     If the value referenced by @pFragmentShadingRateCount@ is not @0@,
--     and @pFragmentShadingRates@ is not @NULL@, @pFragmentShadingRates@
--     /must/ be a valid pointer to an array of @pFragmentShadingRateCount@
--     'PhysicalDeviceFragmentShadingRateKHR' structures
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
--     -   'Vulkan.Core10.Enums.Result.INCOMPLETE'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_fragment_shading_rate VK_KHR_fragment_shading_rate>,
-- 'Vulkan.Core10.Handles.PhysicalDevice',
-- 'PhysicalDeviceFragmentShadingRateKHR'
getPhysicalDeviceFragmentShadingRatesKHR :: forall io
                                          . (MonadIO io)
                                         => -- | @physicalDevice@ is the handle to the physical device whose properties
                                            -- will be queried.
                                            PhysicalDevice
                                         -> io (Result, ("fragmentShadingRates" ::: Vector PhysicalDeviceFragmentShadingRateKHR))
getPhysicalDeviceFragmentShadingRatesKHR :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice
-> io
     (Result,
      "fragmentShadingRates"
      ::: Vector PhysicalDeviceFragmentShadingRateKHR)
getPhysicalDeviceFragmentShadingRatesKHR PhysicalDevice
physicalDevice = 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 vkGetPhysicalDeviceFragmentShadingRatesKHRPtr :: FunPtr
  (Ptr PhysicalDevice_T
   -> ("pFragmentShadingRateCount" ::: Ptr Word32)
   -> ("pFragmentShadingRates"
       ::: Ptr PhysicalDeviceFragmentShadingRateKHR)
   -> IO Result)
vkGetPhysicalDeviceFragmentShadingRatesKHRPtr = InstanceCmds
-> FunPtr
     (Ptr PhysicalDevice_T
      -> ("pFragmentShadingRateCount" ::: Ptr Word32)
      -> ("pFragmentShadingRates"
          ::: Ptr PhysicalDeviceFragmentShadingRateKHR)
      -> IO Result)
pVkGetPhysicalDeviceFragmentShadingRatesKHR (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
$sel:instanceCmds:PhysicalDevice :: PhysicalDevice -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
  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 PhysicalDevice_T
   -> ("pFragmentShadingRateCount" ::: Ptr Word32)
   -> ("pFragmentShadingRates"
       ::: Ptr PhysicalDeviceFragmentShadingRateKHR)
   -> IO Result)
vkGetPhysicalDeviceFragmentShadingRatesKHRPtr 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 vkGetPhysicalDeviceFragmentShadingRatesKHR is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkGetPhysicalDeviceFragmentShadingRatesKHR' :: Ptr PhysicalDevice_T
-> ("pFragmentShadingRateCount" ::: Ptr Word32)
-> ("pFragmentShadingRates"
    ::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO Result
vkGetPhysicalDeviceFragmentShadingRatesKHR' = FunPtr
  (Ptr PhysicalDevice_T
   -> ("pFragmentShadingRateCount" ::: Ptr Word32)
   -> ("pFragmentShadingRates"
       ::: Ptr PhysicalDeviceFragmentShadingRateKHR)
   -> IO Result)
-> Ptr PhysicalDevice_T
-> ("pFragmentShadingRateCount" ::: Ptr Word32)
-> ("pFragmentShadingRates"
    ::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO Result
mkVkGetPhysicalDeviceFragmentShadingRatesKHR FunPtr
  (Ptr PhysicalDevice_T
   -> ("pFragmentShadingRateCount" ::: Ptr Word32)
   -> ("pFragmentShadingRates"
       ::: Ptr PhysicalDeviceFragmentShadingRateKHR)
   -> IO Result)
vkGetPhysicalDeviceFragmentShadingRatesKHRPtr
  let physicalDevice' :: Ptr PhysicalDevice_T
physicalDevice' = PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)
  "pFragmentShadingRateCount" ::: Ptr Word32
pPFragmentShadingRateCount <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @Word32 Int
4) forall a. Ptr a -> IO ()
free
  Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDeviceFragmentShadingRatesKHR" (Ptr PhysicalDevice_T
-> ("pFragmentShadingRateCount" ::: Ptr Word32)
-> ("pFragmentShadingRates"
    ::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO Result
vkGetPhysicalDeviceFragmentShadingRatesKHR'
                                                                               Ptr PhysicalDevice_T
physicalDevice'
                                                                               ("pFragmentShadingRateCount" ::: Ptr Word32
pPFragmentShadingRateCount)
                                                                               (forall a. Ptr a
nullPtr))
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
  Word32
pFragmentShadingRateCount <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pFragmentShadingRateCount" ::: Ptr Word32
pPFragmentShadingRateCount
  "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
pPFragmentShadingRates <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @PhysicalDeviceFragmentShadingRateKHR ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pFragmentShadingRateCount)) forall a. Num a => a -> a -> a
* Int
32)) forall a. Ptr a -> IO ()
free
  [()]
_ <- forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (\Int
i -> 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 => Ptr a -> IO b -> IO b
pokeZeroCStruct ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
pPFragmentShadingRates forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
i forall a. Num a => a -> a -> a
* Int
32) :: Ptr PhysicalDeviceFragmentShadingRateKHR) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())) [Int
0..(forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pFragmentShadingRateCount)) forall a. Num a => a -> a -> a
- Int
1]
  Result
r' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDeviceFragmentShadingRatesKHR" (Ptr PhysicalDevice_T
-> ("pFragmentShadingRateCount" ::: Ptr Word32)
-> ("pFragmentShadingRates"
    ::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO Result
vkGetPhysicalDeviceFragmentShadingRatesKHR'
                                                                                Ptr PhysicalDevice_T
physicalDevice'
                                                                                ("pFragmentShadingRateCount" ::: Ptr Word32
pPFragmentShadingRateCount)
                                                                                (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
pPFragmentShadingRates)))
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r' forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r'))
  Word32
pFragmentShadingRateCount' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pFragmentShadingRateCount" ::: Ptr Word32
pPFragmentShadingRateCount
  "fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR
pFragmentShadingRates' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pFragmentShadingRateCount')) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PhysicalDeviceFragmentShadingRateKHR ((("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
pPFragmentShadingRates) forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
32 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PhysicalDeviceFragmentShadingRateKHR)))
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ((Result
r'), "fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR
pFragmentShadingRates')


-- | VkFragmentShadingRateAttachmentInfoKHR - Structure specifying a fragment
-- shading rate attachment for a subpass
--
-- = Description
--
-- If no shading rate attachment is specified, or if this structure is not
-- specified, the implementation behaves as if a valid shading rate
-- attachment was specified with all texels specifying a single pixel per
-- fragment.
--
-- == Valid Usage
--
-- -   #VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04524#
--     If @pFragmentShadingRateAttachment@ is not @NULL@ and its
--     @attachment@ member is not
--     'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED', its @layout@ member
--     /must/ be equal to
--     'Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL' or
--     'Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR'
--
-- -   #VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04525#
--     If @pFragmentShadingRateAttachment@ is not @NULL@ and its
--     @attachment@ member is not
--     'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED',
--     @shadingRateAttachmentTexelSize.width@ /must/ be a power of two
--     value
--
-- -   #VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04526#
--     If @pFragmentShadingRateAttachment@ is not @NULL@ and its
--     @attachment@ member is not
--     'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED',
--     @shadingRateAttachmentTexelSize.width@ /must/ be less than or equal
--     to
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-maxFragmentShadingRateAttachmentTexelSize maxFragmentShadingRateAttachmentTexelSize.width>
--
-- -   #VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04527#
--     If @pFragmentShadingRateAttachment@ is not @NULL@ and its
--     @attachment@ member is not
--     'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED',
--     @shadingRateAttachmentTexelSize.width@ /must/ be greater than or
--     equal to
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-minFragmentShadingRateAttachmentTexelSize minFragmentShadingRateAttachmentTexelSize.width>
--
-- -   #VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04528#
--     If @pFragmentShadingRateAttachment@ is not @NULL@ and its
--     @attachment@ member is not
--     'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED',
--     @shadingRateAttachmentTexelSize.height@ /must/ be a power of two
--     value
--
-- -   #VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04529#
--     If @pFragmentShadingRateAttachment@ is not @NULL@ and its
--     @attachment@ member is not
--     'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED',
--     @shadingRateAttachmentTexelSize.height@ /must/ be less than or equal
--     to
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-maxFragmentShadingRateAttachmentTexelSize maxFragmentShadingRateAttachmentTexelSize.height>
--
-- -   #VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04530#
--     If @pFragmentShadingRateAttachment@ is not @NULL@ and its
--     @attachment@ member is not
--     'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED',
--     @shadingRateAttachmentTexelSize.height@ /must/ be greater than or
--     equal to
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-minFragmentShadingRateAttachmentTexelSize minFragmentShadingRateAttachmentTexelSize.height>
--
-- -   #VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04531#
--     If @pFragmentShadingRateAttachment@ is not @NULL@ and its
--     @attachment@ member is not
--     'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED', the quotient of
--     @shadingRateAttachmentTexelSize.width@ and
--     @shadingRateAttachmentTexelSize.height@ /must/ be less than or equal
--     to
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-maxFragmentShadingRateAttachmentTexelSizeAspectRatio maxFragmentShadingRateAttachmentTexelSizeAspectRatio>
--
-- -   #VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04532#
--     If @pFragmentShadingRateAttachment@ is not @NULL@ and its
--     @attachment@ member is not
--     'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED', the quotient of
--     @shadingRateAttachmentTexelSize.height@ and
--     @shadingRateAttachmentTexelSize.width@ /must/ be less than or equal
--     to
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-maxFragmentShadingRateAttachmentTexelSizeAspectRatio maxFragmentShadingRateAttachmentTexelSizeAspectRatio>
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkFragmentShadingRateAttachmentInfoKHR-sType-sType# @sType@
--     /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR'
--
-- -   #VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-parameter#
--     If @pFragmentShadingRateAttachment@ is not @NULL@,
--     @pFragmentShadingRateAttachment@ /must/ be a valid pointer to a
--     valid
--     'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.AttachmentReference2'
--     structure
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_fragment_shading_rate VK_KHR_fragment_shading_rate>,
-- 'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.AttachmentReference2',
-- 'Vulkan.Core10.FundamentalTypes.Extent2D',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data FragmentShadingRateAttachmentInfoKHR = FragmentShadingRateAttachmentInfoKHR
  { -- | @pFragmentShadingRateAttachment@ is @NULL@ or a pointer to a
    -- 'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.AttachmentReference2'
    -- structure defining the fragment shading rate attachment for this
    -- subpass.
    FragmentShadingRateAttachmentInfoKHR
-> Maybe (SomeStruct AttachmentReference2)
fragmentShadingRateAttachment :: Maybe (SomeStruct AttachmentReference2)
  , -- | @shadingRateAttachmentTexelSize@ specifies the size of the portion of
    -- the framebuffer corresponding to each texel in
    -- @pFragmentShadingRateAttachment@.
    FragmentShadingRateAttachmentInfoKHR -> "fragmentSize" ::: Extent2D
shadingRateAttachmentTexelSize :: Extent2D
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (FragmentShadingRateAttachmentInfoKHR)
#endif
deriving instance Show FragmentShadingRateAttachmentInfoKHR

instance ToCStruct FragmentShadingRateAttachmentInfoKHR where
  withCStruct :: forall b.
FragmentShadingRateAttachmentInfoKHR
-> (Ptr FragmentShadingRateAttachmentInfoKHR -> IO b) -> IO b
withCStruct FragmentShadingRateAttachmentInfoKHR
x Ptr FragmentShadingRateAttachmentInfoKHR -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr FragmentShadingRateAttachmentInfoKHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr FragmentShadingRateAttachmentInfoKHR
p FragmentShadingRateAttachmentInfoKHR
x (Ptr FragmentShadingRateAttachmentInfoKHR -> IO b
f Ptr FragmentShadingRateAttachmentInfoKHR
p)
  pokeCStruct :: forall b.
Ptr FragmentShadingRateAttachmentInfoKHR
-> FragmentShadingRateAttachmentInfoKHR -> IO b -> IO b
pokeCStruct Ptr FragmentShadingRateAttachmentInfoKHR
p FragmentShadingRateAttachmentInfoKHR{Maybe (SomeStruct AttachmentReference2)
"fragmentSize" ::: Extent2D
shadingRateAttachmentTexelSize :: "fragmentSize" ::: Extent2D
fragmentShadingRateAttachment :: Maybe (SomeStruct AttachmentReference2)
$sel:shadingRateAttachmentTexelSize:FragmentShadingRateAttachmentInfoKHR :: FragmentShadingRateAttachmentInfoKHR -> "fragmentSize" ::: Extent2D
$sel:fragmentShadingRateAttachment:FragmentShadingRateAttachmentInfoKHR :: FragmentShadingRateAttachmentInfoKHR
-> Maybe (SomeStruct AttachmentReference2)
..} IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr FragmentShadingRateAttachmentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr FragmentShadingRateAttachmentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    Ptr (AttachmentReference2 '[])
pFragmentShadingRateAttachment'' <- case (Maybe (SomeStruct AttachmentReference2)
fragmentShadingRateAttachment) of
      Maybe (SomeStruct AttachmentReference2)
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
      Just SomeStruct AttachmentReference2
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT @_ @_ @(Ptr (AttachmentReference2 '[])) forall a b. (a -> b) -> a -> b
$ \Ptr (AttachmentReference2 '[]) -> IO b
cont -> forall (a :: [*] -> *) b.
(forall (es :: [*]).
 (Extendss a es, PokeChain es) =>
 ToCStruct (a es)) =>
SomeStruct a
-> (forall (es :: [*]).
    (Extendss a es, PokeChain es) =>
    Ptr (a es) -> IO b)
-> IO b
withSomeCStruct @AttachmentReference2 (SomeStruct AttachmentReference2
j) (Ptr (AttachmentReference2 '[]) -> IO b
cont forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. Ptr a -> Ptr b
castPtr)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr FragmentShadingRateAttachmentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr (AttachmentReference2 _)))) Ptr (AttachmentReference2 '[])
pFragmentShadingRateAttachment''
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr FragmentShadingRateAttachmentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
shadingRateAttachmentTexelSize)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
  cStructSize :: Int
cStructSize = Int
32
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr FragmentShadingRateAttachmentInfoKHR -> IO b -> IO b
pokeZeroCStruct Ptr FragmentShadingRateAttachmentInfoKHR
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr FragmentShadingRateAttachmentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr FragmentShadingRateAttachmentInfoKHR
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 FragmentShadingRateAttachmentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct FragmentShadingRateAttachmentInfoKHR where
  peekCStruct :: Ptr FragmentShadingRateAttachmentInfoKHR
-> IO FragmentShadingRateAttachmentInfoKHR
peekCStruct Ptr FragmentShadingRateAttachmentInfoKHR
p = do
    Ptr (AttachmentReference2 Any)
pFragmentShadingRateAttachment <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr (AttachmentReference2 _)) ((Ptr FragmentShadingRateAttachmentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr (AttachmentReference2 _))))
    Maybe (SomeStruct AttachmentReference2)
pFragmentShadingRateAttachment' <- forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr (AttachmentReference2 Any)
j -> forall (a :: [*] -> *).
(Extensible a,
 forall (es :: [*]).
 (Extendss a es, PeekChain es) =>
 FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (AttachmentReference2 Any)
j))) Ptr (AttachmentReference2 Any)
pFragmentShadingRateAttachment
    "fragmentSize" ::: Extent2D
shadingRateAttachmentTexelSize <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr FragmentShadingRateAttachmentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Maybe (SomeStruct AttachmentReference2)
-> ("fragmentSize" ::: Extent2D)
-> FragmentShadingRateAttachmentInfoKHR
FragmentShadingRateAttachmentInfoKHR
             Maybe (SomeStruct AttachmentReference2)
pFragmentShadingRateAttachment' "fragmentSize" ::: Extent2D
shadingRateAttachmentTexelSize

instance Zero FragmentShadingRateAttachmentInfoKHR where
  zero :: FragmentShadingRateAttachmentInfoKHR
zero = Maybe (SomeStruct AttachmentReference2)
-> ("fragmentSize" ::: Extent2D)
-> FragmentShadingRateAttachmentInfoKHR
FragmentShadingRateAttachmentInfoKHR
           forall a. Maybe a
Nothing
           forall a. Zero a => a
zero


-- | VkPipelineFragmentShadingRateStateCreateInfoKHR - Structure specifying
-- parameters controlling the fragment shading rate
--
-- = Description
--
-- If the @pNext@ chain of
-- 'Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' includes a
-- 'PipelineFragmentShadingRateStateCreateInfoKHR' structure, then that
-- structure includes parameters controlling the pipeline fragment shading
-- rate.
--
-- If this structure is not present, @fragmentSize@ is considered to be
-- equal to (1,1), and both elements of @combinerOps@ are considered to be
-- equal to '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_KHR_fragment_shading_rate VK_KHR_fragment_shading_rate>,
-- 'Vulkan.Core10.FundamentalTypes.Extent2D',
-- 'FragmentShadingRateCombinerOpKHR',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PipelineFragmentShadingRateStateCreateInfoKHR = PipelineFragmentShadingRateStateCreateInfoKHR
  { -- | @fragmentSize@ specifies a 'Vulkan.Core10.FundamentalTypes.Extent2D'
    -- structure containing the fragment size used to define the pipeline
    -- fragment shading rate for drawing commands using this pipeline.
    PipelineFragmentShadingRateStateCreateInfoKHR
-> "fragmentSize" ::: Extent2D
fragmentSize :: Extent2D
  , -- | @combinerOps@ specifies a 'FragmentShadingRateCombinerOpKHR' value
    -- 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.
    PipelineFragmentShadingRateStateCreateInfoKHR
-> "combinerOps"
   ::: (FragmentShadingRateCombinerOpKHR,
        FragmentShadingRateCombinerOpKHR)
combinerOps :: (FragmentShadingRateCombinerOpKHR, FragmentShadingRateCombinerOpKHR)
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineFragmentShadingRateStateCreateInfoKHR)
#endif
deriving instance Show PipelineFragmentShadingRateStateCreateInfoKHR

instance ToCStruct PipelineFragmentShadingRateStateCreateInfoKHR where
  withCStruct :: forall b.
PipelineFragmentShadingRateStateCreateInfoKHR
-> (Ptr PipelineFragmentShadingRateStateCreateInfoKHR -> IO b)
-> IO b
withCStruct PipelineFragmentShadingRateStateCreateInfoKHR
x Ptr PipelineFragmentShadingRateStateCreateInfoKHR -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p PipelineFragmentShadingRateStateCreateInfoKHR
x (Ptr PipelineFragmentShadingRateStateCreateInfoKHR -> IO b
f Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p)
  pokeCStruct :: forall b.
Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> PipelineFragmentShadingRateStateCreateInfoKHR -> IO b -> IO b
pokeCStruct Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p PipelineFragmentShadingRateStateCreateInfoKHR{"combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
     FragmentShadingRateCombinerOpKHR)
"fragmentSize" ::: Extent2D
combinerOps :: "combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
     FragmentShadingRateCombinerOpKHR)
fragmentSize :: "fragmentSize" ::: Extent2D
$sel:combinerOps:PipelineFragmentShadingRateStateCreateInfoKHR :: PipelineFragmentShadingRateStateCreateInfoKHR
-> "combinerOps"
   ::: (FragmentShadingRateCombinerOpKHR,
        FragmentShadingRateCombinerOpKHR)
$sel:fragmentSize:PipelineFragmentShadingRateStateCreateInfoKHR :: PipelineFragmentShadingRateStateCreateInfoKHR
-> "fragmentSize" ::: Extent2D
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
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 PipelineFragmentShadingRateStateCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
fragmentSize)
    let pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
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 PipelineFragmentShadingRateStateCreateInfoKHR -> IO b -> IO b
pokeZeroCStruct Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
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 PipelineFragmentShadingRateStateCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Extent2D)) (forall a. Zero a => a
zero)
    let pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
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 PipelineFragmentShadingRateStateCreateInfoKHR where
  peekCStruct :: Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> IO PipelineFragmentShadingRateStateCreateInfoKHR
peekCStruct Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p = do
    "fragmentSize" ::: Extent2D
fragmentSize <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Extent2D))
    let pcombinerOps :: Ptr FragmentShadingRateCombinerOpKHR
pcombinerOps = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @FragmentShadingRateCombinerOpKHR ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
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
$ ("fragmentSize" ::: Extent2D)
-> ("combinerOps"
    ::: (FragmentShadingRateCombinerOpKHR,
         FragmentShadingRateCombinerOpKHR))
-> PipelineFragmentShadingRateStateCreateInfoKHR
PipelineFragmentShadingRateStateCreateInfoKHR
             "fragmentSize" ::: Extent2D
fragmentSize ((FragmentShadingRateCombinerOpKHR
combinerOps0, FragmentShadingRateCombinerOpKHR
combinerOps1))

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

instance Zero PipelineFragmentShadingRateStateCreateInfoKHR where
  zero :: PipelineFragmentShadingRateStateCreateInfoKHR
zero = ("fragmentSize" ::: Extent2D)
-> ("combinerOps"
    ::: (FragmentShadingRateCombinerOpKHR,
         FragmentShadingRateCombinerOpKHR))
-> PipelineFragmentShadingRateStateCreateInfoKHR
PipelineFragmentShadingRateStateCreateInfoKHR
           forall a. Zero a => a
zero
           (forall a. Zero a => a
zero, forall a. Zero a => a
zero)


-- | VkPhysicalDeviceFragmentShadingRateFeaturesKHR - Structure indicating
-- support for variable rate fragment shading
--
-- = Members
--
-- This structure describes the following features:
--
-- = Description
--
-- If the 'PhysicalDeviceFragmentShadingRateFeaturesKHR' 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. 'PhysicalDeviceFragmentShadingRateFeaturesKHR' /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_KHR_fragment_shading_rate VK_KHR_fragment_shading_rate>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceFragmentShadingRateFeaturesKHR = PhysicalDeviceFragmentShadingRateFeaturesKHR
  { -- | #features-pipelineFragmentShadingRate# @pipelineFragmentShadingRate@
    -- indicates that the implementation supports the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-fragment-shading-rate-pipeline pipeline fragment shading rate>.
    PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool
pipelineFragmentShadingRate :: Bool
  , -- | #features-primitiveFragmentShadingRate# @primitiveFragmentShadingRate@
    -- indicates that the implementation supports the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-fragment-shading-rate-primitive primitive fragment shading rate>.
    PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool
primitiveFragmentShadingRate :: Bool
  , -- | #features-attachmentFragmentShadingRate# @attachmentFragmentShadingRate@
    -- indicates that the implementation supports the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-fragment-shading-rate-attachment attachment fragment shading rate>.
    PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool
attachmentFragmentShadingRate :: Bool
  }
  deriving (Typeable, PhysicalDeviceFragmentShadingRateFeaturesKHR
-> PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceFragmentShadingRateFeaturesKHR
-> PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool
$c/= :: PhysicalDeviceFragmentShadingRateFeaturesKHR
-> PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool
== :: PhysicalDeviceFragmentShadingRateFeaturesKHR
-> PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool
$c== :: PhysicalDeviceFragmentShadingRateFeaturesKHR
-> PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceFragmentShadingRateFeaturesKHR)
#endif
deriving instance Show PhysicalDeviceFragmentShadingRateFeaturesKHR

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

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

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


-- | VkPhysicalDeviceFragmentShadingRatePropertiesKHR - Structure describing
-- variable fragment shading rate limits that can be supported by an
-- implementation
--
-- = Description
--
-- Note
--
-- Multiplication of the combiner rates using the fragment width\/height in
-- linear space is equivalent to an addition of those values in log2 space.
-- Some implementations inadvertently implemented an addition in linear
-- space due to unclear requirements originating outside of this
-- specification. This resulted in
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-fragmentShadingRateStrictMultiplyCombiner fragmentShadingRateStrictMultiplyCombiner>
-- being added. Fortunately, this only affects situations where a rate of 1
-- in either dimension is combined with another rate of 1. All other
-- combinations result in the exact same result as if multiplication was
-- performed in linear space due to the clamping logic, and the fact that
-- both the sum and product of 2 and 2 are equal. In many cases, this limit
-- will not affect the correct operation of applications.
--
-- If the 'PhysicalDeviceFragmentShadingRatePropertiesKHR' 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_KHR_fragment_shading_rate VK_KHR_fragment_shading_rate>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.FundamentalTypes.Extent2D',
-- 'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceFragmentShadingRatePropertiesKHR = PhysicalDeviceFragmentShadingRatePropertiesKHR
  { -- | #limits-minFragmentShadingRateAttachmentTexelSize#
    -- @minFragmentShadingRateAttachmentTexelSize@ indicates minimum supported
    -- width and height of the portion of the framebuffer corresponding to each
    -- texel in a fragment shading rate attachment. Each value /must/ be less
    -- than or equal to the values in
    -- @maxFragmentShadingRateAttachmentTexelSize@. Each value /must/ be a
    -- power-of-two. It /must/ be (0,0) if the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-attachmentFragmentShadingRate attachmentFragmentShadingRate>
    -- feature is not supported.
    PhysicalDeviceFragmentShadingRatePropertiesKHR
-> "fragmentSize" ::: Extent2D
minFragmentShadingRateAttachmentTexelSize :: Extent2D
  , -- | #limits-maxFragmentShadingRateAttachmentTexelSize#
    -- @maxFragmentShadingRateAttachmentTexelSize@ indicates maximum supported
    -- width and height of the portion of the framebuffer corresponding to each
    -- texel in a fragment shading rate attachment. Each value /must/ be
    -- greater than or equal to the values in
    -- @minFragmentShadingRateAttachmentTexelSize@. Each value /must/ be a
    -- power-of-two. It /must/ be (0,0) if the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-attachmentFragmentShadingRate attachmentFragmentShadingRate>
    -- feature is not supported.
    PhysicalDeviceFragmentShadingRatePropertiesKHR
-> "fragmentSize" ::: Extent2D
maxFragmentShadingRateAttachmentTexelSize :: Extent2D
  , -- | #limits-maxFragmentShadingRateAttachmentTexelSizeAspectRatio#
    -- @maxFragmentShadingRateAttachmentTexelSizeAspectRatio@ indicates the
    -- maximum ratio between the width and height of the portion of the
    -- framebuffer corresponding to each texel in a fragment shading rate
    -- attachment. @maxFragmentShadingRateAttachmentTexelSizeAspectRatio@
    -- /must/ be a power-of-two value, and /must/ be less than or equal to
    -- max(@maxFragmentShadingRateAttachmentTexelSize.width@ \/
    -- @minFragmentShadingRateAttachmentTexelSize.height@,
    -- @maxFragmentShadingRateAttachmentTexelSize.height@ \/
    -- @minFragmentShadingRateAttachmentTexelSize.width@). It /must/ be 0 if
    -- the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-attachmentFragmentShadingRate attachmentFragmentShadingRate>
    -- feature is not supported.
    PhysicalDeviceFragmentShadingRatePropertiesKHR -> Word32
maxFragmentShadingRateAttachmentTexelSizeAspectRatio :: Word32
  , -- | #limits-primitiveFragmentShadingRateWithMultipleViewports#
    -- @primitiveFragmentShadingRateWithMultipleViewports@ specifies whether
    -- the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-fragment-shading-rate-primitive primitive fragment shading rate>
    -- /can/ be used when multiple viewports are used. If this value is
    -- 'Vulkan.Core10.FundamentalTypes.FALSE', only a single viewport /must/ be
    -- used, and applications /must/ not write to the @ViewportMaskNV@ or
    -- @ViewportIndex@ built-in when setting @PrimitiveShadingRateKHR@. It
    -- /must/ be 'Vulkan.Core10.FundamentalTypes.FALSE' if the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-shaderOutputViewportIndex shaderOutputViewportIndex>
    -- feature, the @VK_EXT_shader_viewport_index_layer@ extension, or the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-geometryShader geometryShader>
    -- feature is not supported, or if the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-primitiveFragmentShadingRate primitiveFragmentShadingRate>
    -- feature is not supported.
    PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
primitiveFragmentShadingRateWithMultipleViewports :: Bool
  , -- | #limits-layeredShadingRateAttachments# @layeredShadingRateAttachments@
    -- specifies whether a shading rate attachment image view /can/ be created
    -- with multiple layers. If this value is
    -- 'Vulkan.Core10.FundamentalTypes.FALSE', when creating an image view with
    -- a @usage@ that includes
    -- 'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR',
    -- @layerCount@ /must/ be @1@. It /must/ be
    -- 'Vulkan.Core10.FundamentalTypes.FALSE' if the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-multiview multiview>
    -- feature, the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-shaderOutputViewportIndex shaderOutputViewportIndex>
    -- feature, the @VK_EXT_shader_viewport_index_layer@ extension, or the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-geometryShader geometryShader>
    -- feature is not supported, or if the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-attachmentFragmentShadingRate attachmentFragmentShadingRate>
    -- feature is not supported.
    PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
layeredShadingRateAttachments :: Bool
  , -- | #limits-fragmentShadingRateNonTrivialCombinerOps#
    -- @fragmentShadingRateNonTrivialCombinerOps@ specifies whether
    -- 'FragmentShadingRateCombinerOpKHR' enums other than
    -- 'FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR' or
    -- 'FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR' /can/ be used. It /must/
    -- be 'Vulkan.Core10.FundamentalTypes.FALSE' unless either the
    -- <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>
    -- feature is supported.
    PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
fragmentShadingRateNonTrivialCombinerOps :: Bool
  , -- | #limits-maxFragmentSize# @maxFragmentSize@ indicates the maximum
    -- supported width and height of a fragment. Its @width@ and @height@
    -- members /must/ both be power-of-two values. This limit is purely
    -- informational, and is not validated.
    PhysicalDeviceFragmentShadingRatePropertiesKHR
-> "fragmentSize" ::: Extent2D
maxFragmentSize :: Extent2D
  , -- | #limits-maxFragmentSizeAspectRatio# @maxFragmentSizeAspectRatio@
    -- indicates the maximum ratio between the width and height of a fragment.
    -- @maxFragmentSizeAspectRatio@ /must/ be a power-of-two value, and /must/
    -- be less than or equal to the maximum of the @width@ and @height@ members
    -- of @maxFragmentSize@. This limit is purely informational, and is not
    -- validated.
    PhysicalDeviceFragmentShadingRatePropertiesKHR -> Word32
maxFragmentSizeAspectRatio :: Word32
  , -- | #limits-maxFragmentShadingRateCoverageSamples#
    -- @maxFragmentShadingRateCoverageSamples@ specifies the maximum number of
    -- coverage samples supported in a single fragment.
    -- @maxFragmentShadingRateCoverageSamples@ /must/ be less than or equal to
    -- the product of the @width@ and @height@ members of @maxFragmentSize@,
    -- and the sample count reported by
    -- @maxFragmentShadingRateRasterizationSamples@.
    -- @maxFragmentShadingRateCoverageSamples@ /must/ be less than or equal to
    -- @maxSampleMaskWords@ × 32 if @fragmentShadingRateWithShaderSampleMask@
    -- is supported. This limit is purely informational, and is not validated.
    PhysicalDeviceFragmentShadingRatePropertiesKHR -> Word32
maxFragmentShadingRateCoverageSamples :: Word32
  , -- | #limits-maxFragmentShadingRateRasterizationSamples#
    -- @maxFragmentShadingRateRasterizationSamples@ is a
    -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits' value
    -- specifying the maximum sample rate supported when a fragment covers
    -- multiple pixels. This limit is purely informational, and is not
    -- validated.
    PhysicalDeviceFragmentShadingRatePropertiesKHR
-> SampleCountFlagBits
maxFragmentShadingRateRasterizationSamples :: SampleCountFlagBits
  , -- | #limits-fragmentShadingRateWithShaderDepthStencilWrites#
    -- @fragmentShadingRateWithShaderDepthStencilWrites@ specifies whether the
    -- implementation supports writing @FragDepth@ or @FragStencilRefEXT@ from
    -- a fragment shader for multi-pixel fragments. If this value is
    -- 'Vulkan.Core10.FundamentalTypes.FALSE', writing to those built-ins will
    -- clamp the fragment shading rate to (1,1).
    PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
fragmentShadingRateWithShaderDepthStencilWrites :: Bool
  , -- | #limits-fragmentShadingRateWithSampleMask#
    -- @fragmentShadingRateWithSampleMask@ specifies whether the implementation
    -- supports setting valid bits of
    -- 'Vulkan.Core10.Pipeline.PipelineMultisampleStateCreateInfo'::@pSampleMask@
    -- to @0@ for multi-pixel fragments. If this value is
    -- 'Vulkan.Core10.FundamentalTypes.FALSE', zeroing valid bits in the sample
    -- mask will clamp the fragment shading rate to (1,1).
    PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
fragmentShadingRateWithSampleMask :: Bool
  , -- | #limits-fragmentShadingRateWithShaderSampleMask#
    -- @fragmentShadingRateWithShaderSampleMask@ specifies whether the
    -- implementation supports reading or writing
    -- 'Vulkan.Core10.FundamentalTypes.SampleMask' for multi-pixel fragments.
    -- If this value is 'Vulkan.Core10.FundamentalTypes.FALSE', using that
    -- built-in will clamp the fragment shading rate to (1,1).
    PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
fragmentShadingRateWithShaderSampleMask :: Bool
  , -- | #limits-fragmentShadingRateWithConservativeRasterization#
    -- @fragmentShadingRateWithConservativeRasterization@ specifies whether
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-conservativeraster conservative rasterization>
    -- is supported for multi-pixel fragments. It /must/ be
    -- 'Vulkan.Core10.FundamentalTypes.FALSE' if
    -- @VK_EXT_conservative_rasterization@ is not supported. If this value is
    -- 'Vulkan.Core10.FundamentalTypes.FALSE', using
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-conservativeraster conservative rasterization>
    -- will clamp the fragment shading rate to (1,1).
    PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
fragmentShadingRateWithConservativeRasterization :: Bool
  , -- | #limits-fragmentShadingRateWithFragmentShaderInterlock#
    -- @fragmentShadingRateWithFragmentShaderInterlock@ specifies whether
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-shader-interlock fragment shader interlock>
    -- is supported for multi-pixel fragments. It /must/ be
    -- 'Vulkan.Core10.FundamentalTypes.FALSE' if
    -- @VK_EXT_fragment_shader_interlock@ is not supported. If this value is
    -- 'Vulkan.Core10.FundamentalTypes.FALSE', using
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-shader-interlock fragment shader interlock>
    -- will clamp the fragment shading rate to (1,1).
    PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
fragmentShadingRateWithFragmentShaderInterlock :: Bool
  , -- | #limits-fragmentShadingRateWithCustomSampleLocations#
    -- @fragmentShadingRateWithCustomSampleLocations@ specifies whether
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-samplelocations custom sample locations>
    -- are supported for multi-pixel fragments. It /must/ be
    -- 'Vulkan.Core10.FundamentalTypes.FALSE' if @VK_EXT_sample_locations@ is
    -- not supported. If this value is 'Vulkan.Core10.FundamentalTypes.FALSE',
    -- using
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-samplelocations custom sample locations>
    -- will clamp the fragment shading rate to (1,1).
    PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
fragmentShadingRateWithCustomSampleLocations :: Bool
  , -- | #limits-fragmentShadingRateStrictMultiplyCombiner#
    -- @fragmentShadingRateStrictMultiplyCombiner@ specifies whether
    -- 'FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR' accurately performs a
    -- multiplication or not. Implementations where this value is
    -- 'Vulkan.Core10.FundamentalTypes.FALSE' will instead combine rates with
    -- an addition. If @fragmentShadingRateNonTrivialCombinerOps@ is
    -- 'Vulkan.Core10.FundamentalTypes.FALSE', implementations /must/ report
    -- this as 'Vulkan.Core10.FundamentalTypes.FALSE'. If
    -- @fragmentShadingRateNonTrivialCombinerOps@ is
    -- 'Vulkan.Core10.FundamentalTypes.TRUE', implementations /should/ report
    -- this as 'Vulkan.Core10.FundamentalTypes.TRUE'.
    PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
fragmentShadingRateStrictMultiplyCombiner :: Bool
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceFragmentShadingRatePropertiesKHR)
#endif
deriving instance Show PhysicalDeviceFragmentShadingRatePropertiesKHR

instance ToCStruct PhysicalDeviceFragmentShadingRatePropertiesKHR where
  withCStruct :: forall b.
PhysicalDeviceFragmentShadingRatePropertiesKHR
-> (Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO b)
-> IO b
withCStruct PhysicalDeviceFragmentShadingRatePropertiesKHR
x Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
96 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p PhysicalDeviceFragmentShadingRatePropertiesKHR
x (Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO b
f Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p PhysicalDeviceFragmentShadingRatePropertiesKHR{Bool
Word32
SampleCountFlagBits
"fragmentSize" ::: Extent2D
fragmentShadingRateStrictMultiplyCombiner :: Bool
fragmentShadingRateWithCustomSampleLocations :: Bool
fragmentShadingRateWithFragmentShaderInterlock :: Bool
fragmentShadingRateWithConservativeRasterization :: Bool
fragmentShadingRateWithShaderSampleMask :: Bool
fragmentShadingRateWithSampleMask :: Bool
fragmentShadingRateWithShaderDepthStencilWrites :: Bool
maxFragmentShadingRateRasterizationSamples :: SampleCountFlagBits
maxFragmentShadingRateCoverageSamples :: Word32
maxFragmentSizeAspectRatio :: Word32
maxFragmentSize :: "fragmentSize" ::: Extent2D
fragmentShadingRateNonTrivialCombinerOps :: Bool
layeredShadingRateAttachments :: Bool
primitiveFragmentShadingRateWithMultipleViewports :: Bool
maxFragmentShadingRateAttachmentTexelSizeAspectRatio :: Word32
maxFragmentShadingRateAttachmentTexelSize :: "fragmentSize" ::: Extent2D
minFragmentShadingRateAttachmentTexelSize :: "fragmentSize" ::: Extent2D
$sel:fragmentShadingRateStrictMultiplyCombiner:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:fragmentShadingRateWithCustomSampleLocations:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:fragmentShadingRateWithFragmentShaderInterlock:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:fragmentShadingRateWithConservativeRasterization:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:fragmentShadingRateWithShaderSampleMask:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:fragmentShadingRateWithSampleMask:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:fragmentShadingRateWithShaderDepthStencilWrites:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:maxFragmentShadingRateRasterizationSamples:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR
-> SampleCountFlagBits
$sel:maxFragmentShadingRateCoverageSamples:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Word32
$sel:maxFragmentSizeAspectRatio:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Word32
$sel:maxFragmentSize:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR
-> "fragmentSize" ::: Extent2D
$sel:fragmentShadingRateNonTrivialCombinerOps:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:layeredShadingRateAttachments:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:primitiveFragmentShadingRateWithMultipleViewports:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:maxFragmentShadingRateAttachmentTexelSizeAspectRatio:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Word32
$sel:maxFragmentShadingRateAttachmentTexelSize:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR
-> "fragmentSize" ::: Extent2D
$sel:minFragmentShadingRateAttachmentTexelSize:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR
-> "fragmentSize" ::: Extent2D
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
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 PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
minFragmentShadingRateAttachmentTexelSize)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
maxFragmentShadingRateAttachmentTexelSize)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (Word32
maxFragmentShadingRateAttachmentTexelSizeAspectRatio)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
primitiveFragmentShadingRateWithMultipleViewports))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
layeredShadingRateAttachments))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateNonTrivialCombinerOps))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
maxFragmentSize)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) (Word32
maxFragmentSizeAspectRatio)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr Word32)) (Word32
maxFragmentShadingRateCoverageSamples)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr SampleCountFlagBits)) (SampleCountFlagBits
maxFragmentShadingRateRasterizationSamples)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateWithShaderDepthStencilWrites))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateWithSampleMask))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
76 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateWithShaderSampleMask))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateWithConservativeRasterization))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
84 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateWithFragmentShaderInterlock))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateWithCustomSampleLocations))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
92 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateStrictMultiplyCombiner))
    IO b
f
  cStructSize :: Int
cStructSize = Int
96
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
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 PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Extent2D)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Extent2D)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr SampleCountFlagBits)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
76 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
84 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
92 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDeviceFragmentShadingRatePropertiesKHR where
  peekCStruct :: Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> IO PhysicalDeviceFragmentShadingRatePropertiesKHR
peekCStruct Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p = do
    "fragmentSize" ::: Extent2D
minFragmentShadingRateAttachmentTexelSize <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Extent2D))
    "fragmentSize" ::: Extent2D
maxFragmentShadingRateAttachmentTexelSize <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D))
    Word32
maxFragmentShadingRateAttachmentTexelSizeAspectRatio <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32))
    Bool32
primitiveFragmentShadingRateWithMultipleViewports <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32))
    Bool32
layeredShadingRateAttachments <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32))
    Bool32
fragmentShadingRateNonTrivialCombinerOps <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Bool32))
    "fragmentSize" ::: Extent2D
maxFragmentSize <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Extent2D))
    Word32
maxFragmentSizeAspectRatio <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32))
    Word32
maxFragmentShadingRateCoverageSamples <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr Word32))
    SampleCountFlagBits
maxFragmentShadingRateRasterizationSamples <- forall a. Storable a => Ptr a -> IO a
peek @SampleCountFlagBits ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr SampleCountFlagBits))
    Bool32
fragmentShadingRateWithShaderDepthStencilWrites <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr Bool32))
    Bool32
fragmentShadingRateWithSampleMask <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Bool32))
    Bool32
fragmentShadingRateWithShaderSampleMask <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
76 :: Ptr Bool32))
    Bool32
fragmentShadingRateWithConservativeRasterization <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr Bool32))
    Bool32
fragmentShadingRateWithFragmentShaderInterlock <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
84 :: Ptr Bool32))
    Bool32
fragmentShadingRateWithCustomSampleLocations <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr Bool32))
    Bool32
fragmentShadingRateStrictMultiplyCombiner <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
92 :: Ptr Bool32))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ("fragmentSize" ::: Extent2D)
-> ("fragmentSize" ::: Extent2D)
-> Word32
-> Bool
-> Bool
-> Bool
-> ("fragmentSize" ::: Extent2D)
-> Word32
-> Word32
-> SampleCountFlagBits
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceFragmentShadingRatePropertiesKHR
PhysicalDeviceFragmentShadingRatePropertiesKHR
             "fragmentSize" ::: Extent2D
minFragmentShadingRateAttachmentTexelSize
             "fragmentSize" ::: Extent2D
maxFragmentShadingRateAttachmentTexelSize
             Word32
maxFragmentShadingRateAttachmentTexelSizeAspectRatio
             (Bool32 -> Bool
bool32ToBool Bool32
primitiveFragmentShadingRateWithMultipleViewports)
             (Bool32 -> Bool
bool32ToBool Bool32
layeredShadingRateAttachments)
             (Bool32 -> Bool
bool32ToBool Bool32
fragmentShadingRateNonTrivialCombinerOps)
             "fragmentSize" ::: Extent2D
maxFragmentSize
             Word32
maxFragmentSizeAspectRatio
             Word32
maxFragmentShadingRateCoverageSamples
             SampleCountFlagBits
maxFragmentShadingRateRasterizationSamples
             (Bool32 -> Bool
bool32ToBool Bool32
fragmentShadingRateWithShaderDepthStencilWrites)
             (Bool32 -> Bool
bool32ToBool Bool32
fragmentShadingRateWithSampleMask)
             (Bool32 -> Bool
bool32ToBool Bool32
fragmentShadingRateWithShaderSampleMask)
             (Bool32 -> Bool
bool32ToBool Bool32
fragmentShadingRateWithConservativeRasterization)
             (Bool32 -> Bool
bool32ToBool Bool32
fragmentShadingRateWithFragmentShaderInterlock)
             (Bool32 -> Bool
bool32ToBool Bool32
fragmentShadingRateWithCustomSampleLocations)
             (Bool32 -> Bool
bool32ToBool Bool32
fragmentShadingRateStrictMultiplyCombiner)

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

instance Zero PhysicalDeviceFragmentShadingRatePropertiesKHR where
  zero :: PhysicalDeviceFragmentShadingRatePropertiesKHR
zero = ("fragmentSize" ::: Extent2D)
-> ("fragmentSize" ::: Extent2D)
-> Word32
-> Bool
-> Bool
-> Bool
-> ("fragmentSize" ::: Extent2D)
-> Word32
-> Word32
-> SampleCountFlagBits
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceFragmentShadingRatePropertiesKHR
PhysicalDeviceFragmentShadingRatePropertiesKHR
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


-- | VkPhysicalDeviceFragmentShadingRateKHR - Structure returning information
-- about sample count specific additional multisampling capabilities
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_fragment_shading_rate VK_KHR_fragment_shading_rate>,
-- 'Vulkan.Core10.FundamentalTypes.Extent2D',
-- 'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlags',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'getPhysicalDeviceFragmentShadingRatesKHR'
data PhysicalDeviceFragmentShadingRateKHR = PhysicalDeviceFragmentShadingRateKHR
  { -- | @sampleCounts@ is a bitmask of sample counts for which the shading rate
    -- described by @fragmentSize@ is supported.
    PhysicalDeviceFragmentShadingRateKHR -> SampleCountFlagBits
sampleCounts :: SampleCountFlags
  , -- | @fragmentSize@ is a 'Vulkan.Core10.FundamentalTypes.Extent2D' describing
    -- the width and height of a supported shading rate.
    PhysicalDeviceFragmentShadingRateKHR -> "fragmentSize" ::: Extent2D
fragmentSize :: Extent2D
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceFragmentShadingRateKHR)
#endif
deriving instance Show PhysicalDeviceFragmentShadingRateKHR

instance ToCStruct PhysicalDeviceFragmentShadingRateKHR where
  withCStruct :: forall b.
PhysicalDeviceFragmentShadingRateKHR
-> (("pFragmentShadingRates"
     ::: Ptr PhysicalDeviceFragmentShadingRateKHR)
    -> IO b)
-> IO b
withCStruct PhysicalDeviceFragmentShadingRateKHR
x ("pFragmentShadingRates"
 ::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \"pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p PhysicalDeviceFragmentShadingRateKHR
x (("pFragmentShadingRates"
 ::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO b
f "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p)
  pokeCStruct :: forall b.
("pFragmentShadingRates"
 ::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> PhysicalDeviceFragmentShadingRateKHR -> IO b -> IO b
pokeCStruct "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p PhysicalDeviceFragmentShadingRateKHR{SampleCountFlagBits
"fragmentSize" ::: Extent2D
fragmentSize :: "fragmentSize" ::: Extent2D
sampleCounts :: SampleCountFlagBits
$sel:fragmentSize:PhysicalDeviceFragmentShadingRateKHR :: PhysicalDeviceFragmentShadingRateKHR -> "fragmentSize" ::: Extent2D
$sel:sampleCounts:PhysicalDeviceFragmentShadingRateKHR :: PhysicalDeviceFragmentShadingRateKHR -> SampleCountFlagBits
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
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 (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SampleCountFlags)) (SampleCountFlagBits
sampleCounts)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
fragmentSize)
    IO b
f
  cStructSize :: Int
cStructSize = Int
32
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
("pFragmentShadingRates"
 ::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO b -> IO b
pokeZeroCStruct "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
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 (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SampleCountFlags)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Extent2D)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct PhysicalDeviceFragmentShadingRateKHR where
  peekCStruct :: ("pFragmentShadingRates"
 ::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO PhysicalDeviceFragmentShadingRateKHR
peekCStruct "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p = do
    SampleCountFlagBits
sampleCounts <- forall a. Storable a => Ptr a -> IO a
peek @SampleCountFlags (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SampleCountFlags))
    "fragmentSize" ::: Extent2D
fragmentSize <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Extent2D))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ SampleCountFlagBits
-> ("fragmentSize" ::: Extent2D)
-> PhysicalDeviceFragmentShadingRateKHR
PhysicalDeviceFragmentShadingRateKHR
             SampleCountFlagBits
sampleCounts "fragmentSize" ::: Extent2D
fragmentSize

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

instance Zero PhysicalDeviceFragmentShadingRateKHR where
  zero :: PhysicalDeviceFragmentShadingRateKHR
zero = SampleCountFlagBits
-> ("fragmentSize" ::: Extent2D)
-> PhysicalDeviceFragmentShadingRateKHR
PhysicalDeviceFragmentShadingRateKHR
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


-- | VkFragmentShadingRateCombinerOpKHR - Control how fragment shading rates
-- are combined
--
-- = Description
--
-- where combine(Axy,Bxy) is the combine operation, and Axy and Bxy are the
-- inputs to the operation.
--
-- If
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-fragmentShadingRateStrictMultiplyCombiner fragmentShadingRateStrictMultiplyCombiner>
-- is 'Vulkan.Core10.FundamentalTypes.FALSE', using
-- 'FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR' with values of 1 for both A
-- and B in the same dimension results in the value 2 being produced for
-- that dimension. See the definition of
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-fragmentShadingRateStrictMultiplyCombiner fragmentShadingRateStrictMultiplyCombiner>
-- for more information.
--
-- These operations are performed in a component-wise fashion.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_fragment_shading_rate VK_KHR_fragment_shading_rate>,
-- 'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.PipelineFragmentShadingRateEnumStateCreateInfoNV',
-- 'PipelineFragmentShadingRateStateCreateInfoKHR',
-- 'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.cmdSetFragmentShadingRateEnumNV',
-- 'cmdSetFragmentShadingRateKHR'
newtype FragmentShadingRateCombinerOpKHR = FragmentShadingRateCombinerOpKHR Int32
  deriving newtype (FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
$c/= :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
== :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
$c== :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
Eq, Eq FragmentShadingRateCombinerOpKHR
FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Ordering
FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
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 :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
$cmin :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
max :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
$cmax :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
>= :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
$c>= :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
> :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
$c> :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
<= :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
$c<= :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
< :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
$c< :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
compare :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Ordering
$ccompare :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Ordering
Ord, Ptr FragmentShadingRateCombinerOpKHR
-> IO FragmentShadingRateCombinerOpKHR
Ptr FragmentShadingRateCombinerOpKHR
-> Int -> IO FragmentShadingRateCombinerOpKHR
Ptr FragmentShadingRateCombinerOpKHR
-> Int -> FragmentShadingRateCombinerOpKHR -> IO ()
Ptr FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> IO ()
FragmentShadingRateCombinerOpKHR -> Int
forall b. Ptr b -> Int -> IO FragmentShadingRateCombinerOpKHR
forall b. Ptr b -> Int -> FragmentShadingRateCombinerOpKHR -> 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 FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> IO ()
$cpoke :: Ptr FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> IO ()
peek :: Ptr FragmentShadingRateCombinerOpKHR
-> IO FragmentShadingRateCombinerOpKHR
$cpeek :: Ptr FragmentShadingRateCombinerOpKHR
-> IO FragmentShadingRateCombinerOpKHR
pokeByteOff :: forall b. Ptr b -> Int -> FragmentShadingRateCombinerOpKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> FragmentShadingRateCombinerOpKHR -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO FragmentShadingRateCombinerOpKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO FragmentShadingRateCombinerOpKHR
pokeElemOff :: Ptr FragmentShadingRateCombinerOpKHR
-> Int -> FragmentShadingRateCombinerOpKHR -> IO ()
$cpokeElemOff :: Ptr FragmentShadingRateCombinerOpKHR
-> Int -> FragmentShadingRateCombinerOpKHR -> IO ()
peekElemOff :: Ptr FragmentShadingRateCombinerOpKHR
-> Int -> IO FragmentShadingRateCombinerOpKHR
$cpeekElemOff :: Ptr FragmentShadingRateCombinerOpKHR
-> Int -> IO FragmentShadingRateCombinerOpKHR
alignment :: FragmentShadingRateCombinerOpKHR -> Int
$calignment :: FragmentShadingRateCombinerOpKHR -> Int
sizeOf :: FragmentShadingRateCombinerOpKHR -> Int
$csizeOf :: FragmentShadingRateCombinerOpKHR -> Int
Storable, FragmentShadingRateCombinerOpKHR
forall a. a -> Zero a
zero :: FragmentShadingRateCombinerOpKHR
$czero :: FragmentShadingRateCombinerOpKHR
Zero)

-- | 'FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR' specifies a combiner
-- operation of combine(Axy,Bxy) = Axy.
pattern $bFRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR :: FragmentShadingRateCombinerOpKHR
$mFRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR :: forall {r}.
FragmentShadingRateCombinerOpKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR = FragmentShadingRateCombinerOpKHR 0

-- | 'FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR' specifies a combiner
-- operation of combine(Axy,Bxy) = Bxy.
pattern $bFRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR :: FragmentShadingRateCombinerOpKHR
$mFRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR :: forall {r}.
FragmentShadingRateCombinerOpKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR = FragmentShadingRateCombinerOpKHR 1

-- | 'FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR' specifies a combiner
-- operation of combine(Axy,Bxy) = min(Axy,Bxy).
pattern $bFRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR :: FragmentShadingRateCombinerOpKHR
$mFRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR :: forall {r}.
FragmentShadingRateCombinerOpKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR = FragmentShadingRateCombinerOpKHR 2

-- | 'FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR' specifies a combiner
-- operation of combine(Axy,Bxy) = max(Axy,Bxy).
pattern $bFRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR :: FragmentShadingRateCombinerOpKHR
$mFRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR :: forall {r}.
FragmentShadingRateCombinerOpKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR = FragmentShadingRateCombinerOpKHR 3

-- | 'FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR' specifies a combiner
-- operation of combine(Axy,Bxy) = Axy*Bxy.
pattern $bFRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR :: FragmentShadingRateCombinerOpKHR
$mFRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR :: forall {r}.
FragmentShadingRateCombinerOpKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR = FragmentShadingRateCombinerOpKHR 4

{-# COMPLETE
  FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR
  , FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR
  , FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR
  , FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR
  , FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR ::
    FragmentShadingRateCombinerOpKHR
  #-}

conNameFragmentShadingRateCombinerOpKHR :: String
conNameFragmentShadingRateCombinerOpKHR :: String
conNameFragmentShadingRateCombinerOpKHR = String
"FragmentShadingRateCombinerOpKHR"

enumPrefixFragmentShadingRateCombinerOpKHR :: String
enumPrefixFragmentShadingRateCombinerOpKHR :: String
enumPrefixFragmentShadingRateCombinerOpKHR = String
"FRAGMENT_SHADING_RATE_COMBINER_OP_"

showTableFragmentShadingRateCombinerOpKHR :: [(FragmentShadingRateCombinerOpKHR, String)]
showTableFragmentShadingRateCombinerOpKHR :: [(FragmentShadingRateCombinerOpKHR, String)]
showTableFragmentShadingRateCombinerOpKHR =
  [
    ( FragmentShadingRateCombinerOpKHR
FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR
    , String
"KEEP_KHR"
    )
  ,
    ( FragmentShadingRateCombinerOpKHR
FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR
    , String
"REPLACE_KHR"
    )
  ,
    ( FragmentShadingRateCombinerOpKHR
FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR
    , String
"MIN_KHR"
    )
  ,
    ( FragmentShadingRateCombinerOpKHR
FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR
    , String
"MAX_KHR"
    )
  ,
    ( FragmentShadingRateCombinerOpKHR
FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR
    , String
"MUL_KHR"
    )
  ]

instance Show FragmentShadingRateCombinerOpKHR where
  showsPrec :: Int -> FragmentShadingRateCombinerOpKHR -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixFragmentShadingRateCombinerOpKHR
      [(FragmentShadingRateCombinerOpKHR, String)]
showTableFragmentShadingRateCombinerOpKHR
      String
conNameFragmentShadingRateCombinerOpKHR
      (\(FragmentShadingRateCombinerOpKHR Int32
x) -> Int32
x)
      (forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read FragmentShadingRateCombinerOpKHR where
  readPrec :: ReadPrec FragmentShadingRateCombinerOpKHR
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixFragmentShadingRateCombinerOpKHR
      [(FragmentShadingRateCombinerOpKHR, String)]
showTableFragmentShadingRateCombinerOpKHR
      String
conNameFragmentShadingRateCombinerOpKHR
      Int32 -> FragmentShadingRateCombinerOpKHR
FragmentShadingRateCombinerOpKHR

type KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION = 2

-- No documentation found for TopLevel "VK_KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION"
pattern KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION :: forall a . Integral a => a
pattern $bKHR_FRAGMENT_SHADING_RATE_SPEC_VERSION :: forall a. Integral a => a
$mKHR_FRAGMENT_SHADING_RATE_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION = 2


type KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME = "VK_KHR_fragment_shading_rate"

-- No documentation found for TopLevel "VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME"
pattern KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bKHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mKHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME = "VK_KHR_fragment_shading_rate"