{-# language CPP #-}
-- | = Name
--
-- VK_EXT_provoking_vertex - device extension
--
-- == VK_EXT_provoking_vertex
--
-- [__Name String__]
--     @VK_EXT_provoking_vertex@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     255
--
-- [__Revision__]
--     1
--
-- [__Ratification Status__]
--     Not ratified
--
-- [__Extension and Version Dependencies__]
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_get_physical_device_properties2 VK_KHR_get_physical_device_properties2>
--
-- [__Special Use__]
--
--     -   <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#extendingvulkan-compatibility-specialuse OpenGL \/ ES support>
--
-- [__Contact__]
--
--     -   Jesse Hall
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_EXT_provoking_vertex] @jessehall%0A*Here describe the issue or question you have about the VK_EXT_provoking_vertex extension* >
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2021-02-22
--
-- [__IP Status__]
--     No known IP claims.
--
-- [__Contributors__]
--
--     -   Alexis Hétu, Google
--
--     -   Bill Licea-Kane, Qualcomm
--
--     -   Daniel Koch, Nvidia
--
--     -   Jamie Madill, Google
--
--     -   Jan-Harald Fredriksen, Arm
--
--     -   Faith Ekstrand, Intel
--
--     -   Jeff Bolz, Nvidia
--
--     -   Jeff Leger, Qualcomm
--
--     -   Jesse Hall, Google
--
--     -   Jörg Wagner, Arm
--
--     -   Matthew Netsch, Qualcomm
--
--     -   Mike Blumenkrantz, Valve
--
--     -   Piers Daniell, Nvidia
--
--     -   Tobias Hector, AMD
--
-- == Description
--
-- This extension allows changing the provoking vertex convention between
-- Vulkan’s default convention (first vertex) and OpenGL’s convention (last
-- vertex).
--
-- This extension is intended for use by API-translation layers that
-- implement APIs like OpenGL on top of Vulkan, and need to match the
-- source API’s provoking vertex convention. Applications using Vulkan
-- directly should use Vulkan’s default convention.
--
-- == New Structures
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
--     'Vulkan.Core10.Device.DeviceCreateInfo':
--
--     -   'PhysicalDeviceProvokingVertexFeaturesEXT'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2':
--
--     -   'PhysicalDeviceProvokingVertexPropertiesEXT'
--
-- -   Extending
--     'Vulkan.Core10.Pipeline.PipelineRasterizationStateCreateInfo':
--
--     -   'PipelineRasterizationProvokingVertexStateCreateInfoEXT'
--
-- == New Enums
--
-- -   'ProvokingVertexModeEXT'
--
-- == New Enum Constants
--
-- -   'EXT_PROVOKING_VERTEX_EXTENSION_NAME'
--
-- -   'EXT_PROVOKING_VERTEX_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT'
--
-- == Issues
--
-- 1) At what granularity should this state be set?
--
-- __RESOLVED__: At pipeline bind, with an optional per-render pass
-- restriction.
--
-- The most natural place to put this state is in the graphics pipeline
-- object. Some implementations require it to be known when creating the
-- pipeline, and pipeline state is convenient for implementing OpenGL 3.2’s
-- glProvokingVertex, which can change the state between draw calls.
-- However, some implementations can only change it approximately render
-- pass granularity. To accommodate both, provoking vertex will be pipeline
-- state, but implementations can require that only one mode is used within
-- a render pass instance; the render pass’s mode is chosen implicitly when
-- the first pipeline is bound.
--
-- 2) Does the provoking vertex mode affect the order that vertices are
-- written to transform feedback buffers?
--
-- __RESOLVED__: Yes, to enable layered implementations of OpenGL and D3D.
--
-- All of OpenGL, OpenGL ES, and Direct3D 11 require that vertices are
-- written to transform feedback buffers such that flat-shaded attributes
-- have the same value when drawing the contents of the transform feedback
-- buffer as they did in the original drawing when the transform feedback
-- buffer was written (assuming the provoking vertex mode has not changed,
-- in APIs that support more than one mode).
--
-- == Version History
--
-- -   Revision 1, (1c) 2021-02-22 (Jesse Hall)
--
--     -   Added
--         VkPhysicalDeviceProvokingVertexPropertiesEXT::transformFeedbackPreservesTriangleFanProvokingVertex
--         to accommodate implementations that cannot change the transform
--         feedback vertex order for triangle fans.
--
-- -   Revision 1, (1b) 2020-06-14 (Jesse Hall)
--
--     -   Added
--         VkPhysicalDeviceProvokingVertexFeaturesEXT::transformFeedbackPreservesProvokingVertex
--         and required that transform feedback write vertices so as to
--         preserve the provoking vertex of each primitive.
--
-- -   Revision 1, (1a) 2019-10-23 (Jesse Hall)
--
--     -   Initial draft, based on a proposal by Alexis Hétu
--
-- == See Also
--
-- 'PhysicalDeviceProvokingVertexFeaturesEXT',
-- 'PhysicalDeviceProvokingVertexPropertiesEXT',
-- 'PipelineRasterizationProvokingVertexStateCreateInfoEXT',
-- 'ProvokingVertexModeEXT'
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VK_EXT_provoking_vertex Vulkan Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_EXT_provoking_vertex  ( PhysicalDeviceProvokingVertexFeaturesEXT(..)
                                                  , PhysicalDeviceProvokingVertexPropertiesEXT(..)
                                                  , PipelineRasterizationProvokingVertexStateCreateInfoEXT(..)
                                                  , ProvokingVertexModeEXT( PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT
                                                                          , PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT
                                                                          , ..
                                                                          )
                                                  , EXT_PROVOKING_VERTEX_SPEC_VERSION
                                                  , pattern EXT_PROVOKING_VERTEX_SPEC_VERSION
                                                  , EXT_PROVOKING_VERTEX_EXTENSION_NAME
                                                  , pattern EXT_PROVOKING_VERTEX_EXTENSION_NAME
                                                  ) where

import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showsPrec)
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 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 Data.Int (Int32)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Kind (Type)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT))
-- | VkPhysicalDeviceProvokingVertexFeaturesEXT - Structure describing the
-- provoking vertex features that can be supported by an implementation
--
-- = Members
--
-- This structure describes the following features:
--
-- = Description
--
-- If the 'PhysicalDeviceProvokingVertexFeaturesEXT' 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. 'PhysicalDeviceProvokingVertexFeaturesEXT' /can/ also be used
-- in the @pNext@ chain of 'Vulkan.Core10.Device.DeviceCreateInfo' to
-- selectively enable these features.
--
-- When 'PhysicalDeviceProvokingVertexFeaturesEXT' is in the @pNext@ chain
-- of 'Vulkan.Core10.Device.DeviceCreateInfo' but the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-transformFeedback transformFeedback>
-- feature is not enabled, the value of
-- @transformFeedbackPreservesProvokingVertex@ is ignored.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_provoking_vertex VK_EXT_provoking_vertex>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceProvokingVertexFeaturesEXT = PhysicalDeviceProvokingVertexFeaturesEXT
  { -- | #features-provokingVertexLast# @provokingVertexLast@ indicates whether
    -- the implementation supports the 'PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT'
    -- <VkProvokingVertexModeEXT.html provoking vertex mode> for flat shading.
    PhysicalDeviceProvokingVertexFeaturesEXT -> Bool
provokingVertexLast :: Bool
  , -- | #features-transformFeedbackPreservesProvokingVertex#
    -- @transformFeedbackPreservesProvokingVertex@ indicates that the order of
    -- vertices within each primitive written by transform feedback will
    -- preserve the provoking vertex. This does not apply to triangle fan
    -- primitives when
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-transformFeedbackPreservesTriangleFanProvokingVertex transformFeedbackPreservesTriangleFanProvokingVertex>
    -- is 'Vulkan.Core10.FundamentalTypes.FALSE'.
    -- @transformFeedbackPreservesProvokingVertex@ /must/ be
    -- 'Vulkan.Core10.FundamentalTypes.FALSE' when the
    -- @VK_EXT_transform_feedback@ extension is not supported.
    PhysicalDeviceProvokingVertexFeaturesEXT -> Bool
transformFeedbackPreservesProvokingVertex :: Bool
  }
  deriving (Typeable, PhysicalDeviceProvokingVertexFeaturesEXT
-> PhysicalDeviceProvokingVertexFeaturesEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceProvokingVertexFeaturesEXT
-> PhysicalDeviceProvokingVertexFeaturesEXT -> Bool
$c/= :: PhysicalDeviceProvokingVertexFeaturesEXT
-> PhysicalDeviceProvokingVertexFeaturesEXT -> Bool
== :: PhysicalDeviceProvokingVertexFeaturesEXT
-> PhysicalDeviceProvokingVertexFeaturesEXT -> Bool
$c== :: PhysicalDeviceProvokingVertexFeaturesEXT
-> PhysicalDeviceProvokingVertexFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceProvokingVertexFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceProvokingVertexFeaturesEXT

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

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

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

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


-- | VkPhysicalDeviceProvokingVertexPropertiesEXT - Structure describing
-- provoking vertex properties supported by an implementation
--
-- = Description
--
-- If the 'PhysicalDeviceProvokingVertexPropertiesEXT' 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.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_provoking_vertex VK_EXT_provoking_vertex>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceProvokingVertexPropertiesEXT = PhysicalDeviceProvokingVertexPropertiesEXT
  { -- | #limits-provokingVertexModePerPipeline# @provokingVertexModePerPipeline@
    -- indicates whether the implementation supports graphics pipelines with
    -- different provoking vertex modes within the same render pass instance.
    PhysicalDeviceProvokingVertexPropertiesEXT -> Bool
provokingVertexModePerPipeline :: Bool
  , -- | #limits-transformFeedbackPreservesTriangleFanProvokingVertex#
    -- @transformFeedbackPreservesTriangleFanProvokingVertex@ indicates whether
    -- the implementation can preserve the provoking vertex order when writing
    -- triangle fan vertices to transform feedback.
    PhysicalDeviceProvokingVertexPropertiesEXT -> Bool
transformFeedbackPreservesTriangleFanProvokingVertex :: Bool
  }
  deriving (Typeable, PhysicalDeviceProvokingVertexPropertiesEXT
-> PhysicalDeviceProvokingVertexPropertiesEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceProvokingVertexPropertiesEXT
-> PhysicalDeviceProvokingVertexPropertiesEXT -> Bool
$c/= :: PhysicalDeviceProvokingVertexPropertiesEXT
-> PhysicalDeviceProvokingVertexPropertiesEXT -> Bool
== :: PhysicalDeviceProvokingVertexPropertiesEXT
-> PhysicalDeviceProvokingVertexPropertiesEXT -> Bool
$c== :: PhysicalDeviceProvokingVertexPropertiesEXT
-> PhysicalDeviceProvokingVertexPropertiesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceProvokingVertexPropertiesEXT)
#endif
deriving instance Show PhysicalDeviceProvokingVertexPropertiesEXT

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

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

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

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


-- | VkPipelineRasterizationProvokingVertexStateCreateInfoEXT - Structure
-- specifying provoking vertex mode used by a graphics pipeline
--
-- = Description
--
-- If this struct is not provided when creating the pipeline, the pipeline
-- will use the 'PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT' mode.
--
-- If the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-provokingVertexModePerPipeline provokingVertexModePerPipeline>
-- limit is 'Vulkan.Core10.FundamentalTypes.FALSE', then all pipelines
-- bound within a render pass instance /must/ have the same
-- @provokingVertexMode@.
--
-- == Valid Usage
--
-- -   #VUID-VkPipelineRasterizationProvokingVertexStateCreateInfoEXT-provokingVertexMode-04883#
--     If @provokingVertexMode@ is 'PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT',
--     then the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-provokingVertexLast provokingVertexLast>
--     feature /must/ be enabled
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkPipelineRasterizationProvokingVertexStateCreateInfoEXT-sType-sType#
--     @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT'
--
-- -   #VUID-VkPipelineRasterizationProvokingVertexStateCreateInfoEXT-provokingVertexMode-parameter#
--     @provokingVertexMode@ /must/ be a valid 'ProvokingVertexModeEXT'
--     value
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_provoking_vertex VK_EXT_provoking_vertex>,
-- 'ProvokingVertexModeEXT',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PipelineRasterizationProvokingVertexStateCreateInfoEXT = PipelineRasterizationProvokingVertexStateCreateInfoEXT
  { -- | @provokingVertexMode@ is a 'ProvokingVertexModeEXT' value selecting the
    -- provoking vertex mode.
    PipelineRasterizationProvokingVertexStateCreateInfoEXT
-> ProvokingVertexModeEXT
provokingVertexMode :: ProvokingVertexModeEXT }
  deriving (Typeable, PipelineRasterizationProvokingVertexStateCreateInfoEXT
-> PipelineRasterizationProvokingVertexStateCreateInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineRasterizationProvokingVertexStateCreateInfoEXT
-> PipelineRasterizationProvokingVertexStateCreateInfoEXT -> Bool
$c/= :: PipelineRasterizationProvokingVertexStateCreateInfoEXT
-> PipelineRasterizationProvokingVertexStateCreateInfoEXT -> Bool
== :: PipelineRasterizationProvokingVertexStateCreateInfoEXT
-> PipelineRasterizationProvokingVertexStateCreateInfoEXT -> Bool
$c== :: PipelineRasterizationProvokingVertexStateCreateInfoEXT
-> PipelineRasterizationProvokingVertexStateCreateInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineRasterizationProvokingVertexStateCreateInfoEXT)
#endif
deriving instance Show PipelineRasterizationProvokingVertexStateCreateInfoEXT

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

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

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

instance Zero PipelineRasterizationProvokingVertexStateCreateInfoEXT where
  zero :: PipelineRasterizationProvokingVertexStateCreateInfoEXT
zero = ProvokingVertexModeEXT
-> PipelineRasterizationProvokingVertexStateCreateInfoEXT
PipelineRasterizationProvokingVertexStateCreateInfoEXT
           forall a. Zero a => a
zero


-- | VkProvokingVertexModeEXT - Specify which vertex in a primitive is the
-- provoking vertex
--
-- = Description
--
-- These modes are described more precisely in
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#drawing-primitive-topologies Primitive Topologies>.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_provoking_vertex VK_EXT_provoking_vertex>,
-- 'PipelineRasterizationProvokingVertexStateCreateInfoEXT',
-- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state3.cmdSetProvokingVertexModeEXT'
newtype ProvokingVertexModeEXT = ProvokingVertexModeEXT Int32
  deriving newtype (ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> Bool
$c/= :: ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> Bool
== :: ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> Bool
$c== :: ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> Bool
Eq, Eq ProvokingVertexModeEXT
ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> Bool
ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> Ordering
ProvokingVertexModeEXT
-> ProvokingVertexModeEXT -> ProvokingVertexModeEXT
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 :: ProvokingVertexModeEXT
-> ProvokingVertexModeEXT -> ProvokingVertexModeEXT
$cmin :: ProvokingVertexModeEXT
-> ProvokingVertexModeEXT -> ProvokingVertexModeEXT
max :: ProvokingVertexModeEXT
-> ProvokingVertexModeEXT -> ProvokingVertexModeEXT
$cmax :: ProvokingVertexModeEXT
-> ProvokingVertexModeEXT -> ProvokingVertexModeEXT
>= :: ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> Bool
$c>= :: ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> Bool
> :: ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> Bool
$c> :: ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> Bool
<= :: ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> Bool
$c<= :: ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> Bool
< :: ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> Bool
$c< :: ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> Bool
compare :: ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> Ordering
$ccompare :: ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> Ordering
Ord, Ptr ProvokingVertexModeEXT -> IO ProvokingVertexModeEXT
Ptr ProvokingVertexModeEXT -> Int -> IO ProvokingVertexModeEXT
Ptr ProvokingVertexModeEXT
-> Int -> ProvokingVertexModeEXT -> IO ()
Ptr ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> IO ()
ProvokingVertexModeEXT -> Int
forall b. Ptr b -> Int -> IO ProvokingVertexModeEXT
forall b. Ptr b -> Int -> ProvokingVertexModeEXT -> 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 ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> IO ()
$cpoke :: Ptr ProvokingVertexModeEXT -> ProvokingVertexModeEXT -> IO ()
peek :: Ptr ProvokingVertexModeEXT -> IO ProvokingVertexModeEXT
$cpeek :: Ptr ProvokingVertexModeEXT -> IO ProvokingVertexModeEXT
pokeByteOff :: forall b. Ptr b -> Int -> ProvokingVertexModeEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ProvokingVertexModeEXT -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO ProvokingVertexModeEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ProvokingVertexModeEXT
pokeElemOff :: Ptr ProvokingVertexModeEXT
-> Int -> ProvokingVertexModeEXT -> IO ()
$cpokeElemOff :: Ptr ProvokingVertexModeEXT
-> Int -> ProvokingVertexModeEXT -> IO ()
peekElemOff :: Ptr ProvokingVertexModeEXT -> Int -> IO ProvokingVertexModeEXT
$cpeekElemOff :: Ptr ProvokingVertexModeEXT -> Int -> IO ProvokingVertexModeEXT
alignment :: ProvokingVertexModeEXT -> Int
$calignment :: ProvokingVertexModeEXT -> Int
sizeOf :: ProvokingVertexModeEXT -> Int
$csizeOf :: ProvokingVertexModeEXT -> Int
Storable, ProvokingVertexModeEXT
forall a. a -> Zero a
zero :: ProvokingVertexModeEXT
$czero :: ProvokingVertexModeEXT
Zero)

-- | 'PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT' specifies that the provoking
-- vertex is the first non-adjacency vertex in the list of vertices used by
-- a primitive.
pattern $bPROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT :: ProvokingVertexModeEXT
$mPROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT :: forall {r}.
ProvokingVertexModeEXT -> ((# #) -> r) -> ((# #) -> r) -> r
PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT = ProvokingVertexModeEXT 0

-- | 'PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT' specifies that the provoking
-- vertex is the last non-adjacency vertex in the list of vertices used by
-- a primitive.
pattern $bPROVOKING_VERTEX_MODE_LAST_VERTEX_EXT :: ProvokingVertexModeEXT
$mPROVOKING_VERTEX_MODE_LAST_VERTEX_EXT :: forall {r}.
ProvokingVertexModeEXT -> ((# #) -> r) -> ((# #) -> r) -> r
PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT = ProvokingVertexModeEXT 1

{-# COMPLETE
  PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT
  , PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT ::
    ProvokingVertexModeEXT
  #-}

conNameProvokingVertexModeEXT :: String
conNameProvokingVertexModeEXT :: String
conNameProvokingVertexModeEXT = String
"ProvokingVertexModeEXT"

enumPrefixProvokingVertexModeEXT :: String
enumPrefixProvokingVertexModeEXT :: String
enumPrefixProvokingVertexModeEXT = String
"PROVOKING_VERTEX_MODE_"

showTableProvokingVertexModeEXT :: [(ProvokingVertexModeEXT, String)]
showTableProvokingVertexModeEXT :: [(ProvokingVertexModeEXT, String)]
showTableProvokingVertexModeEXT =
  [
    ( ProvokingVertexModeEXT
PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT
    , String
"FIRST_VERTEX_EXT"
    )
  ,
    ( ProvokingVertexModeEXT
PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT
    , String
"LAST_VERTEX_EXT"
    )
  ]

instance Show ProvokingVertexModeEXT where
  showsPrec :: Int -> ProvokingVertexModeEXT -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixProvokingVertexModeEXT
      [(ProvokingVertexModeEXT, String)]
showTableProvokingVertexModeEXT
      String
conNameProvokingVertexModeEXT
      (\(ProvokingVertexModeEXT Int32
x) -> Int32
x)
      (forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read ProvokingVertexModeEXT where
  readPrec :: ReadPrec ProvokingVertexModeEXT
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixProvokingVertexModeEXT
      [(ProvokingVertexModeEXT, String)]
showTableProvokingVertexModeEXT
      String
conNameProvokingVertexModeEXT
      Int32 -> ProvokingVertexModeEXT
ProvokingVertexModeEXT

type EXT_PROVOKING_VERTEX_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_EXT_PROVOKING_VERTEX_SPEC_VERSION"
pattern EXT_PROVOKING_VERTEX_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_PROVOKING_VERTEX_SPEC_VERSION :: forall a. Integral a => a
$mEXT_PROVOKING_VERTEX_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_PROVOKING_VERTEX_SPEC_VERSION = 1


type EXT_PROVOKING_VERTEX_EXTENSION_NAME = "VK_EXT_provoking_vertex"

-- No documentation found for TopLevel "VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME"
pattern EXT_PROVOKING_VERTEX_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_PROVOKING_VERTEX_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_PROVOKING_VERTEX_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_PROVOKING_VERTEX_EXTENSION_NAME = "VK_EXT_provoking_vertex"