{-# language CPP #-}
-- No documentation found for Chapter "IndexType"
module Vulkan.Core10.Enums.IndexType  (IndexType( INDEX_TYPE_UINT16
                                                , INDEX_TYPE_UINT32
                                                , INDEX_TYPE_UINT8_EXT
                                                , INDEX_TYPE_NONE_KHR
                                                , ..
                                                )) 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))

-- | VkIndexType - Type of index buffer indices
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Extensions.VK_KHR_acceleration_structure.AccelerationStructureGeometryTrianglesDataKHR',
-- 'Vulkan.Extensions.VK_NV_displacement_micromap.AccelerationStructureTrianglesDisplacementMicromapNV',
-- 'Vulkan.Extensions.VK_EXT_opacity_micromap.AccelerationStructureTrianglesOpacityMicromapEXT',
-- 'Vulkan.Extensions.VK_NV_device_generated_commands.BindIndexBufferIndirectCommandNV',
-- 'Vulkan.Extensions.VK_NV_ray_tracing.GeometryTrianglesNV',
-- 'Vulkan.Extensions.VK_NV_device_generated_commands.IndirectCommandsLayoutTokenNV',
-- 'Vulkan.Core10.CommandBufferBuilding.cmdBindIndexBuffer',
-- 'Vulkan.Extensions.VK_KHR_maintenance5.cmdBindIndexBuffer2KHR'
newtype IndexType = IndexType Int32
  deriving newtype (IndexType -> IndexType -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IndexType -> IndexType -> Bool
$c/= :: IndexType -> IndexType -> Bool
== :: IndexType -> IndexType -> Bool
$c== :: IndexType -> IndexType -> Bool
Eq, Eq IndexType
IndexType -> IndexType -> Bool
IndexType -> IndexType -> Ordering
IndexType -> IndexType -> IndexType
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 :: IndexType -> IndexType -> IndexType
$cmin :: IndexType -> IndexType -> IndexType
max :: IndexType -> IndexType -> IndexType
$cmax :: IndexType -> IndexType -> IndexType
>= :: IndexType -> IndexType -> Bool
$c>= :: IndexType -> IndexType -> Bool
> :: IndexType -> IndexType -> Bool
$c> :: IndexType -> IndexType -> Bool
<= :: IndexType -> IndexType -> Bool
$c<= :: IndexType -> IndexType -> Bool
< :: IndexType -> IndexType -> Bool
$c< :: IndexType -> IndexType -> Bool
compare :: IndexType -> IndexType -> Ordering
$ccompare :: IndexType -> IndexType -> Ordering
Ord, Ptr IndexType -> IO IndexType
Ptr IndexType -> Int -> IO IndexType
Ptr IndexType -> Int -> IndexType -> IO ()
Ptr IndexType -> IndexType -> IO ()
IndexType -> Int
forall b. Ptr b -> Int -> IO IndexType
forall b. Ptr b -> Int -> IndexType -> 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 IndexType -> IndexType -> IO ()
$cpoke :: Ptr IndexType -> IndexType -> IO ()
peek :: Ptr IndexType -> IO IndexType
$cpeek :: Ptr IndexType -> IO IndexType
pokeByteOff :: forall b. Ptr b -> Int -> IndexType -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> IndexType -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO IndexType
$cpeekByteOff :: forall b. Ptr b -> Int -> IO IndexType
pokeElemOff :: Ptr IndexType -> Int -> IndexType -> IO ()
$cpokeElemOff :: Ptr IndexType -> Int -> IndexType -> IO ()
peekElemOff :: Ptr IndexType -> Int -> IO IndexType
$cpeekElemOff :: Ptr IndexType -> Int -> IO IndexType
alignment :: IndexType -> Int
$calignment :: IndexType -> Int
sizeOf :: IndexType -> Int
$csizeOf :: IndexType -> Int
Storable, IndexType
forall a. a -> Zero a
zero :: IndexType
$czero :: IndexType
Zero)

-- | 'INDEX_TYPE_UINT16' specifies that indices are 16-bit unsigned integer
-- values.
pattern $bINDEX_TYPE_UINT16 :: IndexType
$mINDEX_TYPE_UINT16 :: forall {r}. IndexType -> ((# #) -> r) -> ((# #) -> r) -> r
INDEX_TYPE_UINT16 = IndexType 0

-- | 'INDEX_TYPE_UINT32' specifies that indices are 32-bit unsigned integer
-- values.
pattern $bINDEX_TYPE_UINT32 :: IndexType
$mINDEX_TYPE_UINT32 :: forall {r}. IndexType -> ((# #) -> r) -> ((# #) -> r) -> r
INDEX_TYPE_UINT32 = IndexType 1

-- | 'INDEX_TYPE_UINT8_EXT' specifies that indices are 8-bit unsigned integer
-- values.
pattern $bINDEX_TYPE_UINT8_EXT :: IndexType
$mINDEX_TYPE_UINT8_EXT :: forall {r}. IndexType -> ((# #) -> r) -> ((# #) -> r) -> r
INDEX_TYPE_UINT8_EXT = IndexType 1000265000

-- | 'INDEX_TYPE_NONE_KHR' specifies that no indices are provided.
pattern $bINDEX_TYPE_NONE_KHR :: IndexType
$mINDEX_TYPE_NONE_KHR :: forall {r}. IndexType -> ((# #) -> r) -> ((# #) -> r) -> r
INDEX_TYPE_NONE_KHR = IndexType 1000165000

{-# COMPLETE
  INDEX_TYPE_UINT16
  , INDEX_TYPE_UINT32
  , INDEX_TYPE_UINT8_EXT
  , INDEX_TYPE_NONE_KHR ::
    IndexType
  #-}

conNameIndexType :: String
conNameIndexType :: String
conNameIndexType = String
"IndexType"

enumPrefixIndexType :: String
enumPrefixIndexType :: String
enumPrefixIndexType = String
"INDEX_TYPE_"

showTableIndexType :: [(IndexType, String)]
showTableIndexType :: [(IndexType, String)]
showTableIndexType =
  [ (IndexType
INDEX_TYPE_UINT16, String
"UINT16")
  , (IndexType
INDEX_TYPE_UINT32, String
"UINT32")
  , (IndexType
INDEX_TYPE_UINT8_EXT, String
"UINT8_EXT")
  , (IndexType
INDEX_TYPE_NONE_KHR, String
"NONE_KHR")
  ]

instance Show IndexType where
  showsPrec :: Int -> IndexType -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixIndexType
      [(IndexType, String)]
showTableIndexType
      String
conNameIndexType
      (\(IndexType Int32
x) -> Int32
x)
      (forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read IndexType where
  readPrec :: ReadPrec IndexType
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixIndexType
      [(IndexType, String)]
showTableIndexType
      String
conNameIndexType
      Int32 -> IndexType
IndexType