{-# language CPP #-}
module Vulkan.Extensions.VK_AMD_memory_overallocation_behavior  ( DeviceMemoryOverallocationCreateInfoAMD(..)
                                                                , MemoryOverallocationBehaviorAMD( MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD
                                                                                                 , MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD
                                                                                                 , MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD
                                                                                                 , ..
                                                                                                 )
                                                                , AMD_MEMORY_OVERALLOCATION_BEHAVIOR_SPEC_VERSION
                                                                , pattern AMD_MEMORY_OVERALLOCATION_BEHAVIOR_SPEC_VERSION
                                                                , AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME
                                                                , pattern AMD_MEMORY_OVERALLOCATION_BEHAVIOR_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 Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import Data.Int (Int32)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import Text.Read.Lex (Lexeme(Ident))
import Data.Kind (Type)
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_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD))
-- | VkDeviceMemoryOverallocationCreateInfoAMD - Specify memory
-- overallocation behavior for a Vulkan device
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'MemoryOverallocationBehaviorAMD',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data DeviceMemoryOverallocationCreateInfoAMD = DeviceMemoryOverallocationCreateInfoAMD
  { -- | @overallocationBehavior@ is the desired overallocation behavior.
    --
    -- @overallocationBehavior@ /must/ be a valid
    -- 'MemoryOverallocationBehaviorAMD' value
    DeviceMemoryOverallocationCreateInfoAMD
-> MemoryOverallocationBehaviorAMD
overallocationBehavior :: MemoryOverallocationBehaviorAMD }
  deriving (Typeable, DeviceMemoryOverallocationCreateInfoAMD
-> DeviceMemoryOverallocationCreateInfoAMD -> Bool
(DeviceMemoryOverallocationCreateInfoAMD
 -> DeviceMemoryOverallocationCreateInfoAMD -> Bool)
-> (DeviceMemoryOverallocationCreateInfoAMD
    -> DeviceMemoryOverallocationCreateInfoAMD -> Bool)
-> Eq DeviceMemoryOverallocationCreateInfoAMD
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeviceMemoryOverallocationCreateInfoAMD
-> DeviceMemoryOverallocationCreateInfoAMD -> Bool
$c/= :: DeviceMemoryOverallocationCreateInfoAMD
-> DeviceMemoryOverallocationCreateInfoAMD -> Bool
== :: DeviceMemoryOverallocationCreateInfoAMD
-> DeviceMemoryOverallocationCreateInfoAMD -> Bool
$c== :: DeviceMemoryOverallocationCreateInfoAMD
-> DeviceMemoryOverallocationCreateInfoAMD -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DeviceMemoryOverallocationCreateInfoAMD)
#endif
deriving instance Show DeviceMemoryOverallocationCreateInfoAMD

instance ToCStruct DeviceMemoryOverallocationCreateInfoAMD where
  withCStruct :: DeviceMemoryOverallocationCreateInfoAMD
-> (Ptr DeviceMemoryOverallocationCreateInfoAMD -> IO b) -> IO b
withCStruct x :: DeviceMemoryOverallocationCreateInfoAMD
x f :: Ptr DeviceMemoryOverallocationCreateInfoAMD -> IO b
f = Int
-> Int
-> (Ptr DeviceMemoryOverallocationCreateInfoAMD -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr DeviceMemoryOverallocationCreateInfoAMD -> IO b) -> IO b)
-> (Ptr DeviceMemoryOverallocationCreateInfoAMD -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr DeviceMemoryOverallocationCreateInfoAMD
p -> Ptr DeviceMemoryOverallocationCreateInfoAMD
-> DeviceMemoryOverallocationCreateInfoAMD -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DeviceMemoryOverallocationCreateInfoAMD
p DeviceMemoryOverallocationCreateInfoAMD
x (Ptr DeviceMemoryOverallocationCreateInfoAMD -> IO b
f Ptr DeviceMemoryOverallocationCreateInfoAMD
p)
  pokeCStruct :: Ptr DeviceMemoryOverallocationCreateInfoAMD
-> DeviceMemoryOverallocationCreateInfoAMD -> IO b -> IO b
pokeCStruct p :: Ptr DeviceMemoryOverallocationCreateInfoAMD
p DeviceMemoryOverallocationCreateInfoAMD{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceMemoryOverallocationCreateInfoAMD
p Ptr DeviceMemoryOverallocationCreateInfoAMD
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceMemoryOverallocationCreateInfoAMD
p Ptr DeviceMemoryOverallocationCreateInfoAMD -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr MemoryOverallocationBehaviorAMD
-> MemoryOverallocationBehaviorAMD -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceMemoryOverallocationCreateInfoAMD
p Ptr DeviceMemoryOverallocationCreateInfoAMD
-> Int -> Ptr MemoryOverallocationBehaviorAMD
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr MemoryOverallocationBehaviorAMD)) (MemoryOverallocationBehaviorAMD
overallocationBehavior)
    IO b
f
  cStructSize :: Int
cStructSize = 24
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr DeviceMemoryOverallocationCreateInfoAMD -> IO b -> IO b
pokeZeroCStruct p :: Ptr DeviceMemoryOverallocationCreateInfoAMD
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceMemoryOverallocationCreateInfoAMD
p Ptr DeviceMemoryOverallocationCreateInfoAMD
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceMemoryOverallocationCreateInfoAMD
p Ptr DeviceMemoryOverallocationCreateInfoAMD -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr MemoryOverallocationBehaviorAMD
-> MemoryOverallocationBehaviorAMD -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceMemoryOverallocationCreateInfoAMD
p Ptr DeviceMemoryOverallocationCreateInfoAMD
-> Int -> Ptr MemoryOverallocationBehaviorAMD
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr MemoryOverallocationBehaviorAMD)) (MemoryOverallocationBehaviorAMD
forall a. Zero a => a
zero)
    IO b
f

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

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

instance Zero DeviceMemoryOverallocationCreateInfoAMD where
  zero :: DeviceMemoryOverallocationCreateInfoAMD
zero = MemoryOverallocationBehaviorAMD
-> DeviceMemoryOverallocationCreateInfoAMD
DeviceMemoryOverallocationCreateInfoAMD
           MemoryOverallocationBehaviorAMD
forall a. Zero a => a
zero


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

-- | 'MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD' lets the implementation
-- decide if overallocation is allowed.
pattern $bMEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD :: MemoryOverallocationBehaviorAMD
$mMEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD :: forall r.
MemoryOverallocationBehaviorAMD
-> (Void# -> r) -> (Void# -> r) -> r
MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD = MemoryOverallocationBehaviorAMD 0
-- | 'MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD' specifies overallocation is
-- allowed if platform permits.
pattern $bMEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD :: MemoryOverallocationBehaviorAMD
$mMEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD :: forall r.
MemoryOverallocationBehaviorAMD
-> (Void# -> r) -> (Void# -> r) -> r
MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD = MemoryOverallocationBehaviorAMD 1
-- | 'MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD' specifies the
-- application is not allowed to allocate device memory beyond the heap
-- sizes reported by
-- 'Vulkan.Core10.DeviceInitialization.PhysicalDeviceMemoryProperties'.
-- Allocations that are not explicitly made by the application within the
-- scope of the Vulkan instance are not accounted for.
pattern $bMEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD :: MemoryOverallocationBehaviorAMD
$mMEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD :: forall r.
MemoryOverallocationBehaviorAMD
-> (Void# -> r) -> (Void# -> r) -> r
MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD = MemoryOverallocationBehaviorAMD 2
{-# complete MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD,
             MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD,
             MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD :: MemoryOverallocationBehaviorAMD #-}

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


type AMD_MEMORY_OVERALLOCATION_BEHAVIOR_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_SPEC_VERSION"
pattern AMD_MEMORY_OVERALLOCATION_BEHAVIOR_SPEC_VERSION :: forall a . Integral a => a
pattern $bAMD_MEMORY_OVERALLOCATION_BEHAVIOR_SPEC_VERSION :: a
$mAMD_MEMORY_OVERALLOCATION_BEHAVIOR_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
AMD_MEMORY_OVERALLOCATION_BEHAVIOR_SPEC_VERSION = 1


type AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME = "VK_AMD_memory_overallocation_behavior"

-- No documentation found for TopLevel "VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME"
pattern AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bAMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME :: a
$mAMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME = "VK_AMD_memory_overallocation_behavior"