{-# 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
--
-- 'Vulkan.Core10.Sampler.SamplerCreateInfo'
newtype SamplerAddressMode = SamplerAddressMode Int32
  deriving newtype (SamplerAddressMode -> SamplerAddressMode -> Bool
(SamplerAddressMode -> SamplerAddressMode -> Bool)
-> (SamplerAddressMode -> SamplerAddressMode -> Bool)
-> Eq SamplerAddressMode
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
Eq SamplerAddressMode =>
(SamplerAddressMode -> SamplerAddressMode -> Ordering)
-> (SamplerAddressMode -> SamplerAddressMode -> Bool)
-> (SamplerAddressMode -> SamplerAddressMode -> Bool)
-> (SamplerAddressMode -> SamplerAddressMode -> Bool)
-> (SamplerAddressMode -> SamplerAddressMode -> Bool)
-> (SamplerAddressMode -> SamplerAddressMode -> SamplerAddressMode)
-> (SamplerAddressMode -> SamplerAddressMode -> SamplerAddressMode)
-> Ord 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
$cp1Ord :: Eq SamplerAddressMode
Ord, Ptr b -> Int -> IO SamplerAddressMode
Ptr b -> Int -> SamplerAddressMode -> IO ()
Ptr SamplerAddressMode -> IO SamplerAddressMode
Ptr SamplerAddressMode -> Int -> IO SamplerAddressMode
Ptr SamplerAddressMode -> Int -> SamplerAddressMode -> IO ()
Ptr SamplerAddressMode -> SamplerAddressMode -> IO ()
SamplerAddressMode -> Int
(SamplerAddressMode -> Int)
-> (SamplerAddressMode -> Int)
-> (Ptr SamplerAddressMode -> Int -> IO SamplerAddressMode)
-> (Ptr SamplerAddressMode -> Int -> SamplerAddressMode -> IO ())
-> (forall b. Ptr b -> Int -> IO SamplerAddressMode)
-> (forall b. Ptr b -> Int -> SamplerAddressMode -> IO ())
-> (Ptr SamplerAddressMode -> IO SamplerAddressMode)
-> (Ptr SamplerAddressMode -> SamplerAddressMode -> IO ())
-> Storable SamplerAddressMode
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 :: Ptr b -> Int -> SamplerAddressMode -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SamplerAddressMode -> IO ()
peekByteOff :: 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
SamplerAddressMode -> Zero 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 -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> 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://www.khronos.org/registry/vulkan/specs/1.2-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 -> (Void# -> r) -> (Void# -> 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 = "SamplerAddressMode"

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

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

instance Show SamplerAddressMode where
  showsPrec :: Int -> SamplerAddressMode -> ShowS
showsPrec = String
-> [(SamplerAddressMode, String)]
-> String
-> (SamplerAddressMode -> Int32)
-> (Int32 -> ShowS)
-> Int
-> SamplerAddressMode
-> ShowS
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 x :: Int32
x) -> Int32
x)
                            (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)

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