{-# language CPP #-}
module Vulkan.Extensions.VK_NV_framebuffer_mixed_samples  ( PipelineCoverageModulationStateCreateInfoNV(..)
                                                          , PipelineCoverageModulationStateCreateFlagsNV(..)
                                                          , CoverageModulationModeNV( COVERAGE_MODULATION_MODE_NONE_NV
                                                                                    , COVERAGE_MODULATION_MODE_RGB_NV
                                                                                    , COVERAGE_MODULATION_MODE_ALPHA_NV
                                                                                    , COVERAGE_MODULATION_MODE_RGBA_NV
                                                                                    , ..
                                                                                    )
                                                          , NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION
                                                          , pattern NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION
                                                          , NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME
                                                          , pattern NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME
                                                          ) where

import Control.Monad (unless)
import Foreign.Marshal.Alloc (allocaBytesAligned)
import GHC.IO (throwIO)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Numeric (showHex)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Data.Vector (generateM)
import qualified Data.Vector (imapM_)
import qualified Data.Vector (length)
import qualified Data.Vector (null)
import Data.Bits (Bits)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.C.Types (CFloat)
import Foreign.C.Types (CFloat(CFloat))
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Data.Int (Int32)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import Data.Word (Word32)
import Text.Read.Lex (Lexeme(Ident))
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.BaseType (bool32ToBool)
import Vulkan.Core10.BaseType (boolToBool32)
import Vulkan.Core10.BaseType (Bool32)
import Vulkan.Core10.BaseType (Flags)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV))
-- | VkPipelineCoverageModulationStateCreateInfoNV - Structure specifying
-- parameters controlling coverage modulation
--
-- = Description
--
-- If @coverageModulationTableEnable@ is 'Vulkan.Core10.BaseType.FALSE',
-- then for each color sample the associated bits of the fragment’s
-- coverage are counted and divided by the number of associated bits to
-- produce a modulation factor R in the range (0,1] (a value of zero would
-- have been killed due to a color coverage of 0). Specifically:
--
-- -   N = value of @rasterizationSamples@
--
-- -   M = value of 'Vulkan.Core10.Pass.AttachmentDescription'::@samples@
--     for any color attachments
--
-- -   R = popcount(associated coverage bits) \/ (N \/ M)
--
-- If @coverageModulationTableEnable@ is 'Vulkan.Core10.BaseType.TRUE', the
-- value R is computed using a programmable lookup table. The lookup table
-- has N \/ M elements, and the element of the table is selected by:
--
-- -   R = @pCoverageModulationTable@[popcount(associated coverage bits)-1]
--
-- Note that the table does not have an entry for popcount(associated
-- coverage bits) = 0, because such samples would have been killed.
--
-- The values of @pCoverageModulationTable@ /may/ be rounded to an
-- implementation-dependent precision, which is at least as fine as 1 \/ N,
-- and clamped to [0,1].
--
-- For each color attachment with a floating point or normalized color
-- format, each fragment output color value is replicated to M values which
-- /can/ each be modulated (multiplied) by that color sample’s associated
-- value of R. Which components are modulated is controlled by
-- @coverageModulationMode@.
--
-- If this structure is not present, it is as if @coverageModulationMode@
-- is 'COVERAGE_MODULATION_MODE_NONE_NV'.
--
-- If the
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fragops-coverage-reduction coverage reduction mode>
-- is
-- 'Vulkan.Extensions.VK_NV_coverage_reduction_mode.COVERAGE_REDUCTION_MODE_TRUNCATE_NV',
-- each color sample is associated with only a single coverage sample. In
-- this case, it is as if @coverageModulationMode@ is
-- 'COVERAGE_MODULATION_MODE_NONE_NV'.
--
-- == Valid Usage
--
-- -   If @coverageModulationTableEnable@ is 'Vulkan.Core10.BaseType.TRUE',
--     @coverageModulationTableCount@ /must/ be equal to the number of
--     rasterization samples divided by the number of color samples in the
--     subpass
--
-- == Valid Usage (Implicit)
--
-- -   @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV'
--
-- -   @flags@ /must/ be @0@
--
-- -   @coverageModulationMode@ /must/ be a valid
--     'CoverageModulationModeNV' value
--
-- = See Also
--
-- 'Vulkan.Core10.BaseType.Bool32', 'CoverageModulationModeNV',
-- 'PipelineCoverageModulationStateCreateFlagsNV',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PipelineCoverageModulationStateCreateInfoNV = PipelineCoverageModulationStateCreateInfoNV
  { -- | @flags@ is reserved for future use.
    PipelineCoverageModulationStateCreateInfoNV
-> PipelineCoverageModulationStateCreateFlagsNV
flags :: PipelineCoverageModulationStateCreateFlagsNV
  , -- | @coverageModulationMode@ is a 'CoverageModulationModeNV' value
    -- controlling which color components are modulated.
    PipelineCoverageModulationStateCreateInfoNV
-> CoverageModulationModeNV
coverageModulationMode :: CoverageModulationModeNV
  , -- | @coverageModulationTableEnable@ controls whether the modulation factor
    -- is looked up from a table in @pCoverageModulationTable@.
    PipelineCoverageModulationStateCreateInfoNV -> Bool
coverageModulationTableEnable :: Bool
  , -- | @coverageModulationTableCount@ is the number of elements in
    -- @pCoverageModulationTable@.
    PipelineCoverageModulationStateCreateInfoNV -> Word32
coverageModulationTableCount :: Word32
  , -- | @pCoverageModulationTable@ is a table of modulation factors containing a
    -- value for each number of covered samples.
    PipelineCoverageModulationStateCreateInfoNV -> Vector Float
coverageModulationTable :: Vector Float
  }
  deriving (Typeable)
deriving instance Show PipelineCoverageModulationStateCreateInfoNV

instance ToCStruct PipelineCoverageModulationStateCreateInfoNV where
  withCStruct :: PipelineCoverageModulationStateCreateInfoNV
-> (Ptr PipelineCoverageModulationStateCreateInfoNV -> IO b)
-> IO b
withCStruct x :: PipelineCoverageModulationStateCreateInfoNV
x f :: Ptr PipelineCoverageModulationStateCreateInfoNV -> IO b
f = Int
-> Int
-> (Ptr PipelineCoverageModulationStateCreateInfoNV -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 40 8 ((Ptr PipelineCoverageModulationStateCreateInfoNV -> IO b) -> IO b)
-> (Ptr PipelineCoverageModulationStateCreateInfoNV -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PipelineCoverageModulationStateCreateInfoNV
p -> Ptr PipelineCoverageModulationStateCreateInfoNV
-> PipelineCoverageModulationStateCreateInfoNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineCoverageModulationStateCreateInfoNV
p PipelineCoverageModulationStateCreateInfoNV
x (Ptr PipelineCoverageModulationStateCreateInfoNV -> IO b
f Ptr PipelineCoverageModulationStateCreateInfoNV
p)
  pokeCStruct :: Ptr PipelineCoverageModulationStateCreateInfoNV
-> PipelineCoverageModulationStateCreateInfoNV -> IO b -> IO b
pokeCStruct p :: Ptr PipelineCoverageModulationStateCreateInfoNV
p PipelineCoverageModulationStateCreateInfoNV{..} f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p Ptr PipelineCoverageModulationStateCreateInfoNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p Ptr PipelineCoverageModulationStateCreateInfoNV
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p Ptr PipelineCoverageModulationStateCreateInfoNV
-> Int -> Ptr PipelineCoverageModulationStateCreateFlagsNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr PipelineCoverageModulationStateCreateFlagsNV)) (PipelineCoverageModulationStateCreateFlagsNV
flags)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr CoverageModulationModeNV -> CoverageModulationModeNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p Ptr PipelineCoverageModulationStateCreateInfoNV
-> Int -> Ptr CoverageModulationModeNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr CoverageModulationModeNV)) (CoverageModulationModeNV
coverageModulationMode)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p Ptr PipelineCoverageModulationStateCreateInfoNV
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
coverageModulationTableEnable))
    let pCoverageModulationTableLength :: Int
pCoverageModulationTableLength = Vector Float -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Float -> Int) -> Vector Float -> Int
forall a b. (a -> b) -> a -> b
$ (Vector Float
coverageModulationTable)
    Word32
coverageModulationTableCount'' <- IO Word32 -> ContT b IO Word32
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Word32 -> ContT b IO Word32) -> IO Word32 -> ContT b IO Word32
forall a b. (a -> b) -> a -> b
$ if (Word32
coverageModulationTableCount) Word32 -> Word32 -> Bool
forall a. Eq a => a -> a -> Bool
== 0
      then Word32 -> IO Word32
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Word32 -> IO Word32) -> Word32 -> IO Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pCoverageModulationTableLength
      else do
        Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pCoverageModulationTableLength Word32 -> Word32 -> Bool
forall a. Eq a => a -> a -> Bool
== (Word32
coverageModulationTableCount) Bool -> Bool -> Bool
|| Int
pCoverageModulationTableLength Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== 0) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
          IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "pCoverageModulationTable must be empty or have 'coverageModulationTableCount' elements" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
        Word32 -> IO Word32
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Word32
coverageModulationTableCount)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p Ptr PipelineCoverageModulationStateCreateInfoNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32)) (Word32
coverageModulationTableCount'')
    Ptr CFloat
pCoverageModulationTable'' <- if Vector Float -> Bool
forall a. Vector a -> Bool
Data.Vector.null (Vector Float
coverageModulationTable)
      then Ptr CFloat -> ContT b IO (Ptr CFloat)
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr CFloat
forall a. Ptr a
nullPtr
      else do
        Ptr CFloat
pPCoverageModulationTable <- ((Ptr CFloat -> IO b) -> IO b) -> ContT b IO (Ptr CFloat)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr CFloat -> IO b) -> IO b) -> ContT b IO (Ptr CFloat))
-> ((Ptr CFloat -> IO b) -> IO b) -> ContT b IO (Ptr CFloat)
forall a b. (a -> b) -> a -> b
$ Int -> Int -> (Ptr CFloat -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @CFloat (((Vector Float -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Float
coverageModulationTable))) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 4) 4
        IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> Float -> IO ()) -> Vector Float -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: Float
e -> Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pPCoverageModulationTable Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e))) ((Vector Float
coverageModulationTable))
        Ptr CFloat -> ContT b IO (Ptr CFloat)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Ptr CFloat -> ContT b IO (Ptr CFloat))
-> Ptr CFloat -> ContT b IO (Ptr CFloat)
forall a b. (a -> b) -> a -> b
$ Ptr CFloat
pPCoverageModulationTable
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr CFloat) -> Ptr CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p Ptr PipelineCoverageModulationStateCreateInfoNV
-> Int -> Ptr (Ptr CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (Ptr CFloat))) Ptr CFloat
pCoverageModulationTable''
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
  cStructSize :: Int
cStructSize = 40
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr PipelineCoverageModulationStateCreateInfoNV -> IO b -> IO b
pokeZeroCStruct p :: Ptr PipelineCoverageModulationStateCreateInfoNV
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p Ptr PipelineCoverageModulationStateCreateInfoNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p Ptr PipelineCoverageModulationStateCreateInfoNV
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr CoverageModulationModeNV -> CoverageModulationModeNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p Ptr PipelineCoverageModulationStateCreateInfoNV
-> Int -> Ptr CoverageModulationModeNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr CoverageModulationModeNV)) (CoverageModulationModeNV
forall a. Zero a => a
zero)
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p Ptr PipelineCoverageModulationStateCreateInfoNV
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PipelineCoverageModulationStateCreateInfoNV where
  peekCStruct :: Ptr PipelineCoverageModulationStateCreateInfoNV
-> IO PipelineCoverageModulationStateCreateInfoNV
peekCStruct p :: Ptr PipelineCoverageModulationStateCreateInfoNV
p = do
    PipelineCoverageModulationStateCreateFlagsNV
flags <- Ptr PipelineCoverageModulationStateCreateFlagsNV
-> IO PipelineCoverageModulationStateCreateFlagsNV
forall a. Storable a => Ptr a -> IO a
peek @PipelineCoverageModulationStateCreateFlagsNV ((Ptr PipelineCoverageModulationStateCreateInfoNV
p Ptr PipelineCoverageModulationStateCreateInfoNV
-> Int -> Ptr PipelineCoverageModulationStateCreateFlagsNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr PipelineCoverageModulationStateCreateFlagsNV))
    CoverageModulationModeNV
coverageModulationMode <- Ptr CoverageModulationModeNV -> IO CoverageModulationModeNV
forall a. Storable a => Ptr a -> IO a
peek @CoverageModulationModeNV ((Ptr PipelineCoverageModulationStateCreateInfoNV
p Ptr PipelineCoverageModulationStateCreateInfoNV
-> Int -> Ptr CoverageModulationModeNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr CoverageModulationModeNV))
    Bool32
coverageModulationTableEnable <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PipelineCoverageModulationStateCreateInfoNV
p Ptr PipelineCoverageModulationStateCreateInfoNV
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32))
    Word32
coverageModulationTableCount <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PipelineCoverageModulationStateCreateInfoNV
p Ptr PipelineCoverageModulationStateCreateInfoNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32))
    Ptr CFloat
pCoverageModulationTable <- Ptr (Ptr CFloat) -> IO (Ptr CFloat)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr CFloat) ((Ptr PipelineCoverageModulationStateCreateInfoNV
p Ptr PipelineCoverageModulationStateCreateInfoNV
-> Int -> Ptr (Ptr CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (Ptr CFloat)))
    let pCoverageModulationTableLength :: Int
pCoverageModulationTableLength = if Ptr CFloat
pCoverageModulationTable Ptr CFloat -> Ptr CFloat -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr CFloat
forall a. Ptr a
nullPtr then 0 else (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
coverageModulationTableCount)
    Vector Float
pCoverageModulationTable' <- Int -> (Int -> IO Float) -> IO (Vector Float)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM Int
pCoverageModulationTableLength (\i :: Int
i -> do
      CFloat
pCoverageModulationTableElem <- Ptr CFloat -> IO CFloat
forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pCoverageModulationTable Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr CFloat))
      Float -> IO Float
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Float -> IO Float) -> Float -> IO Float
forall a b. (a -> b) -> a -> b
$ (\(CFloat a :: Float
a) -> Float
a) CFloat
pCoverageModulationTableElem)
    PipelineCoverageModulationStateCreateInfoNV
-> IO PipelineCoverageModulationStateCreateInfoNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PipelineCoverageModulationStateCreateInfoNV
 -> IO PipelineCoverageModulationStateCreateInfoNV)
-> PipelineCoverageModulationStateCreateInfoNV
-> IO PipelineCoverageModulationStateCreateInfoNV
forall a b. (a -> b) -> a -> b
$ PipelineCoverageModulationStateCreateFlagsNV
-> CoverageModulationModeNV
-> Bool
-> Word32
-> Vector Float
-> PipelineCoverageModulationStateCreateInfoNV
PipelineCoverageModulationStateCreateInfoNV
             PipelineCoverageModulationStateCreateFlagsNV
flags CoverageModulationModeNV
coverageModulationMode (Bool32 -> Bool
bool32ToBool Bool32
coverageModulationTableEnable) Word32
coverageModulationTableCount Vector Float
pCoverageModulationTable'

instance Zero PipelineCoverageModulationStateCreateInfoNV where
  zero :: PipelineCoverageModulationStateCreateInfoNV
zero = PipelineCoverageModulationStateCreateFlagsNV
-> CoverageModulationModeNV
-> Bool
-> Word32
-> Vector Float
-> PipelineCoverageModulationStateCreateInfoNV
PipelineCoverageModulationStateCreateInfoNV
           PipelineCoverageModulationStateCreateFlagsNV
forall a. Zero a => a
zero
           CoverageModulationModeNV
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Vector Float
forall a. Monoid a => a
mempty


-- | VkPipelineCoverageModulationStateCreateFlagsNV - Reserved for future use
--
-- = Description
--
-- 'PipelineCoverageModulationStateCreateFlagsNV' is a bitmask type for
-- setting a mask, but is currently reserved for future use.
--
-- = See Also
--
-- 'PipelineCoverageModulationStateCreateInfoNV'
newtype PipelineCoverageModulationStateCreateFlagsNV = PipelineCoverageModulationStateCreateFlagsNV Flags
  deriving newtype (PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> Bool
(PipelineCoverageModulationStateCreateFlagsNV
 -> PipelineCoverageModulationStateCreateFlagsNV -> Bool)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> PipelineCoverageModulationStateCreateFlagsNV -> Bool)
-> Eq PipelineCoverageModulationStateCreateFlagsNV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> Bool
$c/= :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> Bool
== :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> Bool
$c== :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> Bool
Eq, Eq PipelineCoverageModulationStateCreateFlagsNV
Eq PipelineCoverageModulationStateCreateFlagsNV =>
(PipelineCoverageModulationStateCreateFlagsNV
 -> PipelineCoverageModulationStateCreateFlagsNV -> Ordering)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> PipelineCoverageModulationStateCreateFlagsNV -> Bool)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> PipelineCoverageModulationStateCreateFlagsNV -> Bool)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> PipelineCoverageModulationStateCreateFlagsNV -> Bool)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> PipelineCoverageModulationStateCreateFlagsNV -> Bool)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> PipelineCoverageModulationStateCreateFlagsNV
    -> PipelineCoverageModulationStateCreateFlagsNV)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> PipelineCoverageModulationStateCreateFlagsNV
    -> PipelineCoverageModulationStateCreateFlagsNV)
-> Ord PipelineCoverageModulationStateCreateFlagsNV
PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> Bool
PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> Ordering
PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
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 :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
$cmin :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
max :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
$cmax :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
>= :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> Bool
$c>= :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> Bool
> :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> Bool
$c> :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> Bool
<= :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> Bool
$c<= :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> Bool
< :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> Bool
$c< :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> Bool
compare :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> Ordering
$ccompare :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> Ordering
$cp1Ord :: Eq PipelineCoverageModulationStateCreateFlagsNV
Ord, Ptr b -> Int -> IO PipelineCoverageModulationStateCreateFlagsNV
Ptr b
-> Int -> PipelineCoverageModulationStateCreateFlagsNV -> IO ()
Ptr PipelineCoverageModulationStateCreateFlagsNV
-> IO PipelineCoverageModulationStateCreateFlagsNV
Ptr PipelineCoverageModulationStateCreateFlagsNV
-> Int -> IO PipelineCoverageModulationStateCreateFlagsNV
Ptr PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV -> IO ()
Ptr PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> IO ()
PipelineCoverageModulationStateCreateFlagsNV -> Int
(PipelineCoverageModulationStateCreateFlagsNV -> Int)
-> (PipelineCoverageModulationStateCreateFlagsNV -> Int)
-> (Ptr PipelineCoverageModulationStateCreateFlagsNV
    -> Int -> IO PipelineCoverageModulationStateCreateFlagsNV)
-> (Ptr PipelineCoverageModulationStateCreateFlagsNV
    -> Int -> PipelineCoverageModulationStateCreateFlagsNV -> IO ())
-> (forall b.
    Ptr b -> Int -> IO PipelineCoverageModulationStateCreateFlagsNV)
-> (forall b.
    Ptr b
    -> Int -> PipelineCoverageModulationStateCreateFlagsNV -> IO ())
-> (Ptr PipelineCoverageModulationStateCreateFlagsNV
    -> IO PipelineCoverageModulationStateCreateFlagsNV)
-> (Ptr PipelineCoverageModulationStateCreateFlagsNV
    -> PipelineCoverageModulationStateCreateFlagsNV -> IO ())
-> Storable PipelineCoverageModulationStateCreateFlagsNV
forall b.
Ptr b -> Int -> IO PipelineCoverageModulationStateCreateFlagsNV
forall b.
Ptr b
-> Int -> PipelineCoverageModulationStateCreateFlagsNV -> 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 PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> IO ()
$cpoke :: Ptr PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> IO ()
peek :: Ptr PipelineCoverageModulationStateCreateFlagsNV
-> IO PipelineCoverageModulationStateCreateFlagsNV
$cpeek :: Ptr PipelineCoverageModulationStateCreateFlagsNV
-> IO PipelineCoverageModulationStateCreateFlagsNV
pokeByteOff :: Ptr b
-> Int -> PipelineCoverageModulationStateCreateFlagsNV -> IO ()
$cpokeByteOff :: forall b.
Ptr b
-> Int -> PipelineCoverageModulationStateCreateFlagsNV -> IO ()
peekByteOff :: Ptr b -> Int -> IO PipelineCoverageModulationStateCreateFlagsNV
$cpeekByteOff :: forall b.
Ptr b -> Int -> IO PipelineCoverageModulationStateCreateFlagsNV
pokeElemOff :: Ptr PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV -> IO ()
$cpokeElemOff :: Ptr PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV -> IO ()
peekElemOff :: Ptr PipelineCoverageModulationStateCreateFlagsNV
-> Int -> IO PipelineCoverageModulationStateCreateFlagsNV
$cpeekElemOff :: Ptr PipelineCoverageModulationStateCreateFlagsNV
-> Int -> IO PipelineCoverageModulationStateCreateFlagsNV
alignment :: PipelineCoverageModulationStateCreateFlagsNV -> Int
$calignment :: PipelineCoverageModulationStateCreateFlagsNV -> Int
sizeOf :: PipelineCoverageModulationStateCreateFlagsNV -> Int
$csizeOf :: PipelineCoverageModulationStateCreateFlagsNV -> Int
Storable, PipelineCoverageModulationStateCreateFlagsNV
PipelineCoverageModulationStateCreateFlagsNV
-> Zero PipelineCoverageModulationStateCreateFlagsNV
forall a. a -> Zero a
zero :: PipelineCoverageModulationStateCreateFlagsNV
$czero :: PipelineCoverageModulationStateCreateFlagsNV
Zero, Eq PipelineCoverageModulationStateCreateFlagsNV
PipelineCoverageModulationStateCreateFlagsNV
Eq PipelineCoverageModulationStateCreateFlagsNV =>
(PipelineCoverageModulationStateCreateFlagsNV
 -> PipelineCoverageModulationStateCreateFlagsNV
 -> PipelineCoverageModulationStateCreateFlagsNV)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> PipelineCoverageModulationStateCreateFlagsNV
    -> PipelineCoverageModulationStateCreateFlagsNV)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> PipelineCoverageModulationStateCreateFlagsNV
    -> PipelineCoverageModulationStateCreateFlagsNV)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> PipelineCoverageModulationStateCreateFlagsNV)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> Int -> PipelineCoverageModulationStateCreateFlagsNV)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> Int -> PipelineCoverageModulationStateCreateFlagsNV)
-> PipelineCoverageModulationStateCreateFlagsNV
-> (Int -> PipelineCoverageModulationStateCreateFlagsNV)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> Int -> PipelineCoverageModulationStateCreateFlagsNV)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> Int -> PipelineCoverageModulationStateCreateFlagsNV)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> Int -> PipelineCoverageModulationStateCreateFlagsNV)
-> (PipelineCoverageModulationStateCreateFlagsNV -> Int -> Bool)
-> (PipelineCoverageModulationStateCreateFlagsNV -> Maybe Int)
-> (PipelineCoverageModulationStateCreateFlagsNV -> Int)
-> (PipelineCoverageModulationStateCreateFlagsNV -> Bool)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> Int -> PipelineCoverageModulationStateCreateFlagsNV)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> Int -> PipelineCoverageModulationStateCreateFlagsNV)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> Int -> PipelineCoverageModulationStateCreateFlagsNV)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> Int -> PipelineCoverageModulationStateCreateFlagsNV)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> Int -> PipelineCoverageModulationStateCreateFlagsNV)
-> (PipelineCoverageModulationStateCreateFlagsNV
    -> Int -> PipelineCoverageModulationStateCreateFlagsNV)
-> (PipelineCoverageModulationStateCreateFlagsNV -> Int)
-> Bits PipelineCoverageModulationStateCreateFlagsNV
Int -> PipelineCoverageModulationStateCreateFlagsNV
PipelineCoverageModulationStateCreateFlagsNV -> Bool
PipelineCoverageModulationStateCreateFlagsNV -> Int
PipelineCoverageModulationStateCreateFlagsNV -> Maybe Int
PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
PipelineCoverageModulationStateCreateFlagsNV -> Int -> Bool
PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
forall a.
Eq a =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: PipelineCoverageModulationStateCreateFlagsNV -> Int
$cpopCount :: PipelineCoverageModulationStateCreateFlagsNV -> Int
rotateR :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
$crotateR :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
rotateL :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
$crotateL :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
unsafeShiftR :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
$cunsafeShiftR :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
shiftR :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
$cshiftR :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
unsafeShiftL :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
$cunsafeShiftL :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
shiftL :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
$cshiftL :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
isSigned :: PipelineCoverageModulationStateCreateFlagsNV -> Bool
$cisSigned :: PipelineCoverageModulationStateCreateFlagsNV -> Bool
bitSize :: PipelineCoverageModulationStateCreateFlagsNV -> Int
$cbitSize :: PipelineCoverageModulationStateCreateFlagsNV -> Int
bitSizeMaybe :: PipelineCoverageModulationStateCreateFlagsNV -> Maybe Int
$cbitSizeMaybe :: PipelineCoverageModulationStateCreateFlagsNV -> Maybe Int
testBit :: PipelineCoverageModulationStateCreateFlagsNV -> Int -> Bool
$ctestBit :: PipelineCoverageModulationStateCreateFlagsNV -> Int -> Bool
complementBit :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
$ccomplementBit :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
clearBit :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
$cclearBit :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
setBit :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
$csetBit :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
bit :: Int -> PipelineCoverageModulationStateCreateFlagsNV
$cbit :: Int -> PipelineCoverageModulationStateCreateFlagsNV
zeroBits :: PipelineCoverageModulationStateCreateFlagsNV
$czeroBits :: PipelineCoverageModulationStateCreateFlagsNV
rotate :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
$crotate :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
shift :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
$cshift :: PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV
complement :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
$ccomplement :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
xor :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
$cxor :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
.|. :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
$c.|. :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
.&. :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
$c.&. :: PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV
$cp1Bits :: Eq PipelineCoverageModulationStateCreateFlagsNV
Bits)



instance Show PipelineCoverageModulationStateCreateFlagsNV where
  showsPrec :: Int -> PipelineCoverageModulationStateCreateFlagsNV -> ShowS
showsPrec p :: Int
p = \case
    PipelineCoverageModulationStateCreateFlagsNV x :: Word32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "PipelineCoverageModulationStateCreateFlagsNV 0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word32 -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Word32
x)

instance Read PipelineCoverageModulationStateCreateFlagsNV where
  readPrec :: ReadPrec PipelineCoverageModulationStateCreateFlagsNV
readPrec = ReadPrec PipelineCoverageModulationStateCreateFlagsNV
-> ReadPrec PipelineCoverageModulationStateCreateFlagsNV
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec PipelineCoverageModulationStateCreateFlagsNV)]
-> ReadPrec PipelineCoverageModulationStateCreateFlagsNV
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose []
                     ReadPrec PipelineCoverageModulationStateCreateFlagsNV
-> ReadPrec PipelineCoverageModulationStateCreateFlagsNV
-> ReadPrec PipelineCoverageModulationStateCreateFlagsNV
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec PipelineCoverageModulationStateCreateFlagsNV
-> ReadPrec PipelineCoverageModulationStateCreateFlagsNV
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "PipelineCoverageModulationStateCreateFlagsNV")
                       Word32
v <- ReadPrec Word32 -> ReadPrec Word32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Word32
forall a. Read a => ReadPrec a
readPrec
                       PipelineCoverageModulationStateCreateFlagsNV
-> ReadPrec PipelineCoverageModulationStateCreateFlagsNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Word32 -> PipelineCoverageModulationStateCreateFlagsNV
PipelineCoverageModulationStateCreateFlagsNV Word32
v)))


-- | VkCoverageModulationModeNV - Specify the coverage modulation mode
--
-- = See Also
--
-- 'PipelineCoverageModulationStateCreateInfoNV'
newtype CoverageModulationModeNV = CoverageModulationModeNV Int32
  deriving newtype (CoverageModulationModeNV -> CoverageModulationModeNV -> Bool
(CoverageModulationModeNV -> CoverageModulationModeNV -> Bool)
-> (CoverageModulationModeNV -> CoverageModulationModeNV -> Bool)
-> Eq CoverageModulationModeNV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CoverageModulationModeNV -> CoverageModulationModeNV -> Bool
$c/= :: CoverageModulationModeNV -> CoverageModulationModeNV -> Bool
== :: CoverageModulationModeNV -> CoverageModulationModeNV -> Bool
$c== :: CoverageModulationModeNV -> CoverageModulationModeNV -> Bool
Eq, Eq CoverageModulationModeNV
Eq CoverageModulationModeNV =>
(CoverageModulationModeNV -> CoverageModulationModeNV -> Ordering)
-> (CoverageModulationModeNV -> CoverageModulationModeNV -> Bool)
-> (CoverageModulationModeNV -> CoverageModulationModeNV -> Bool)
-> (CoverageModulationModeNV -> CoverageModulationModeNV -> Bool)
-> (CoverageModulationModeNV -> CoverageModulationModeNV -> Bool)
-> (CoverageModulationModeNV
    -> CoverageModulationModeNV -> CoverageModulationModeNV)
-> (CoverageModulationModeNV
    -> CoverageModulationModeNV -> CoverageModulationModeNV)
-> Ord CoverageModulationModeNV
CoverageModulationModeNV -> CoverageModulationModeNV -> Bool
CoverageModulationModeNV -> CoverageModulationModeNV -> Ordering
CoverageModulationModeNV
-> CoverageModulationModeNV -> CoverageModulationModeNV
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 :: CoverageModulationModeNV
-> CoverageModulationModeNV -> CoverageModulationModeNV
$cmin :: CoverageModulationModeNV
-> CoverageModulationModeNV -> CoverageModulationModeNV
max :: CoverageModulationModeNV
-> CoverageModulationModeNV -> CoverageModulationModeNV
$cmax :: CoverageModulationModeNV
-> CoverageModulationModeNV -> CoverageModulationModeNV
>= :: CoverageModulationModeNV -> CoverageModulationModeNV -> Bool
$c>= :: CoverageModulationModeNV -> CoverageModulationModeNV -> Bool
> :: CoverageModulationModeNV -> CoverageModulationModeNV -> Bool
$c> :: CoverageModulationModeNV -> CoverageModulationModeNV -> Bool
<= :: CoverageModulationModeNV -> CoverageModulationModeNV -> Bool
$c<= :: CoverageModulationModeNV -> CoverageModulationModeNV -> Bool
< :: CoverageModulationModeNV -> CoverageModulationModeNV -> Bool
$c< :: CoverageModulationModeNV -> CoverageModulationModeNV -> Bool
compare :: CoverageModulationModeNV -> CoverageModulationModeNV -> Ordering
$ccompare :: CoverageModulationModeNV -> CoverageModulationModeNV -> Ordering
$cp1Ord :: Eq CoverageModulationModeNV
Ord, Ptr b -> Int -> IO CoverageModulationModeNV
Ptr b -> Int -> CoverageModulationModeNV -> IO ()
Ptr CoverageModulationModeNV -> IO CoverageModulationModeNV
Ptr CoverageModulationModeNV -> Int -> IO CoverageModulationModeNV
Ptr CoverageModulationModeNV
-> Int -> CoverageModulationModeNV -> IO ()
Ptr CoverageModulationModeNV -> CoverageModulationModeNV -> IO ()
CoverageModulationModeNV -> Int
(CoverageModulationModeNV -> Int)
-> (CoverageModulationModeNV -> Int)
-> (Ptr CoverageModulationModeNV
    -> Int -> IO CoverageModulationModeNV)
-> (Ptr CoverageModulationModeNV
    -> Int -> CoverageModulationModeNV -> IO ())
-> (forall b. Ptr b -> Int -> IO CoverageModulationModeNV)
-> (forall b. Ptr b -> Int -> CoverageModulationModeNV -> IO ())
-> (Ptr CoverageModulationModeNV -> IO CoverageModulationModeNV)
-> (Ptr CoverageModulationModeNV
    -> CoverageModulationModeNV -> IO ())
-> Storable CoverageModulationModeNV
forall b. Ptr b -> Int -> IO CoverageModulationModeNV
forall b. Ptr b -> Int -> CoverageModulationModeNV -> 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 CoverageModulationModeNV -> CoverageModulationModeNV -> IO ()
$cpoke :: Ptr CoverageModulationModeNV -> CoverageModulationModeNV -> IO ()
peek :: Ptr CoverageModulationModeNV -> IO CoverageModulationModeNV
$cpeek :: Ptr CoverageModulationModeNV -> IO CoverageModulationModeNV
pokeByteOff :: Ptr b -> Int -> CoverageModulationModeNV -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> CoverageModulationModeNV -> IO ()
peekByteOff :: Ptr b -> Int -> IO CoverageModulationModeNV
$cpeekByteOff :: forall b. Ptr b -> Int -> IO CoverageModulationModeNV
pokeElemOff :: Ptr CoverageModulationModeNV
-> Int -> CoverageModulationModeNV -> IO ()
$cpokeElemOff :: Ptr CoverageModulationModeNV
-> Int -> CoverageModulationModeNV -> IO ()
peekElemOff :: Ptr CoverageModulationModeNV -> Int -> IO CoverageModulationModeNV
$cpeekElemOff :: Ptr CoverageModulationModeNV -> Int -> IO CoverageModulationModeNV
alignment :: CoverageModulationModeNV -> Int
$calignment :: CoverageModulationModeNV -> Int
sizeOf :: CoverageModulationModeNV -> Int
$csizeOf :: CoverageModulationModeNV -> Int
Storable, CoverageModulationModeNV
CoverageModulationModeNV -> Zero CoverageModulationModeNV
forall a. a -> Zero a
zero :: CoverageModulationModeNV
$czero :: CoverageModulationModeNV
Zero)

-- | 'COVERAGE_MODULATION_MODE_NONE_NV' specifies that no components are
-- multiplied by the modulation factor.
pattern $bCOVERAGE_MODULATION_MODE_NONE_NV :: CoverageModulationModeNV
$mCOVERAGE_MODULATION_MODE_NONE_NV :: forall r.
CoverageModulationModeNV -> (Void# -> r) -> (Void# -> r) -> r
COVERAGE_MODULATION_MODE_NONE_NV = CoverageModulationModeNV 0
-- | 'COVERAGE_MODULATION_MODE_RGB_NV' specifies that the red, green, and
-- blue components are multiplied by the modulation factor.
pattern $bCOVERAGE_MODULATION_MODE_RGB_NV :: CoverageModulationModeNV
$mCOVERAGE_MODULATION_MODE_RGB_NV :: forall r.
CoverageModulationModeNV -> (Void# -> r) -> (Void# -> r) -> r
COVERAGE_MODULATION_MODE_RGB_NV = CoverageModulationModeNV 1
-- | 'COVERAGE_MODULATION_MODE_ALPHA_NV' specifies that the alpha component
-- is multiplied by the modulation factor.
pattern $bCOVERAGE_MODULATION_MODE_ALPHA_NV :: CoverageModulationModeNV
$mCOVERAGE_MODULATION_MODE_ALPHA_NV :: forall r.
CoverageModulationModeNV -> (Void# -> r) -> (Void# -> r) -> r
COVERAGE_MODULATION_MODE_ALPHA_NV = CoverageModulationModeNV 2
-- | 'COVERAGE_MODULATION_MODE_RGBA_NV' specifies that all components are
-- multiplied by the modulation factor.
pattern $bCOVERAGE_MODULATION_MODE_RGBA_NV :: CoverageModulationModeNV
$mCOVERAGE_MODULATION_MODE_RGBA_NV :: forall r.
CoverageModulationModeNV -> (Void# -> r) -> (Void# -> r) -> r
COVERAGE_MODULATION_MODE_RGBA_NV = CoverageModulationModeNV 3
{-# complete COVERAGE_MODULATION_MODE_NONE_NV,
             COVERAGE_MODULATION_MODE_RGB_NV,
             COVERAGE_MODULATION_MODE_ALPHA_NV,
             COVERAGE_MODULATION_MODE_RGBA_NV :: CoverageModulationModeNV #-}

instance Show CoverageModulationModeNV where
  showsPrec :: Int -> CoverageModulationModeNV -> ShowS
showsPrec p :: Int
p = \case
    COVERAGE_MODULATION_MODE_NONE_NV -> String -> ShowS
showString "COVERAGE_MODULATION_MODE_NONE_NV"
    COVERAGE_MODULATION_MODE_RGB_NV -> String -> ShowS
showString "COVERAGE_MODULATION_MODE_RGB_NV"
    COVERAGE_MODULATION_MODE_ALPHA_NV -> String -> ShowS
showString "COVERAGE_MODULATION_MODE_ALPHA_NV"
    COVERAGE_MODULATION_MODE_RGBA_NV -> String -> ShowS
showString "COVERAGE_MODULATION_MODE_RGBA_NV"
    CoverageModulationModeNV x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "CoverageModulationModeNV " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11 Int32
x)

instance Read CoverageModulationModeNV where
  readPrec :: ReadPrec CoverageModulationModeNV
readPrec = ReadPrec CoverageModulationModeNV
-> ReadPrec CoverageModulationModeNV
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec CoverageModulationModeNV)]
-> ReadPrec CoverageModulationModeNV
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("COVERAGE_MODULATION_MODE_NONE_NV", CoverageModulationModeNV -> ReadPrec CoverageModulationModeNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure CoverageModulationModeNV
COVERAGE_MODULATION_MODE_NONE_NV)
                            , ("COVERAGE_MODULATION_MODE_RGB_NV", CoverageModulationModeNV -> ReadPrec CoverageModulationModeNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure CoverageModulationModeNV
COVERAGE_MODULATION_MODE_RGB_NV)
                            , ("COVERAGE_MODULATION_MODE_ALPHA_NV", CoverageModulationModeNV -> ReadPrec CoverageModulationModeNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure CoverageModulationModeNV
COVERAGE_MODULATION_MODE_ALPHA_NV)
                            , ("COVERAGE_MODULATION_MODE_RGBA_NV", CoverageModulationModeNV -> ReadPrec CoverageModulationModeNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure CoverageModulationModeNV
COVERAGE_MODULATION_MODE_RGBA_NV)]
                     ReadPrec CoverageModulationModeNV
-> ReadPrec CoverageModulationModeNV
-> ReadPrec CoverageModulationModeNV
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec CoverageModulationModeNV
-> ReadPrec CoverageModulationModeNV
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "CoverageModulationModeNV")
                       Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
                       CoverageModulationModeNV -> ReadPrec CoverageModulationModeNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> CoverageModulationModeNV
CoverageModulationModeNV Int32
v)))


type NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION"
pattern NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION :: forall a . Integral a => a
pattern $bNV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION :: a
$mNV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION = 1


type NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME = "VK_NV_framebuffer_mixed_samples"

-- No documentation found for TopLevel "VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME"
pattern NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bNV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME :: a
$mNV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME = "VK_NV_framebuffer_mixed_samples"