{-# language CPP #-}
module Vulkan.Core11.Enums.TessellationDomainOrigin  (TessellationDomainOrigin( TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT
                                                                              , TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT
                                                                              , ..
                                                                              )) 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)
-- | VkTessellationDomainOrigin - Enum describing tessellation domain origin
--
-- = Description
--
-- This enum affects how the @VertexOrderCw@ and @VertexOrderCcw@
-- tessellation execution modes are interpreted, since the winding is
-- defined relative to the orientation of the domain.
--
-- = See Also
--
-- 'Vulkan.Core11.Promoted_From_VK_KHR_maintenance2.PipelineTessellationDomainOriginStateCreateInfo'
newtype TessellationDomainOrigin = TessellationDomainOrigin Int32
  deriving newtype (TessellationDomainOrigin -> TessellationDomainOrigin -> Bool
(TessellationDomainOrigin -> TessellationDomainOrigin -> Bool)
-> (TessellationDomainOrigin -> TessellationDomainOrigin -> Bool)
-> Eq TessellationDomainOrigin
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TessellationDomainOrigin -> TessellationDomainOrigin -> Bool
$c/= :: TessellationDomainOrigin -> TessellationDomainOrigin -> Bool
== :: TessellationDomainOrigin -> TessellationDomainOrigin -> Bool
$c== :: TessellationDomainOrigin -> TessellationDomainOrigin -> Bool
Eq, Eq TessellationDomainOrigin
Eq TessellationDomainOrigin =>
(TessellationDomainOrigin -> TessellationDomainOrigin -> Ordering)
-> (TessellationDomainOrigin -> TessellationDomainOrigin -> Bool)
-> (TessellationDomainOrigin -> TessellationDomainOrigin -> Bool)
-> (TessellationDomainOrigin -> TessellationDomainOrigin -> Bool)
-> (TessellationDomainOrigin -> TessellationDomainOrigin -> Bool)
-> (TessellationDomainOrigin
    -> TessellationDomainOrigin -> TessellationDomainOrigin)
-> (TessellationDomainOrigin
    -> TessellationDomainOrigin -> TessellationDomainOrigin)
-> Ord TessellationDomainOrigin
TessellationDomainOrigin -> TessellationDomainOrigin -> Bool
TessellationDomainOrigin -> TessellationDomainOrigin -> Ordering
TessellationDomainOrigin
-> TessellationDomainOrigin -> TessellationDomainOrigin
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 :: TessellationDomainOrigin
-> TessellationDomainOrigin -> TessellationDomainOrigin
$cmin :: TessellationDomainOrigin
-> TessellationDomainOrigin -> TessellationDomainOrigin
max :: TessellationDomainOrigin
-> TessellationDomainOrigin -> TessellationDomainOrigin
$cmax :: TessellationDomainOrigin
-> TessellationDomainOrigin -> TessellationDomainOrigin
>= :: TessellationDomainOrigin -> TessellationDomainOrigin -> Bool
$c>= :: TessellationDomainOrigin -> TessellationDomainOrigin -> Bool
> :: TessellationDomainOrigin -> TessellationDomainOrigin -> Bool
$c> :: TessellationDomainOrigin -> TessellationDomainOrigin -> Bool
<= :: TessellationDomainOrigin -> TessellationDomainOrigin -> Bool
$c<= :: TessellationDomainOrigin -> TessellationDomainOrigin -> Bool
< :: TessellationDomainOrigin -> TessellationDomainOrigin -> Bool
$c< :: TessellationDomainOrigin -> TessellationDomainOrigin -> Bool
compare :: TessellationDomainOrigin -> TessellationDomainOrigin -> Ordering
$ccompare :: TessellationDomainOrigin -> TessellationDomainOrigin -> Ordering
$cp1Ord :: Eq TessellationDomainOrigin
Ord, Ptr b -> Int -> IO TessellationDomainOrigin
Ptr b -> Int -> TessellationDomainOrigin -> IO ()
Ptr TessellationDomainOrigin -> IO TessellationDomainOrigin
Ptr TessellationDomainOrigin -> Int -> IO TessellationDomainOrigin
Ptr TessellationDomainOrigin
-> Int -> TessellationDomainOrigin -> IO ()
Ptr TessellationDomainOrigin -> TessellationDomainOrigin -> IO ()
TessellationDomainOrigin -> Int
(TessellationDomainOrigin -> Int)
-> (TessellationDomainOrigin -> Int)
-> (Ptr TessellationDomainOrigin
    -> Int -> IO TessellationDomainOrigin)
-> (Ptr TessellationDomainOrigin
    -> Int -> TessellationDomainOrigin -> IO ())
-> (forall b. Ptr b -> Int -> IO TessellationDomainOrigin)
-> (forall b. Ptr b -> Int -> TessellationDomainOrigin -> IO ())
-> (Ptr TessellationDomainOrigin -> IO TessellationDomainOrigin)
-> (Ptr TessellationDomainOrigin
    -> TessellationDomainOrigin -> IO ())
-> Storable TessellationDomainOrigin
forall b. Ptr b -> Int -> IO TessellationDomainOrigin
forall b. Ptr b -> Int -> TessellationDomainOrigin -> 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 TessellationDomainOrigin -> TessellationDomainOrigin -> IO ()
$cpoke :: Ptr TessellationDomainOrigin -> TessellationDomainOrigin -> IO ()
peek :: Ptr TessellationDomainOrigin -> IO TessellationDomainOrigin
$cpeek :: Ptr TessellationDomainOrigin -> IO TessellationDomainOrigin
pokeByteOff :: Ptr b -> Int -> TessellationDomainOrigin -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> TessellationDomainOrigin -> IO ()
peekByteOff :: Ptr b -> Int -> IO TessellationDomainOrigin
$cpeekByteOff :: forall b. Ptr b -> Int -> IO TessellationDomainOrigin
pokeElemOff :: Ptr TessellationDomainOrigin
-> Int -> TessellationDomainOrigin -> IO ()
$cpokeElemOff :: Ptr TessellationDomainOrigin
-> Int -> TessellationDomainOrigin -> IO ()
peekElemOff :: Ptr TessellationDomainOrigin -> Int -> IO TessellationDomainOrigin
$cpeekElemOff :: Ptr TessellationDomainOrigin -> Int -> IO TessellationDomainOrigin
alignment :: TessellationDomainOrigin -> Int
$calignment :: TessellationDomainOrigin -> Int
sizeOf :: TessellationDomainOrigin -> Int
$csizeOf :: TessellationDomainOrigin -> Int
Storable, TessellationDomainOrigin
TessellationDomainOrigin -> Zero TessellationDomainOrigin
forall a. a -> Zero a
zero :: TessellationDomainOrigin
$czero :: TessellationDomainOrigin
Zero)

-- | 'TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT' specifies that the origin of the
-- domain space is in the upper left corner, as shown in figure
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#img-tessellation-topology-ul>.
pattern $bTESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT :: TessellationDomainOrigin
$mTESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT :: forall r.
TessellationDomainOrigin -> (Void# -> r) -> (Void# -> r) -> r
TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT = TessellationDomainOrigin 0
-- | 'TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT' specifies that the origin of the
-- domain space is in the lower left corner, as shown in figure
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#img-tessellation-topology-ll>.
pattern $bTESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT :: TessellationDomainOrigin
$mTESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT :: forall r.
TessellationDomainOrigin -> (Void# -> r) -> (Void# -> r) -> r
TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT = TessellationDomainOrigin 1
{-# complete TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT,
             TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT :: TessellationDomainOrigin #-}

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