{-# language CPP #-}
-- No documentation found for Chapter "CompareOp"
module Vulkan.Core10.Enums.CompareOp  (CompareOp( COMPARE_OP_NEVER
                                                , COMPARE_OP_LESS
                                                , COMPARE_OP_EQUAL
                                                , COMPARE_OP_LESS_OR_EQUAL
                                                , COMPARE_OP_GREATER
                                                , COMPARE_OP_NOT_EQUAL
                                                , COMPARE_OP_GREATER_OR_EQUAL
                                                , COMPARE_OP_ALWAYS
                                                , ..
                                                )) where

import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showsPrec)
import Vulkan.Zero (Zero)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))

-- | VkCompareOp - Comparison operator for depth, stencil, and sampler
-- operations
--
-- = Description
--
-- -   'COMPARE_OP_NEVER' specifies that the comparison always evaluates
--     false.
--
-- -   'COMPARE_OP_LESS' specifies that the comparison evaluates
--     /reference/ \< /test/.
--
-- -   'COMPARE_OP_EQUAL' specifies that the comparison evaluates
--     /reference/ = /test/.
--
-- -   'COMPARE_OP_LESS_OR_EQUAL' specifies that the comparison evaluates
--     /reference/ ≤ /test/.
--
-- -   'COMPARE_OP_GREATER' specifies that the comparison evaluates
--     /reference/ > /test/.
--
-- -   'COMPARE_OP_NOT_EQUAL' specifies that the comparison evaluates
--     /reference/ ≠ /test/.
--
-- -   'COMPARE_OP_GREATER_OR_EQUAL' specifies that the comparison
--     evaluates /reference/ ≥ /test/.
--
-- -   'COMPARE_OP_ALWAYS' specifies that the comparison always evaluates
--     true.
--
-- Comparison operators are used for:
--
-- -   The
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#textures-depth-compare-operation Depth Compare Operation>
--     operator for a sampler, specified by
--     'Vulkan.Core10.Sampler.SamplerCreateInfo'::@compareOp@.
--
-- -   The stencil comparison operator for the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-stencil stencil test>,
--     specified by
--     'Vulkan.Core13.Promoted_From_VK_EXT_extended_dynamic_state.cmdSetStencilOp'::@compareOp@
--     or 'Vulkan.Core10.Pipeline.StencilOpState'::@compareOp@.
--
-- -   The
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-depth-comparison Depth Comparison>
--     operator for the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-depth depth test>,
--     specified by
--     'Vulkan.Core13.Promoted_From_VK_EXT_extended_dynamic_state.cmdSetDepthCompareOp'::@depthCompareOp@
--     or
--     'Vulkan.Core10.Pipeline.PipelineDepthStencilStateCreateInfo'::@depthCompareOp@.
--
-- Each such use describes how the /reference/ and /test/ values for that
-- comparison are determined.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.Pipeline.PipelineDepthStencilStateCreateInfo',
-- 'Vulkan.Core10.Sampler.SamplerCreateInfo',
-- 'Vulkan.Core10.Pipeline.StencilOpState',
-- 'Vulkan.Core13.Promoted_From_VK_EXT_extended_dynamic_state.cmdSetDepthCompareOp',
-- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetDepthCompareOpEXT',
-- 'Vulkan.Core13.Promoted_From_VK_EXT_extended_dynamic_state.cmdSetStencilOp',
-- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetStencilOpEXT'
newtype CompareOp = CompareOp Int32
  deriving newtype (CompareOp -> CompareOp -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CompareOp -> CompareOp -> Bool
$c/= :: CompareOp -> CompareOp -> Bool
== :: CompareOp -> CompareOp -> Bool
$c== :: CompareOp -> CompareOp -> Bool
Eq, Eq CompareOp
CompareOp -> CompareOp -> Bool
CompareOp -> CompareOp -> Ordering
CompareOp -> CompareOp -> CompareOp
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 :: CompareOp -> CompareOp -> CompareOp
$cmin :: CompareOp -> CompareOp -> CompareOp
max :: CompareOp -> CompareOp -> CompareOp
$cmax :: CompareOp -> CompareOp -> CompareOp
>= :: CompareOp -> CompareOp -> Bool
$c>= :: CompareOp -> CompareOp -> Bool
> :: CompareOp -> CompareOp -> Bool
$c> :: CompareOp -> CompareOp -> Bool
<= :: CompareOp -> CompareOp -> Bool
$c<= :: CompareOp -> CompareOp -> Bool
< :: CompareOp -> CompareOp -> Bool
$c< :: CompareOp -> CompareOp -> Bool
compare :: CompareOp -> CompareOp -> Ordering
$ccompare :: CompareOp -> CompareOp -> Ordering
Ord, Ptr CompareOp -> IO CompareOp
Ptr CompareOp -> Int -> IO CompareOp
Ptr CompareOp -> Int -> CompareOp -> IO ()
Ptr CompareOp -> CompareOp -> IO ()
CompareOp -> Int
forall b. Ptr b -> Int -> IO CompareOp
forall b. Ptr b -> Int -> CompareOp -> 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 CompareOp -> CompareOp -> IO ()
$cpoke :: Ptr CompareOp -> CompareOp -> IO ()
peek :: Ptr CompareOp -> IO CompareOp
$cpeek :: Ptr CompareOp -> IO CompareOp
pokeByteOff :: forall b. Ptr b -> Int -> CompareOp -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> CompareOp -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO CompareOp
$cpeekByteOff :: forall b. Ptr b -> Int -> IO CompareOp
pokeElemOff :: Ptr CompareOp -> Int -> CompareOp -> IO ()
$cpokeElemOff :: Ptr CompareOp -> Int -> CompareOp -> IO ()
peekElemOff :: Ptr CompareOp -> Int -> IO CompareOp
$cpeekElemOff :: Ptr CompareOp -> Int -> IO CompareOp
alignment :: CompareOp -> Int
$calignment :: CompareOp -> Int
sizeOf :: CompareOp -> Int
$csizeOf :: CompareOp -> Int
Storable, CompareOp
forall a. a -> Zero a
zero :: CompareOp
$czero :: CompareOp
Zero)

-- No documentation found for Nested "VkCompareOp" "VK_COMPARE_OP_NEVER"
pattern $bCOMPARE_OP_NEVER :: CompareOp
$mCOMPARE_OP_NEVER :: forall {r}. CompareOp -> ((# #) -> r) -> ((# #) -> r) -> r
COMPARE_OP_NEVER = CompareOp 0

-- No documentation found for Nested "VkCompareOp" "VK_COMPARE_OP_LESS"
pattern $bCOMPARE_OP_LESS :: CompareOp
$mCOMPARE_OP_LESS :: forall {r}. CompareOp -> ((# #) -> r) -> ((# #) -> r) -> r
COMPARE_OP_LESS = CompareOp 1

-- No documentation found for Nested "VkCompareOp" "VK_COMPARE_OP_EQUAL"
pattern $bCOMPARE_OP_EQUAL :: CompareOp
$mCOMPARE_OP_EQUAL :: forall {r}. CompareOp -> ((# #) -> r) -> ((# #) -> r) -> r
COMPARE_OP_EQUAL = CompareOp 2

-- No documentation found for Nested "VkCompareOp" "VK_COMPARE_OP_LESS_OR_EQUAL"
pattern $bCOMPARE_OP_LESS_OR_EQUAL :: CompareOp
$mCOMPARE_OP_LESS_OR_EQUAL :: forall {r}. CompareOp -> ((# #) -> r) -> ((# #) -> r) -> r
COMPARE_OP_LESS_OR_EQUAL = CompareOp 3

-- No documentation found for Nested "VkCompareOp" "VK_COMPARE_OP_GREATER"
pattern $bCOMPARE_OP_GREATER :: CompareOp
$mCOMPARE_OP_GREATER :: forall {r}. CompareOp -> ((# #) -> r) -> ((# #) -> r) -> r
COMPARE_OP_GREATER = CompareOp 4

-- No documentation found for Nested "VkCompareOp" "VK_COMPARE_OP_NOT_EQUAL"
pattern $bCOMPARE_OP_NOT_EQUAL :: CompareOp
$mCOMPARE_OP_NOT_EQUAL :: forall {r}. CompareOp -> ((# #) -> r) -> ((# #) -> r) -> r
COMPARE_OP_NOT_EQUAL = CompareOp 5

-- No documentation found for Nested "VkCompareOp" "VK_COMPARE_OP_GREATER_OR_EQUAL"
pattern $bCOMPARE_OP_GREATER_OR_EQUAL :: CompareOp
$mCOMPARE_OP_GREATER_OR_EQUAL :: forall {r}. CompareOp -> ((# #) -> r) -> ((# #) -> r) -> r
COMPARE_OP_GREATER_OR_EQUAL = CompareOp 6

-- No documentation found for Nested "VkCompareOp" "VK_COMPARE_OP_ALWAYS"
pattern $bCOMPARE_OP_ALWAYS :: CompareOp
$mCOMPARE_OP_ALWAYS :: forall {r}. CompareOp -> ((# #) -> r) -> ((# #) -> r) -> r
COMPARE_OP_ALWAYS = CompareOp 7

{-# COMPLETE
  COMPARE_OP_NEVER
  , COMPARE_OP_LESS
  , COMPARE_OP_EQUAL
  , COMPARE_OP_LESS_OR_EQUAL
  , COMPARE_OP_GREATER
  , COMPARE_OP_NOT_EQUAL
  , COMPARE_OP_GREATER_OR_EQUAL
  , COMPARE_OP_ALWAYS ::
    CompareOp
  #-}

conNameCompareOp :: String
conNameCompareOp :: String
conNameCompareOp = String
"CompareOp"

enumPrefixCompareOp :: String
enumPrefixCompareOp :: String
enumPrefixCompareOp = String
"COMPARE_OP_"

showTableCompareOp :: [(CompareOp, String)]
showTableCompareOp :: [(CompareOp, String)]
showTableCompareOp =
  [ (CompareOp
COMPARE_OP_NEVER, String
"NEVER")
  , (CompareOp
COMPARE_OP_LESS, String
"LESS")
  , (CompareOp
COMPARE_OP_EQUAL, String
"EQUAL")
  , (CompareOp
COMPARE_OP_LESS_OR_EQUAL, String
"LESS_OR_EQUAL")
  , (CompareOp
COMPARE_OP_GREATER, String
"GREATER")
  , (CompareOp
COMPARE_OP_NOT_EQUAL, String
"NOT_EQUAL")
  , (CompareOp
COMPARE_OP_GREATER_OR_EQUAL, String
"GREATER_OR_EQUAL")
  , (CompareOp
COMPARE_OP_ALWAYS, String
"ALWAYS")
  ]

instance Show CompareOp where
  showsPrec :: Int -> CompareOp -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixCompareOp
      [(CompareOp, String)]
showTableCompareOp
      String
conNameCompareOp
      (\(CompareOp Int32
x) -> Int32
x)
      (forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read CompareOp where
  readPrec :: ReadPrec CompareOp
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixCompareOp
      [(CompareOp, String)]
showTableCompareOp
      String
conNameCompareOp
      Int32 -> CompareOp
CompareOp