{-# 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 Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Control.Monad (unless)
import Foreign.Marshal.Alloc (allocaBytes)
import GHC.IO (throwIO)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Numeric (showHex)
import Data.Coerce (coerce)
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 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.C.Types (CFloat)
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.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Data.Int (Int32)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV))
data PipelineCoverageModulationStateCreateInfoNV = PipelineCoverageModulationStateCreateInfoNV
{
PipelineCoverageModulationStateCreateInfoNV
-> PipelineCoverageModulationStateCreateFlagsNV
flags :: PipelineCoverageModulationStateCreateFlagsNV
,
PipelineCoverageModulationStateCreateInfoNV
-> CoverageModulationModeNV
coverageModulationMode :: CoverageModulationModeNV
,
PipelineCoverageModulationStateCreateInfoNV -> Bool
coverageModulationTableEnable :: Bool
,
PipelineCoverageModulationStateCreateInfoNV -> Word32
coverageModulationTableCount :: Word32
,
PipelineCoverageModulationStateCreateInfoNV -> Vector Float
coverageModulationTable :: Vector Float
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineCoverageModulationStateCreateInfoNV)
#endif
deriving instance Show PipelineCoverageModulationStateCreateInfoNV
instance ToCStruct PipelineCoverageModulationStateCreateInfoNV where
withCStruct :: forall b.
PipelineCoverageModulationStateCreateInfoNV
-> (Ptr PipelineCoverageModulationStateCreateInfoNV -> IO b)
-> IO b
withCStruct PipelineCoverageModulationStateCreateInfoNV
x Ptr PipelineCoverageModulationStateCreateInfoNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 forall a b. (a -> b) -> a -> b
$ \Ptr PipelineCoverageModulationStateCreateInfoNV
p -> 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 :: forall b.
Ptr PipelineCoverageModulationStateCreateInfoNV
-> PipelineCoverageModulationStateCreateInfoNV -> IO b -> IO b
pokeCStruct Ptr PipelineCoverageModulationStateCreateInfoNV
p PipelineCoverageModulationStateCreateInfoNV{Bool
Word32
Vector Float
CoverageModulationModeNV
PipelineCoverageModulationStateCreateFlagsNV
coverageModulationTable :: Vector Float
coverageModulationTableCount :: Word32
coverageModulationTableEnable :: Bool
coverageModulationMode :: CoverageModulationModeNV
flags :: PipelineCoverageModulationStateCreateFlagsNV
$sel:coverageModulationTable:PipelineCoverageModulationStateCreateInfoNV :: PipelineCoverageModulationStateCreateInfoNV -> Vector Float
$sel:coverageModulationTableCount:PipelineCoverageModulationStateCreateInfoNV :: PipelineCoverageModulationStateCreateInfoNV -> Word32
$sel:coverageModulationTableEnable:PipelineCoverageModulationStateCreateInfoNV :: PipelineCoverageModulationStateCreateInfoNV -> Bool
$sel:coverageModulationMode:PipelineCoverageModulationStateCreateInfoNV :: PipelineCoverageModulationStateCreateInfoNV
-> CoverageModulationModeNV
$sel:flags:PipelineCoverageModulationStateCreateInfoNV :: PipelineCoverageModulationStateCreateInfoNV
-> PipelineCoverageModulationStateCreateFlagsNV
..} IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineCoverageModulationStateCreateFlagsNV)) (PipelineCoverageModulationStateCreateFlagsNV
flags)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr CoverageModulationModeNV)) (CoverageModulationModeNV
coverageModulationMode)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
coverageModulationTableEnable))
let pCoverageModulationTableLength :: Int
pCoverageModulationTableLength = forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ (Vector Float
coverageModulationTable)
Word32
coverageModulationTableCount'' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ if (Word32
coverageModulationTableCount) forall a. Eq a => a -> a -> Bool
== Word32
0
then forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pCoverageModulationTableLength
else do
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pCoverageModulationTableLength forall a. Eq a => a -> a -> Bool
== (Word32
coverageModulationTableCount) Bool -> Bool -> Bool
|| Int
pCoverageModulationTableLength forall a. Eq a => a -> a -> Bool
== Int
0) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"pCoverageModulationTable must be empty or have 'coverageModulationTableCount' elements" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Word32
coverageModulationTableCount)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) (Word32
coverageModulationTableCount'')
Ptr CFloat
pCoverageModulationTable'' <- if forall a. Vector a -> Bool
Data.Vector.null (Vector Float
coverageModulationTable)
then forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
else do
Ptr CFloat
pPCoverageModulationTable <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @CFloat (((forall a. Vector a -> Int
Data.Vector.length (Vector Float
coverageModulationTable))) forall a. Num a => a -> a -> a
* Int
4)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i Float
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pPCoverageModulationTable forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e))) ((Vector Float
coverageModulationTable))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Ptr CFloat
pPCoverageModulationTable
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr CFloat))) Ptr CFloat
pCoverageModulationTable''
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PipelineCoverageModulationStateCreateInfoNV -> IO b -> IO b
pokeZeroCStruct Ptr PipelineCoverageModulationStateCreateInfoNV
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
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 PipelineCoverageModulationStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr CoverageModulationModeNV)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCoverageModulationStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PipelineCoverageModulationStateCreateInfoNV where
peekCStruct :: Ptr PipelineCoverageModulationStateCreateInfoNV
-> IO PipelineCoverageModulationStateCreateInfoNV
peekCStruct Ptr PipelineCoverageModulationStateCreateInfoNV
p = do
PipelineCoverageModulationStateCreateFlagsNV
flags <- forall a. Storable a => Ptr a -> IO a
peek @PipelineCoverageModulationStateCreateFlagsNV ((Ptr PipelineCoverageModulationStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineCoverageModulationStateCreateFlagsNV))
CoverageModulationModeNV
coverageModulationMode <- forall a. Storable a => Ptr a -> IO a
peek @CoverageModulationModeNV ((Ptr PipelineCoverageModulationStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr CoverageModulationModeNV))
Bool32
coverageModulationTableEnable <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PipelineCoverageModulationStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32))
Word32
coverageModulationTableCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PipelineCoverageModulationStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32))
Ptr CFloat
pCoverageModulationTable <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr CFloat) ((Ptr PipelineCoverageModulationStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr CFloat)))
let pCoverageModulationTableLength :: Int
pCoverageModulationTableLength = if Ptr CFloat
pCoverageModulationTable forall a. Eq a => a -> a -> Bool
== forall a. Ptr a
nullPtr then Int
0 else (forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
coverageModulationTableCount)
Vector Float
pCoverageModulationTable' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM Int
pCoverageModulationTableLength (\Int
i -> do
CFloat
pCoverageModulationTableElem <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pCoverageModulationTable forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
4 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr CFloat))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
pCoverageModulationTableElem)
forall (f :: * -> *) a. Applicative f => a -> f a
pure 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
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Monoid a => a
mempty
newtype PipelineCoverageModulationStateCreateFlagsNV = PipelineCoverageModulationStateCreateFlagsNV Flags
deriving newtype (PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> Bool
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
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
Ord, Ptr PipelineCoverageModulationStateCreateFlagsNV
-> IO PipelineCoverageModulationStateCreateFlagsNV
Ptr PipelineCoverageModulationStateCreateFlagsNV
-> Int -> IO PipelineCoverageModulationStateCreateFlagsNV
Ptr PipelineCoverageModulationStateCreateFlagsNV
-> Int -> PipelineCoverageModulationStateCreateFlagsNV -> IO ()
Ptr PipelineCoverageModulationStateCreateFlagsNV
-> PipelineCoverageModulationStateCreateFlagsNV -> IO ()
PipelineCoverageModulationStateCreateFlagsNV -> Int
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 :: forall b.
Ptr b
-> Int -> PipelineCoverageModulationStateCreateFlagsNV -> IO ()
$cpokeByteOff :: forall b.
Ptr b
-> Int -> PipelineCoverageModulationStateCreateFlagsNV -> IO ()
peekByteOff :: forall b.
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
forall a. a -> Zero a
zero :: PipelineCoverageModulationStateCreateFlagsNV
$czero :: PipelineCoverageModulationStateCreateFlagsNV
Zero, Eq PipelineCoverageModulationStateCreateFlagsNV
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
Bits, Bits PipelineCoverageModulationStateCreateFlagsNV
PipelineCoverageModulationStateCreateFlagsNV -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: PipelineCoverageModulationStateCreateFlagsNV -> Int
$ccountTrailingZeros :: PipelineCoverageModulationStateCreateFlagsNV -> Int
countLeadingZeros :: PipelineCoverageModulationStateCreateFlagsNV -> Int
$ccountLeadingZeros :: PipelineCoverageModulationStateCreateFlagsNV -> Int
finiteBitSize :: PipelineCoverageModulationStateCreateFlagsNV -> Int
$cfiniteBitSize :: PipelineCoverageModulationStateCreateFlagsNV -> Int
FiniteBits)
conNamePipelineCoverageModulationStateCreateFlagsNV :: String
conNamePipelineCoverageModulationStateCreateFlagsNV :: String
conNamePipelineCoverageModulationStateCreateFlagsNV = String
"PipelineCoverageModulationStateCreateFlagsNV"
enumPrefixPipelineCoverageModulationStateCreateFlagsNV :: String
enumPrefixPipelineCoverageModulationStateCreateFlagsNV :: String
enumPrefixPipelineCoverageModulationStateCreateFlagsNV = String
""
showTablePipelineCoverageModulationStateCreateFlagsNV :: [(PipelineCoverageModulationStateCreateFlagsNV, String)]
showTablePipelineCoverageModulationStateCreateFlagsNV :: [(PipelineCoverageModulationStateCreateFlagsNV, String)]
showTablePipelineCoverageModulationStateCreateFlagsNV = []
instance Show PipelineCoverageModulationStateCreateFlagsNV where
showsPrec :: Int -> PipelineCoverageModulationStateCreateFlagsNV -> ShowS
showsPrec =
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixPipelineCoverageModulationStateCreateFlagsNV
[(PipelineCoverageModulationStateCreateFlagsNV, String)]
showTablePipelineCoverageModulationStateCreateFlagsNV
String
conNamePipelineCoverageModulationStateCreateFlagsNV
(\(PipelineCoverageModulationStateCreateFlagsNV Word32
x) -> Word32
x)
(\Word32
x -> String -> ShowS
showString String
"0x" forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (Integral a, Show a) => a -> ShowS
showHex Word32
x)
instance Read PipelineCoverageModulationStateCreateFlagsNV where
readPrec :: ReadPrec PipelineCoverageModulationStateCreateFlagsNV
readPrec =
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixPipelineCoverageModulationStateCreateFlagsNV
[(PipelineCoverageModulationStateCreateFlagsNV, String)]
showTablePipelineCoverageModulationStateCreateFlagsNV
String
conNamePipelineCoverageModulationStateCreateFlagsNV
Word32 -> PipelineCoverageModulationStateCreateFlagsNV
PipelineCoverageModulationStateCreateFlagsNV
newtype CoverageModulationModeNV = CoverageModulationModeNV Int32
deriving newtype (CoverageModulationModeNV -> CoverageModulationModeNV -> Bool
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
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
Ord, Ptr CoverageModulationModeNV -> IO CoverageModulationModeNV
Ptr CoverageModulationModeNV -> Int -> IO CoverageModulationModeNV
Ptr CoverageModulationModeNV
-> Int -> CoverageModulationModeNV -> IO ()
Ptr CoverageModulationModeNV -> CoverageModulationModeNV -> IO ()
CoverageModulationModeNV -> Int
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 :: forall b. Ptr b -> Int -> CoverageModulationModeNV -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> CoverageModulationModeNV -> IO ()
peekByteOff :: forall b. 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
forall a. a -> Zero a
zero :: CoverageModulationModeNV
$czero :: CoverageModulationModeNV
Zero)
pattern $bCOVERAGE_MODULATION_MODE_NONE_NV :: CoverageModulationModeNV
$mCOVERAGE_MODULATION_MODE_NONE_NV :: forall {r}.
CoverageModulationModeNV -> ((# #) -> r) -> ((# #) -> r) -> r
COVERAGE_MODULATION_MODE_NONE_NV = CoverageModulationModeNV 0
pattern $bCOVERAGE_MODULATION_MODE_RGB_NV :: CoverageModulationModeNV
$mCOVERAGE_MODULATION_MODE_RGB_NV :: forall {r}.
CoverageModulationModeNV -> ((# #) -> r) -> ((# #) -> r) -> r
COVERAGE_MODULATION_MODE_RGB_NV = CoverageModulationModeNV 1
pattern $bCOVERAGE_MODULATION_MODE_ALPHA_NV :: CoverageModulationModeNV
$mCOVERAGE_MODULATION_MODE_ALPHA_NV :: forall {r}.
CoverageModulationModeNV -> ((# #) -> r) -> ((# #) -> r) -> r
COVERAGE_MODULATION_MODE_ALPHA_NV = CoverageModulationModeNV 2
pattern $bCOVERAGE_MODULATION_MODE_RGBA_NV :: CoverageModulationModeNV
$mCOVERAGE_MODULATION_MODE_RGBA_NV :: forall {r}.
CoverageModulationModeNV -> ((# #) -> r) -> ((# #) -> 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
#-}
conNameCoverageModulationModeNV :: String
conNameCoverageModulationModeNV :: String
conNameCoverageModulationModeNV = String
"CoverageModulationModeNV"
enumPrefixCoverageModulationModeNV :: String
enumPrefixCoverageModulationModeNV :: String
enumPrefixCoverageModulationModeNV = String
"COVERAGE_MODULATION_MODE_"
showTableCoverageModulationModeNV :: [(CoverageModulationModeNV, String)]
showTableCoverageModulationModeNV :: [(CoverageModulationModeNV, String)]
showTableCoverageModulationModeNV =
[
( CoverageModulationModeNV
COVERAGE_MODULATION_MODE_NONE_NV
, String
"NONE_NV"
)
,
( CoverageModulationModeNV
COVERAGE_MODULATION_MODE_RGB_NV
, String
"RGB_NV"
)
,
( CoverageModulationModeNV
COVERAGE_MODULATION_MODE_ALPHA_NV
, String
"ALPHA_NV"
)
,
( CoverageModulationModeNV
COVERAGE_MODULATION_MODE_RGBA_NV
, String
"RGBA_NV"
)
]
instance Show CoverageModulationModeNV where
showsPrec :: Int -> CoverageModulationModeNV -> ShowS
showsPrec =
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixCoverageModulationModeNV
[(CoverageModulationModeNV, String)]
showTableCoverageModulationModeNV
String
conNameCoverageModulationModeNV
(\(CoverageModulationModeNV Int32
x) -> Int32
x)
(forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read CoverageModulationModeNV where
readPrec :: ReadPrec CoverageModulationModeNV
readPrec =
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixCoverageModulationModeNV
[(CoverageModulationModeNV, String)]
showTableCoverageModulationModeNV
String
conNameCoverageModulationModeNV
Int32 -> CoverageModulationModeNV
CoverageModulationModeNV
type NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION = 1
pattern NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION :: forall a . Integral a => a
pattern $bNV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION :: forall a. Integral a => a
$mNV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION = 1
type NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME = "VK_NV_framebuffer_mixed_samples"
pattern NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bNV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mNV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME = "VK_NV_framebuffer_mixed_samples"