{-# language CPP #-}
-- No documentation found for Chapter "VertexInputRate"
module Vulkan.Core10.Enums.VertexInputRate  (VertexInputRate( VERTEX_INPUT_RATE_VERTEX
                                                            , VERTEX_INPUT_RATE_INSTANCE
                                                            , ..
                                                            )) 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))

-- | VkVertexInputRate - Specify rate at which vertex attributes are pulled
-- from buffers
--
-- = 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.VertexInputBindingDescription',
-- 'Vulkan.Extensions.VK_EXT_vertex_input_dynamic_state.VertexInputBindingDescription2EXT'
newtype VertexInputRate = VertexInputRate Int32
  deriving newtype (VertexInputRate -> VertexInputRate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VertexInputRate -> VertexInputRate -> Bool
$c/= :: VertexInputRate -> VertexInputRate -> Bool
== :: VertexInputRate -> VertexInputRate -> Bool
$c== :: VertexInputRate -> VertexInputRate -> Bool
Eq, Eq VertexInputRate
VertexInputRate -> VertexInputRate -> Bool
VertexInputRate -> VertexInputRate -> Ordering
VertexInputRate -> VertexInputRate -> VertexInputRate
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 :: VertexInputRate -> VertexInputRate -> VertexInputRate
$cmin :: VertexInputRate -> VertexInputRate -> VertexInputRate
max :: VertexInputRate -> VertexInputRate -> VertexInputRate
$cmax :: VertexInputRate -> VertexInputRate -> VertexInputRate
>= :: VertexInputRate -> VertexInputRate -> Bool
$c>= :: VertexInputRate -> VertexInputRate -> Bool
> :: VertexInputRate -> VertexInputRate -> Bool
$c> :: VertexInputRate -> VertexInputRate -> Bool
<= :: VertexInputRate -> VertexInputRate -> Bool
$c<= :: VertexInputRate -> VertexInputRate -> Bool
< :: VertexInputRate -> VertexInputRate -> Bool
$c< :: VertexInputRate -> VertexInputRate -> Bool
compare :: VertexInputRate -> VertexInputRate -> Ordering
$ccompare :: VertexInputRate -> VertexInputRate -> Ordering
Ord, Ptr VertexInputRate -> IO VertexInputRate
Ptr VertexInputRate -> Int -> IO VertexInputRate
Ptr VertexInputRate -> Int -> VertexInputRate -> IO ()
Ptr VertexInputRate -> VertexInputRate -> IO ()
VertexInputRate -> Int
forall b. Ptr b -> Int -> IO VertexInputRate
forall b. Ptr b -> Int -> VertexInputRate -> 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 VertexInputRate -> VertexInputRate -> IO ()
$cpoke :: Ptr VertexInputRate -> VertexInputRate -> IO ()
peek :: Ptr VertexInputRate -> IO VertexInputRate
$cpeek :: Ptr VertexInputRate -> IO VertexInputRate
pokeByteOff :: forall b. Ptr b -> Int -> VertexInputRate -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> VertexInputRate -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO VertexInputRate
$cpeekByteOff :: forall b. Ptr b -> Int -> IO VertexInputRate
pokeElemOff :: Ptr VertexInputRate -> Int -> VertexInputRate -> IO ()
$cpokeElemOff :: Ptr VertexInputRate -> Int -> VertexInputRate -> IO ()
peekElemOff :: Ptr VertexInputRate -> Int -> IO VertexInputRate
$cpeekElemOff :: Ptr VertexInputRate -> Int -> IO VertexInputRate
alignment :: VertexInputRate -> Int
$calignment :: VertexInputRate -> Int
sizeOf :: VertexInputRate -> Int
$csizeOf :: VertexInputRate -> Int
Storable, VertexInputRate
forall a. a -> Zero a
zero :: VertexInputRate
$czero :: VertexInputRate
Zero)

-- | 'VERTEX_INPUT_RATE_VERTEX' specifies that vertex attribute addressing is
-- a function of the vertex index.
pattern $bVERTEX_INPUT_RATE_VERTEX :: VertexInputRate
$mVERTEX_INPUT_RATE_VERTEX :: forall {r}. VertexInputRate -> ((# #) -> r) -> ((# #) -> r) -> r
VERTEX_INPUT_RATE_VERTEX = VertexInputRate 0

-- | 'VERTEX_INPUT_RATE_INSTANCE' specifies that vertex attribute addressing
-- is a function of the instance index.
pattern $bVERTEX_INPUT_RATE_INSTANCE :: VertexInputRate
$mVERTEX_INPUT_RATE_INSTANCE :: forall {r}. VertexInputRate -> ((# #) -> r) -> ((# #) -> r) -> r
VERTEX_INPUT_RATE_INSTANCE = VertexInputRate 1

{-# COMPLETE
  VERTEX_INPUT_RATE_VERTEX
  , VERTEX_INPUT_RATE_INSTANCE ::
    VertexInputRate
  #-}

conNameVertexInputRate :: String
conNameVertexInputRate :: String
conNameVertexInputRate = String
"VertexInputRate"

enumPrefixVertexInputRate :: String
enumPrefixVertexInputRate :: String
enumPrefixVertexInputRate = String
"VERTEX_INPUT_RATE_"

showTableVertexInputRate :: [(VertexInputRate, String)]
showTableVertexInputRate :: [(VertexInputRate, String)]
showTableVertexInputRate =
  [ (VertexInputRate
VERTEX_INPUT_RATE_VERTEX, String
"VERTEX")
  , (VertexInputRate
VERTEX_INPUT_RATE_INSTANCE, String
"INSTANCE")
  ]

instance Show VertexInputRate where
  showsPrec :: Int -> VertexInputRate -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixVertexInputRate
      [(VertexInputRate, String)]
showTableVertexInputRate
      String
conNameVertexInputRate
      (\(VertexInputRate Int32
x) -> Int32
x)
      (forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read VertexInputRate where
  readPrec :: ReadPrec VertexInputRate
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixVertexInputRate
      [(VertexInputRate, String)]
showTableVertexInputRate
      String
conNameVertexInputRate
      Int32 -> VertexInputRate
VertexInputRate