{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_validation_features  ( ValidationFeaturesEXT(..)
                                                     , ValidationFeatureEnableEXT( VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT
                                                                                 , VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT
                                                                                 , VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT
                                                                                 , VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT
                                                                                 , ..
                                                                                 )
                                                     , ValidationFeatureDisableEXT( VALIDATION_FEATURE_DISABLE_ALL_EXT
                                                                                  , VALIDATION_FEATURE_DISABLE_SHADERS_EXT
                                                                                  , VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT
                                                                                  , VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT
                                                                                  , VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT
                                                                                  , VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT
                                                                                  , VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT
                                                                                  , ..
                                                                                  )
                                                     , EXT_VALIDATION_FEATURES_SPEC_VERSION
                                                     , pattern EXT_VALIDATION_FEATURES_SPEC_VERSION
                                                     , EXT_VALIDATION_FEATURES_EXTENSION_NAME
                                                     , pattern EXT_VALIDATION_FEATURES_EXTENSION_NAME
                                                     ) where

import Foreign.Marshal.Alloc (allocaBytesAligned)
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 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 Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
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.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_VALIDATION_FEATURES_EXT))
-- | VkValidationFeaturesEXT - Specify validation features to enable or
-- disable for a Vulkan instance
--
-- == Valid Usage
--
-- -   If the @pEnabledValidationFeatures@ array contains
--     'VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT',
--     then it /must/ also contain
--     'VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT'
--
-- -   If the @pEnabledValidationFeatures@ array contains
--     'VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT', then it /must/ not
--     contain 'VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT'
--
-- == Valid Usage (Implicit)
--
-- -   @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_VALIDATION_FEATURES_EXT'
--
-- -   If @enabledValidationFeatureCount@ is not @0@,
--     @pEnabledValidationFeatures@ /must/ be a valid pointer to an array
--     of @enabledValidationFeatureCount@ valid
--     'ValidationFeatureEnableEXT' values
--
-- -   If @disabledValidationFeatureCount@ is not @0@,
--     @pDisabledValidationFeatures@ /must/ be a valid pointer to an array
--     of @disabledValidationFeatureCount@ valid
--     'ValidationFeatureDisableEXT' values
--
-- = See Also
--
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'ValidationFeatureDisableEXT', 'ValidationFeatureEnableEXT'
data ValidationFeaturesEXT = ValidationFeaturesEXT
  { -- | @pEnabledValidationFeatures@ is a pointer to an array of
    -- 'ValidationFeatureEnableEXT' values specifying the validation features
    -- to be enabled.
    ValidationFeaturesEXT -> Vector ValidationFeatureEnableEXT
enabledValidationFeatures :: Vector ValidationFeatureEnableEXT
  , -- | @pDisabledValidationFeatures@ is a pointer to an array of
    -- 'ValidationFeatureDisableEXT' values specifying the validation features
    -- to be disabled.
    ValidationFeaturesEXT -> Vector ValidationFeatureDisableEXT
disabledValidationFeatures :: Vector ValidationFeatureDisableEXT
  }
  deriving (Typeable)
deriving instance Show ValidationFeaturesEXT

instance ToCStruct ValidationFeaturesEXT where
  withCStruct :: ValidationFeaturesEXT
-> (Ptr ValidationFeaturesEXT -> IO b) -> IO b
withCStruct x :: ValidationFeaturesEXT
x f :: Ptr ValidationFeaturesEXT -> IO b
f = Int -> Int -> (Ptr ValidationFeaturesEXT -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 48 8 ((Ptr ValidationFeaturesEXT -> IO b) -> IO b)
-> (Ptr ValidationFeaturesEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr ValidationFeaturesEXT
p -> Ptr ValidationFeaturesEXT -> ValidationFeaturesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ValidationFeaturesEXT
p ValidationFeaturesEXT
x (Ptr ValidationFeaturesEXT -> IO b
f Ptr ValidationFeaturesEXT
p)
  pokeCStruct :: Ptr ValidationFeaturesEXT -> ValidationFeaturesEXT -> IO b -> IO b
pokeCStruct p :: Ptr ValidationFeaturesEXT
p ValidationFeaturesEXT{..} 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 ValidationFeaturesEXT
p Ptr ValidationFeaturesEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_VALIDATION_FEATURES_EXT)
    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 ValidationFeaturesEXT
p Ptr ValidationFeaturesEXT -> 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 Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ValidationFeaturesEXT
p Ptr ValidationFeaturesEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) ((Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector ValidationFeatureEnableEXT -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector ValidationFeatureEnableEXT -> Int)
-> Vector ValidationFeatureEnableEXT -> Int
forall a b. (a -> b) -> a -> b
$ (Vector ValidationFeatureEnableEXT
enabledValidationFeatures)) :: Word32))
    Ptr ValidationFeatureEnableEXT
pPEnabledValidationFeatures' <- ((Ptr ValidationFeatureEnableEXT -> IO b) -> IO b)
-> ContT b IO (Ptr ValidationFeatureEnableEXT)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr ValidationFeatureEnableEXT -> IO b) -> IO b)
 -> ContT b IO (Ptr ValidationFeatureEnableEXT))
-> ((Ptr ValidationFeatureEnableEXT -> IO b) -> IO b)
-> ContT b IO (Ptr ValidationFeatureEnableEXT)
forall a b. (a -> b) -> a -> b
$ Int -> Int -> (Ptr ValidationFeatureEnableEXT -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @ValidationFeatureEnableEXT ((Vector ValidationFeatureEnableEXT -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector ValidationFeatureEnableEXT
enabledValidationFeatures)) 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 -> ValidationFeatureEnableEXT -> IO ())
-> Vector ValidationFeatureEnableEXT -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: ValidationFeatureEnableEXT
e -> Ptr ValidationFeatureEnableEXT
-> ValidationFeatureEnableEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ValidationFeatureEnableEXT
pPEnabledValidationFeatures' Ptr ValidationFeatureEnableEXT
-> Int -> Ptr ValidationFeatureEnableEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr ValidationFeatureEnableEXT) (ValidationFeatureEnableEXT
e)) (Vector ValidationFeatureEnableEXT
enabledValidationFeatures)
    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 ValidationFeatureEnableEXT)
-> Ptr ValidationFeatureEnableEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ValidationFeaturesEXT
p Ptr ValidationFeaturesEXT
-> Int -> Ptr (Ptr ValidationFeatureEnableEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr ValidationFeatureEnableEXT))) (Ptr ValidationFeatureEnableEXT
pPEnabledValidationFeatures')
    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 ValidationFeaturesEXT
p Ptr ValidationFeaturesEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) ((Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector ValidationFeatureDisableEXT -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector ValidationFeatureDisableEXT -> Int)
-> Vector ValidationFeatureDisableEXT -> Int
forall a b. (a -> b) -> a -> b
$ (Vector ValidationFeatureDisableEXT
disabledValidationFeatures)) :: Word32))
    Ptr ValidationFeatureDisableEXT
pPDisabledValidationFeatures' <- ((Ptr ValidationFeatureDisableEXT -> IO b) -> IO b)
-> ContT b IO (Ptr ValidationFeatureDisableEXT)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr ValidationFeatureDisableEXT -> IO b) -> IO b)
 -> ContT b IO (Ptr ValidationFeatureDisableEXT))
-> ((Ptr ValidationFeatureDisableEXT -> IO b) -> IO b)
-> ContT b IO (Ptr ValidationFeatureDisableEXT)
forall a b. (a -> b) -> a -> b
$ Int -> Int -> (Ptr ValidationFeatureDisableEXT -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @ValidationFeatureDisableEXT ((Vector ValidationFeatureDisableEXT -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector ValidationFeatureDisableEXT
disabledValidationFeatures)) 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 -> ValidationFeatureDisableEXT -> IO ())
-> Vector ValidationFeatureDisableEXT -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: ValidationFeatureDisableEXT
e -> Ptr ValidationFeatureDisableEXT
-> ValidationFeatureDisableEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ValidationFeatureDisableEXT
pPDisabledValidationFeatures' Ptr ValidationFeatureDisableEXT
-> Int -> Ptr ValidationFeatureDisableEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr ValidationFeatureDisableEXT) (ValidationFeatureDisableEXT
e)) (Vector ValidationFeatureDisableEXT
disabledValidationFeatures)
    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 ValidationFeatureDisableEXT)
-> Ptr ValidationFeatureDisableEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ValidationFeaturesEXT
p Ptr ValidationFeaturesEXT
-> Int -> Ptr (Ptr ValidationFeatureDisableEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr ValidationFeatureDisableEXT))) (Ptr ValidationFeatureDisableEXT
pPDisabledValidationFeatures')
    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 = 48
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr ValidationFeaturesEXT -> IO b -> IO b
pokeZeroCStruct p :: Ptr ValidationFeaturesEXT
p 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 ValidationFeaturesEXT
p Ptr ValidationFeaturesEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_VALIDATION_FEATURES_EXT)
    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 ValidationFeaturesEXT
p Ptr ValidationFeaturesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr ValidationFeatureEnableEXT
pPEnabledValidationFeatures' <- ((Ptr ValidationFeatureEnableEXT -> IO b) -> IO b)
-> ContT b IO (Ptr ValidationFeatureEnableEXT)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr ValidationFeatureEnableEXT -> IO b) -> IO b)
 -> ContT b IO (Ptr ValidationFeatureEnableEXT))
-> ((Ptr ValidationFeatureEnableEXT -> IO b) -> IO b)
-> ContT b IO (Ptr ValidationFeatureEnableEXT)
forall a b. (a -> b) -> a -> b
$ Int -> Int -> (Ptr ValidationFeatureEnableEXT -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @ValidationFeatureEnableEXT ((Vector Any -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Any
forall a. Monoid a => a
mempty)) 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 -> ValidationFeatureEnableEXT -> IO ())
-> Vector ValidationFeatureEnableEXT -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: ValidationFeatureEnableEXT
e -> Ptr ValidationFeatureEnableEXT
-> ValidationFeatureEnableEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ValidationFeatureEnableEXT
pPEnabledValidationFeatures' Ptr ValidationFeatureEnableEXT
-> Int -> Ptr ValidationFeatureEnableEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr ValidationFeatureEnableEXT) (ValidationFeatureEnableEXT
e)) (Vector ValidationFeatureEnableEXT
forall a. Monoid a => a
mempty)
    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 ValidationFeatureEnableEXT)
-> Ptr ValidationFeatureEnableEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ValidationFeaturesEXT
p Ptr ValidationFeaturesEXT
-> Int -> Ptr (Ptr ValidationFeatureEnableEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr ValidationFeatureEnableEXT))) (Ptr ValidationFeatureEnableEXT
pPEnabledValidationFeatures')
    Ptr ValidationFeatureDisableEXT
pPDisabledValidationFeatures' <- ((Ptr ValidationFeatureDisableEXT -> IO b) -> IO b)
-> ContT b IO (Ptr ValidationFeatureDisableEXT)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr ValidationFeatureDisableEXT -> IO b) -> IO b)
 -> ContT b IO (Ptr ValidationFeatureDisableEXT))
-> ((Ptr ValidationFeatureDisableEXT -> IO b) -> IO b)
-> ContT b IO (Ptr ValidationFeatureDisableEXT)
forall a b. (a -> b) -> a -> b
$ Int -> Int -> (Ptr ValidationFeatureDisableEXT -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @ValidationFeatureDisableEXT ((Vector Any -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Any
forall a. Monoid a => a
mempty)) 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 -> ValidationFeatureDisableEXT -> IO ())
-> Vector ValidationFeatureDisableEXT -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: ValidationFeatureDisableEXT
e -> Ptr ValidationFeatureDisableEXT
-> ValidationFeatureDisableEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ValidationFeatureDisableEXT
pPDisabledValidationFeatures' Ptr ValidationFeatureDisableEXT
-> Int -> Ptr ValidationFeatureDisableEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr ValidationFeatureDisableEXT) (ValidationFeatureDisableEXT
e)) (Vector ValidationFeatureDisableEXT
forall a. Monoid a => a
mempty)
    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 ValidationFeatureDisableEXT)
-> Ptr ValidationFeatureDisableEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ValidationFeaturesEXT
p Ptr ValidationFeaturesEXT
-> Int -> Ptr (Ptr ValidationFeatureDisableEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr ValidationFeatureDisableEXT))) (Ptr ValidationFeatureDisableEXT
pPDisabledValidationFeatures')
    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

instance FromCStruct ValidationFeaturesEXT where
  peekCStruct :: Ptr ValidationFeaturesEXT -> IO ValidationFeaturesEXT
peekCStruct p :: Ptr ValidationFeaturesEXT
p = do
    Word32
enabledValidationFeatureCount <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr ValidationFeaturesEXT
p Ptr ValidationFeaturesEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32))
    Ptr ValidationFeatureEnableEXT
pEnabledValidationFeatures <- Ptr (Ptr ValidationFeatureEnableEXT)
-> IO (Ptr ValidationFeatureEnableEXT)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr ValidationFeatureEnableEXT) ((Ptr ValidationFeaturesEXT
p Ptr ValidationFeaturesEXT
-> Int -> Ptr (Ptr ValidationFeatureEnableEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr ValidationFeatureEnableEXT)))
    Vector ValidationFeatureEnableEXT
pEnabledValidationFeatures' <- Int
-> (Int -> IO ValidationFeatureEnableEXT)
-> IO (Vector ValidationFeatureEnableEXT)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
enabledValidationFeatureCount) (\i :: Int
i -> Ptr ValidationFeatureEnableEXT -> IO ValidationFeatureEnableEXT
forall a. Storable a => Ptr a -> IO a
peek @ValidationFeatureEnableEXT ((Ptr ValidationFeatureEnableEXT
pEnabledValidationFeatures Ptr ValidationFeatureEnableEXT
-> Int -> Ptr ValidationFeatureEnableEXT
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr ValidationFeatureEnableEXT)))
    Word32
disabledValidationFeatureCount <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr ValidationFeaturesEXT
p Ptr ValidationFeaturesEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32))
    Ptr ValidationFeatureDisableEXT
pDisabledValidationFeatures <- Ptr (Ptr ValidationFeatureDisableEXT)
-> IO (Ptr ValidationFeatureDisableEXT)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr ValidationFeatureDisableEXT) ((Ptr ValidationFeaturesEXT
p Ptr ValidationFeaturesEXT
-> Int -> Ptr (Ptr ValidationFeatureDisableEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr ValidationFeatureDisableEXT)))
    Vector ValidationFeatureDisableEXT
pDisabledValidationFeatures' <- Int
-> (Int -> IO ValidationFeatureDisableEXT)
-> IO (Vector ValidationFeatureDisableEXT)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
disabledValidationFeatureCount) (\i :: Int
i -> Ptr ValidationFeatureDisableEXT -> IO ValidationFeatureDisableEXT
forall a. Storable a => Ptr a -> IO a
peek @ValidationFeatureDisableEXT ((Ptr ValidationFeatureDisableEXT
pDisabledValidationFeatures Ptr ValidationFeatureDisableEXT
-> Int -> Ptr ValidationFeatureDisableEXT
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr ValidationFeatureDisableEXT)))
    ValidationFeaturesEXT -> IO ValidationFeaturesEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (ValidationFeaturesEXT -> IO ValidationFeaturesEXT)
-> ValidationFeaturesEXT -> IO ValidationFeaturesEXT
forall a b. (a -> b) -> a -> b
$ Vector ValidationFeatureEnableEXT
-> Vector ValidationFeatureDisableEXT -> ValidationFeaturesEXT
ValidationFeaturesEXT
             Vector ValidationFeatureEnableEXT
pEnabledValidationFeatures' Vector ValidationFeatureDisableEXT
pDisabledValidationFeatures'

instance Zero ValidationFeaturesEXT where
  zero :: ValidationFeaturesEXT
zero = Vector ValidationFeatureEnableEXT
-> Vector ValidationFeatureDisableEXT -> ValidationFeaturesEXT
ValidationFeaturesEXT
           Vector ValidationFeatureEnableEXT
forall a. Monoid a => a
mempty
           Vector ValidationFeatureDisableEXT
forall a. Monoid a => a
mempty


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

-- | 'VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT' specifies that GPU-assisted
-- validation is enabled. Activating this feature instruments shader
-- programs to generate additional diagnostic data. This feature is
-- disabled by default.
pattern $bVALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT :: ValidationFeatureEnableEXT
$mVALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT :: forall r.
ValidationFeatureEnableEXT -> (Void# -> r) -> (Void# -> r) -> r
VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT = ValidationFeatureEnableEXT 0
-- | 'VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT'
-- specifies that the validation layers reserve a descriptor set binding
-- slot for their own use. The layer reports a value for
-- 'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxBoundDescriptorSets@
-- that is one less than the value reported by the device. If the device
-- supports the binding of only one descriptor set, the validation layer
-- does not perform GPU-assisted validation. This feature is disabled by
-- default.
pattern $bVALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT :: ValidationFeatureEnableEXT
$mVALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT :: forall r.
ValidationFeatureEnableEXT -> (Void# -> r) -> (Void# -> r) -> r
VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT = ValidationFeatureEnableEXT 1
-- | 'VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT' specifies that Vulkan
-- best-practices validation is enabled. Activating this feature enables
-- the output of warnings related to common misuse of the API, but which
-- are not explicitly prohibited by the specification. This feature is
-- disabled by default.
pattern $bVALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT :: ValidationFeatureEnableEXT
$mVALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT :: forall r.
ValidationFeatureEnableEXT -> (Void# -> r) -> (Void# -> r) -> r
VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT = ValidationFeatureEnableEXT 2
-- | 'VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT' specifies that the layers
-- will process @debugPrintfEXT@ operations in shaders and send the
-- resulting output to the debug callback. This feature is disabled by
-- default.
pattern $bVALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT :: ValidationFeatureEnableEXT
$mVALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT :: forall r.
ValidationFeatureEnableEXT -> (Void# -> r) -> (Void# -> r) -> r
VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT = ValidationFeatureEnableEXT 3
{-# complete VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT,
             VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT,
             VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT,
             VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT :: ValidationFeatureEnableEXT #-}

instance Show ValidationFeatureEnableEXT where
  showsPrec :: Int -> ValidationFeatureEnableEXT -> ShowS
showsPrec p :: Int
p = \case
    VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT -> String -> ShowS
showString "VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT"
    VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT -> String -> ShowS
showString "VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT"
    VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT -> String -> ShowS
showString "VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT"
    VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT -> String -> ShowS
showString "VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT"
    ValidationFeatureEnableEXT x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "ValidationFeatureEnableEXT " 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 ValidationFeatureEnableEXT where
  readPrec :: ReadPrec ValidationFeatureEnableEXT
readPrec = ReadPrec ValidationFeatureEnableEXT
-> ReadPrec ValidationFeatureEnableEXT
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec ValidationFeatureEnableEXT)]
-> ReadPrec ValidationFeatureEnableEXT
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT", ValidationFeatureEnableEXT -> ReadPrec ValidationFeatureEnableEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure ValidationFeatureEnableEXT
VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT)
                            , ("VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT", ValidationFeatureEnableEXT -> ReadPrec ValidationFeatureEnableEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure ValidationFeatureEnableEXT
VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT)
                            , ("VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT", ValidationFeatureEnableEXT -> ReadPrec ValidationFeatureEnableEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure ValidationFeatureEnableEXT
VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT)
                            , ("VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT", ValidationFeatureEnableEXT -> ReadPrec ValidationFeatureEnableEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure ValidationFeatureEnableEXT
VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT)]
                     ReadPrec ValidationFeatureEnableEXT
-> ReadPrec ValidationFeatureEnableEXT
-> ReadPrec ValidationFeatureEnableEXT
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec ValidationFeatureEnableEXT
-> ReadPrec ValidationFeatureEnableEXT
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "ValidationFeatureEnableEXT")
                       Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
                       ValidationFeatureEnableEXT -> ReadPrec ValidationFeatureEnableEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> ValidationFeatureEnableEXT
ValidationFeatureEnableEXT Int32
v)))


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

-- | 'VALIDATION_FEATURE_DISABLE_ALL_EXT' specifies that all validation
-- checks are disabled.
pattern $bVALIDATION_FEATURE_DISABLE_ALL_EXT :: ValidationFeatureDisableEXT
$mVALIDATION_FEATURE_DISABLE_ALL_EXT :: forall r.
ValidationFeatureDisableEXT -> (Void# -> r) -> (Void# -> r) -> r
VALIDATION_FEATURE_DISABLE_ALL_EXT = ValidationFeatureDisableEXT 0
-- | 'VALIDATION_FEATURE_DISABLE_SHADERS_EXT' specifies that shader
-- validation is disabled. This feature is enabled by default.
pattern $bVALIDATION_FEATURE_DISABLE_SHADERS_EXT :: ValidationFeatureDisableEXT
$mVALIDATION_FEATURE_DISABLE_SHADERS_EXT :: forall r.
ValidationFeatureDisableEXT -> (Void# -> r) -> (Void# -> r) -> r
VALIDATION_FEATURE_DISABLE_SHADERS_EXT = ValidationFeatureDisableEXT 1
-- | 'VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT' specifies that thread
-- safety validation is disabled. This feature is enabled by default.
pattern $bVALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT :: ValidationFeatureDisableEXT
$mVALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT :: forall r.
ValidationFeatureDisableEXT -> (Void# -> r) -> (Void# -> r) -> r
VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT = ValidationFeatureDisableEXT 2
-- | 'VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT' specifies that stateless
-- parameter validation is disabled. This feature is enabled by default.
pattern $bVALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT :: ValidationFeatureDisableEXT
$mVALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT :: forall r.
ValidationFeatureDisableEXT -> (Void# -> r) -> (Void# -> r) -> r
VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT = ValidationFeatureDisableEXT 3
-- | 'VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT' specifies that object
-- lifetime validation is disabled. This feature is enabled by default.
pattern $bVALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT :: ValidationFeatureDisableEXT
$mVALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT :: forall r.
ValidationFeatureDisableEXT -> (Void# -> r) -> (Void# -> r) -> r
VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT = ValidationFeatureDisableEXT 4
-- | 'VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT' specifies that core
-- validation checks are disabled. This feature is enabled by default. If
-- this feature is disabled, the shader validation and GPU-assisted
-- validation features are also disabled.
pattern $bVALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT :: ValidationFeatureDisableEXT
$mVALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT :: forall r.
ValidationFeatureDisableEXT -> (Void# -> r) -> (Void# -> r) -> r
VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT = ValidationFeatureDisableEXT 5
-- | 'VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT' specifies that
-- protection against duplicate non-dispatchable object handles is
-- disabled. This feature is enabled by default.
pattern $bVALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT :: ValidationFeatureDisableEXT
$mVALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT :: forall r.
ValidationFeatureDisableEXT -> (Void# -> r) -> (Void# -> r) -> r
VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT = ValidationFeatureDisableEXT 6
{-# complete VALIDATION_FEATURE_DISABLE_ALL_EXT,
             VALIDATION_FEATURE_DISABLE_SHADERS_EXT,
             VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT,
             VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT,
             VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT,
             VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT,
             VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT :: ValidationFeatureDisableEXT #-}

instance Show ValidationFeatureDisableEXT where
  showsPrec :: Int -> ValidationFeatureDisableEXT -> ShowS
showsPrec p :: Int
p = \case
    VALIDATION_FEATURE_DISABLE_ALL_EXT -> String -> ShowS
showString "VALIDATION_FEATURE_DISABLE_ALL_EXT"
    VALIDATION_FEATURE_DISABLE_SHADERS_EXT -> String -> ShowS
showString "VALIDATION_FEATURE_DISABLE_SHADERS_EXT"
    VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT -> String -> ShowS
showString "VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT"
    VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT -> String -> ShowS
showString "VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT"
    VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT -> String -> ShowS
showString "VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT"
    VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT -> String -> ShowS
showString "VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT"
    VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT -> String -> ShowS
showString "VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT"
    ValidationFeatureDisableEXT x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "ValidationFeatureDisableEXT " 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 ValidationFeatureDisableEXT where
  readPrec :: ReadPrec ValidationFeatureDisableEXT
readPrec = ReadPrec ValidationFeatureDisableEXT
-> ReadPrec ValidationFeatureDisableEXT
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec ValidationFeatureDisableEXT)]
-> ReadPrec ValidationFeatureDisableEXT
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("VALIDATION_FEATURE_DISABLE_ALL_EXT", ValidationFeatureDisableEXT -> ReadPrec ValidationFeatureDisableEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure ValidationFeatureDisableEXT
VALIDATION_FEATURE_DISABLE_ALL_EXT)
                            , ("VALIDATION_FEATURE_DISABLE_SHADERS_EXT", ValidationFeatureDisableEXT -> ReadPrec ValidationFeatureDisableEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure ValidationFeatureDisableEXT
VALIDATION_FEATURE_DISABLE_SHADERS_EXT)
                            , ("VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT", ValidationFeatureDisableEXT -> ReadPrec ValidationFeatureDisableEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure ValidationFeatureDisableEXT
VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT)
                            , ("VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT", ValidationFeatureDisableEXT -> ReadPrec ValidationFeatureDisableEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure ValidationFeatureDisableEXT
VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT)
                            , ("VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT", ValidationFeatureDisableEXT -> ReadPrec ValidationFeatureDisableEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure ValidationFeatureDisableEXT
VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT)
                            , ("VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT", ValidationFeatureDisableEXT -> ReadPrec ValidationFeatureDisableEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure ValidationFeatureDisableEXT
VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT)
                            , ("VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT", ValidationFeatureDisableEXT -> ReadPrec ValidationFeatureDisableEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure ValidationFeatureDisableEXT
VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT)]
                     ReadPrec ValidationFeatureDisableEXT
-> ReadPrec ValidationFeatureDisableEXT
-> ReadPrec ValidationFeatureDisableEXT
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec ValidationFeatureDisableEXT
-> ReadPrec ValidationFeatureDisableEXT
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "ValidationFeatureDisableEXT")
                       Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
                       ValidationFeatureDisableEXT -> ReadPrec ValidationFeatureDisableEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> ValidationFeatureDisableEXT
ValidationFeatureDisableEXT Int32
v)))


type EXT_VALIDATION_FEATURES_SPEC_VERSION = 3

-- No documentation found for TopLevel "VK_EXT_VALIDATION_FEATURES_SPEC_VERSION"
pattern EXT_VALIDATION_FEATURES_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_VALIDATION_FEATURES_SPEC_VERSION :: a
$mEXT_VALIDATION_FEATURES_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
EXT_VALIDATION_FEATURES_SPEC_VERSION = 3


type EXT_VALIDATION_FEATURES_EXTENSION_NAME = "VK_EXT_validation_features"

-- No documentation found for TopLevel "VK_EXT_VALIDATION_FEATURES_EXTENSION_NAME"
pattern EXT_VALIDATION_FEATURES_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_VALIDATION_FEATURES_EXTENSION_NAME :: a
$mEXT_VALIDATION_FEATURES_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_VALIDATION_FEATURES_EXTENSION_NAME = "VK_EXT_validation_features"