{-# language CPP #-}
module Vulkan.Core12.Enums.ShaderFloatControlsIndependence  (ShaderFloatControlsIndependence( SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY
                                                                                            , SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL
                                                                                            , SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE
                                                                                            , ..
                                                                                            )) where

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 Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import Text.Read.Lex (Lexeme(Ident))
import Vulkan.Zero (Zero)
-- | VkShaderFloatControlsIndependence - Enum specifying whether, and how,
-- shader float controls can be set separately
--
-- = See Also
--
-- 'Vulkan.Core12.Promoted_From_VK_KHR_shader_float_controls.PhysicalDeviceFloatControlsProperties',
-- 'Vulkan.Core12.PhysicalDeviceVulkan12Properties'
newtype ShaderFloatControlsIndependence = ShaderFloatControlsIndependence Int32
  deriving newtype (ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> Bool
(ShaderFloatControlsIndependence
 -> ShaderFloatControlsIndependence -> Bool)
-> (ShaderFloatControlsIndependence
    -> ShaderFloatControlsIndependence -> Bool)
-> Eq ShaderFloatControlsIndependence
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> Bool
$c/= :: ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> Bool
== :: ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> Bool
$c== :: ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> Bool
Eq, Eq ShaderFloatControlsIndependence
Eq ShaderFloatControlsIndependence =>
(ShaderFloatControlsIndependence
 -> ShaderFloatControlsIndependence -> Ordering)
-> (ShaderFloatControlsIndependence
    -> ShaderFloatControlsIndependence -> Bool)
-> (ShaderFloatControlsIndependence
    -> ShaderFloatControlsIndependence -> Bool)
-> (ShaderFloatControlsIndependence
    -> ShaderFloatControlsIndependence -> Bool)
-> (ShaderFloatControlsIndependence
    -> ShaderFloatControlsIndependence -> Bool)
-> (ShaderFloatControlsIndependence
    -> ShaderFloatControlsIndependence
    -> ShaderFloatControlsIndependence)
-> (ShaderFloatControlsIndependence
    -> ShaderFloatControlsIndependence
    -> ShaderFloatControlsIndependence)
-> Ord ShaderFloatControlsIndependence
ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> Bool
ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> Ordering
ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence
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 :: ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence
$cmin :: ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence
max :: ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence
$cmax :: ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence
>= :: ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> Bool
$c>= :: ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> Bool
> :: ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> Bool
$c> :: ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> Bool
<= :: ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> Bool
$c<= :: ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> Bool
< :: ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> Bool
$c< :: ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> Bool
compare :: ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> Ordering
$ccompare :: ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> Ordering
$cp1Ord :: Eq ShaderFloatControlsIndependence
Ord, Ptr b -> Int -> IO ShaderFloatControlsIndependence
Ptr b -> Int -> ShaderFloatControlsIndependence -> IO ()
Ptr ShaderFloatControlsIndependence
-> IO ShaderFloatControlsIndependence
Ptr ShaderFloatControlsIndependence
-> Int -> IO ShaderFloatControlsIndependence
Ptr ShaderFloatControlsIndependence
-> Int -> ShaderFloatControlsIndependence -> IO ()
Ptr ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> IO ()
ShaderFloatControlsIndependence -> Int
(ShaderFloatControlsIndependence -> Int)
-> (ShaderFloatControlsIndependence -> Int)
-> (Ptr ShaderFloatControlsIndependence
    -> Int -> IO ShaderFloatControlsIndependence)
-> (Ptr ShaderFloatControlsIndependence
    -> Int -> ShaderFloatControlsIndependence -> IO ())
-> (forall b. Ptr b -> Int -> IO ShaderFloatControlsIndependence)
-> (forall b.
    Ptr b -> Int -> ShaderFloatControlsIndependence -> IO ())
-> (Ptr ShaderFloatControlsIndependence
    -> IO ShaderFloatControlsIndependence)
-> (Ptr ShaderFloatControlsIndependence
    -> ShaderFloatControlsIndependence -> IO ())
-> Storable ShaderFloatControlsIndependence
forall b. Ptr b -> Int -> IO ShaderFloatControlsIndependence
forall b. Ptr b -> Int -> ShaderFloatControlsIndependence -> 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 ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> IO ()
$cpoke :: Ptr ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> IO ()
peek :: Ptr ShaderFloatControlsIndependence
-> IO ShaderFloatControlsIndependence
$cpeek :: Ptr ShaderFloatControlsIndependence
-> IO ShaderFloatControlsIndependence
pokeByteOff :: Ptr b -> Int -> ShaderFloatControlsIndependence -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ShaderFloatControlsIndependence -> IO ()
peekByteOff :: Ptr b -> Int -> IO ShaderFloatControlsIndependence
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ShaderFloatControlsIndependence
pokeElemOff :: Ptr ShaderFloatControlsIndependence
-> Int -> ShaderFloatControlsIndependence -> IO ()
$cpokeElemOff :: Ptr ShaderFloatControlsIndependence
-> Int -> ShaderFloatControlsIndependence -> IO ()
peekElemOff :: Ptr ShaderFloatControlsIndependence
-> Int -> IO ShaderFloatControlsIndependence
$cpeekElemOff :: Ptr ShaderFloatControlsIndependence
-> Int -> IO ShaderFloatControlsIndependence
alignment :: ShaderFloatControlsIndependence -> Int
$calignment :: ShaderFloatControlsIndependence -> Int
sizeOf :: ShaderFloatControlsIndependence -> Int
$csizeOf :: ShaderFloatControlsIndependence -> Int
Storable, ShaderFloatControlsIndependence
ShaderFloatControlsIndependence
-> Zero ShaderFloatControlsIndependence
forall a. a -> Zero a
zero :: ShaderFloatControlsIndependence
$czero :: ShaderFloatControlsIndependence
Zero)

-- | 'SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY' specifies that shader
-- float controls for 32-bit floating point /can/ be set independently;
-- other bit widths /must/ be set identically to each other.
pattern $bSHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY :: ShaderFloatControlsIndependence
$mSHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY :: forall r.
ShaderFloatControlsIndependence
-> (Void# -> r) -> (Void# -> r) -> r
SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY = ShaderFloatControlsIndependence 0
-- | 'SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL' specifies that shader float
-- controls for all bit widths /can/ be set independently.
pattern $bSHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL :: ShaderFloatControlsIndependence
$mSHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL :: forall r.
ShaderFloatControlsIndependence
-> (Void# -> r) -> (Void# -> r) -> r
SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL = ShaderFloatControlsIndependence 1
-- | 'SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE' specifies that shader float
-- controls for all bit widths /must/ be set identically.
pattern $bSHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE :: ShaderFloatControlsIndependence
$mSHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE :: forall r.
ShaderFloatControlsIndependence
-> (Void# -> r) -> (Void# -> r) -> r
SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE = ShaderFloatControlsIndependence 2
{-# complete SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY,
             SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL,
             SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE :: ShaderFloatControlsIndependence #-}

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