{-# language CPP #-}
-- No documentation found for Chapter "SamplerAddressMode"
module Vulkan.Core10.Enums.SamplerAddressMode  (SamplerAddressMode( SAMPLER_ADDRESS_MODE_REPEAT
                                                                  , SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT
                                                                  , SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
                                                                  , SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER
                                                                  , SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE
                                                                  , ..
                                                                  )) 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))

-- | VkSamplerAddressMode - Specify behavior of sampling with texture
-- coordinates outside an image
--
-- = 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.Sampler.SamplerCreateInfo'
newtype SamplerAddressMode = SamplerAddressMode Int32
  deriving newtype (SamplerAddressMode -> SamplerAddressMode -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SamplerAddressMode -> SamplerAddressMode -> Bool
$c/= :: SamplerAddressMode -> SamplerAddressMode -> Bool
== :: SamplerAddressMode -> SamplerAddressMode -> Bool
$c== :: SamplerAddressMode -> SamplerAddressMode -> Bool
Eq, Eq SamplerAddressMode
SamplerAddressMode -> SamplerAddressMode -> Bool
SamplerAddressMode -> SamplerAddressMode -> Ordering
SamplerAddressMode -> SamplerAddressMode -> SamplerAddressMode
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 :: SamplerAddressMode -> SamplerAddressMode -> SamplerAddressMode
$cmin :: SamplerAddressMode -> SamplerAddressMode -> SamplerAddressMode
max :: SamplerAddressMode -> SamplerAddressMode -> SamplerAddressMode
$cmax :: SamplerAddressMode -> SamplerAddressMode -> SamplerAddressMode
>= :: SamplerAddressMode -> SamplerAddressMode -> Bool
$c>= :: SamplerAddressMode -> SamplerAddressMode -> Bool
> :: SamplerAddressMode -> SamplerAddressMode -> Bool
$c> :: SamplerAddressMode -> SamplerAddressMode -> Bool
<= :: SamplerAddressMode -> SamplerAddressMode -> Bool
$c<= :: SamplerAddressMode -> SamplerAddressMode -> Bool
< :: SamplerAddressMode -> SamplerAddressMode -> Bool
$c< :: SamplerAddressMode -> SamplerAddressMode -> Bool
compare :: SamplerAddressMode -> SamplerAddressMode -> Ordering
$ccompare :: SamplerAddressMode -> SamplerAddressMode -> Ordering
Ord, Ptr SamplerAddressMode -> IO SamplerAddressMode
Ptr SamplerAddressMode -> Int -> IO SamplerAddressMode
Ptr SamplerAddressMode -> Int -> SamplerAddressMode -> IO ()
Ptr SamplerAddressMode -> SamplerAddressMode -> IO ()
SamplerAddressMode -> Int
forall b. Ptr b -> Int -> IO SamplerAddressMode
forall b. Ptr b -> Int -> SamplerAddressMode -> 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 SamplerAddressMode -> SamplerAddressMode -> IO ()
$cpoke :: Ptr SamplerAddressMode -> SamplerAddressMode -> IO ()
peek :: Ptr SamplerAddressMode -> IO SamplerAddressMode
$cpeek :: Ptr SamplerAddressMode -> IO SamplerAddressMode
pokeByteOff :: forall b. Ptr b -> Int -> SamplerAddressMode -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SamplerAddressMode -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO SamplerAddressMode
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SamplerAddressMode
pokeElemOff :: Ptr SamplerAddressMode -> Int -> SamplerAddressMode -> IO ()
$cpokeElemOff :: Ptr SamplerAddressMode -> Int -> SamplerAddressMode -> IO ()
peekElemOff :: Ptr SamplerAddressMode -> Int -> IO SamplerAddressMode
$cpeekElemOff :: Ptr SamplerAddressMode -> Int -> IO SamplerAddressMode
alignment :: SamplerAddressMode -> Int
$calignment :: SamplerAddressMode -> Int
sizeOf :: SamplerAddressMode -> Int
$csizeOf :: SamplerAddressMode -> Int
Storable, SamplerAddressMode
forall a. a -> Zero a
zero :: SamplerAddressMode
$czero :: SamplerAddressMode
Zero)

-- | 'SAMPLER_ADDRESS_MODE_REPEAT' specifies that the repeat wrap mode will
-- be used.
pattern $bSAMPLER_ADDRESS_MODE_REPEAT :: SamplerAddressMode
$mSAMPLER_ADDRESS_MODE_REPEAT :: forall {r}. SamplerAddressMode -> ((# #) -> r) -> ((# #) -> r) -> r
SAMPLER_ADDRESS_MODE_REPEAT = SamplerAddressMode 0

-- | 'SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT' specifies that the mirrored
-- repeat wrap mode will be used.
pattern $bSAMPLER_ADDRESS_MODE_MIRRORED_REPEAT :: SamplerAddressMode
$mSAMPLER_ADDRESS_MODE_MIRRORED_REPEAT :: forall {r}. SamplerAddressMode -> ((# #) -> r) -> ((# #) -> r) -> r
SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = SamplerAddressMode 1

-- | 'SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE' specifies that the clamp to edge
-- wrap mode will be used.
pattern $bSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE :: SamplerAddressMode
$mSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE :: forall {r}. SamplerAddressMode -> ((# #) -> r) -> ((# #) -> r) -> r
SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = SamplerAddressMode 2

-- | 'SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER' specifies that the clamp to
-- border wrap mode will be used.
pattern $bSAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER :: SamplerAddressMode
$mSAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER :: forall {r}. SamplerAddressMode -> ((# #) -> r) -> ((# #) -> r) -> r
SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = SamplerAddressMode 3

-- | 'SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE' specifies that the mirror
-- clamp to edge wrap mode will be used. This is only valid if
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-samplerMirrorClampToEdge samplerMirrorClampToEdge>
-- is enabled, or if the @VK_KHR_sampler_mirror_clamp_to_edge@ extension is
-- enabled.
pattern $bSAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE :: SamplerAddressMode
$mSAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE :: forall {r}. SamplerAddressMode -> ((# #) -> r) -> ((# #) -> r) -> r
SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = SamplerAddressMode 4

{-# COMPLETE
  SAMPLER_ADDRESS_MODE_REPEAT
  , SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT
  , SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
  , SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER
  , SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE ::
    SamplerAddressMode
  #-}

conNameSamplerAddressMode :: String
conNameSamplerAddressMode :: String
conNameSamplerAddressMode = String
"SamplerAddressMode"

enumPrefixSamplerAddressMode :: String
enumPrefixSamplerAddressMode :: String
enumPrefixSamplerAddressMode = String
"SAMPLER_ADDRESS_MODE_"

showTableSamplerAddressMode :: [(SamplerAddressMode, String)]
showTableSamplerAddressMode :: [(SamplerAddressMode, String)]
showTableSamplerAddressMode =
  [ (SamplerAddressMode
SAMPLER_ADDRESS_MODE_REPEAT, String
"REPEAT")
  ,
    ( SamplerAddressMode
SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT
    , String
"MIRRORED_REPEAT"
    )
  ,
    ( SamplerAddressMode
SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
    , String
"CLAMP_TO_EDGE"
    )
  ,
    ( SamplerAddressMode
SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER
    , String
"CLAMP_TO_BORDER"
    )
  ,
    ( SamplerAddressMode
SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE
    , String
"MIRROR_CLAMP_TO_EDGE"
    )
  ]

instance Show SamplerAddressMode where
  showsPrec :: Int -> SamplerAddressMode -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixSamplerAddressMode
      [(SamplerAddressMode, String)]
showTableSamplerAddressMode
      String
conNameSamplerAddressMode
      (\(SamplerAddressMode Int32
x) -> Int32
x)
      (forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read SamplerAddressMode where
  readPrec :: ReadPrec SamplerAddressMode
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixSamplerAddressMode
      [(SamplerAddressMode, String)]
showTableSamplerAddressMode
      String
conNameSamplerAddressMode
      Int32 -> SamplerAddressMode
SamplerAddressMode