{-# language CPP #-}
-- No documentation found for Chapter "SamplerReductionMode"
module Vulkan.Core12.Enums.SamplerReductionMode  (SamplerReductionMode( SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE
                                                                      , SAMPLER_REDUCTION_MODE_MIN
                                                                      , SAMPLER_REDUCTION_MODE_MAX
                                                                      , ..
                                                                      )) 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))

-- | VkSamplerReductionMode - Specify reduction mode for texture filtering
--
-- = See Also
--
-- 'Vulkan.Core12.Promoted_From_VK_EXT_sampler_filter_minmax.SamplerReductionModeCreateInfo'
newtype SamplerReductionMode = SamplerReductionMode Int32
  deriving newtype (SamplerReductionMode -> SamplerReductionMode -> Bool
(SamplerReductionMode -> SamplerReductionMode -> Bool)
-> (SamplerReductionMode -> SamplerReductionMode -> Bool)
-> Eq SamplerReductionMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SamplerReductionMode -> SamplerReductionMode -> Bool
$c/= :: SamplerReductionMode -> SamplerReductionMode -> Bool
== :: SamplerReductionMode -> SamplerReductionMode -> Bool
$c== :: SamplerReductionMode -> SamplerReductionMode -> Bool
Eq, Eq SamplerReductionMode
Eq SamplerReductionMode =>
(SamplerReductionMode -> SamplerReductionMode -> Ordering)
-> (SamplerReductionMode -> SamplerReductionMode -> Bool)
-> (SamplerReductionMode -> SamplerReductionMode -> Bool)
-> (SamplerReductionMode -> SamplerReductionMode -> Bool)
-> (SamplerReductionMode -> SamplerReductionMode -> Bool)
-> (SamplerReductionMode
    -> SamplerReductionMode -> SamplerReductionMode)
-> (SamplerReductionMode
    -> SamplerReductionMode -> SamplerReductionMode)
-> Ord SamplerReductionMode
SamplerReductionMode -> SamplerReductionMode -> Bool
SamplerReductionMode -> SamplerReductionMode -> Ordering
SamplerReductionMode
-> SamplerReductionMode -> SamplerReductionMode
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 :: SamplerReductionMode
-> SamplerReductionMode -> SamplerReductionMode
$cmin :: SamplerReductionMode
-> SamplerReductionMode -> SamplerReductionMode
max :: SamplerReductionMode
-> SamplerReductionMode -> SamplerReductionMode
$cmax :: SamplerReductionMode
-> SamplerReductionMode -> SamplerReductionMode
>= :: SamplerReductionMode -> SamplerReductionMode -> Bool
$c>= :: SamplerReductionMode -> SamplerReductionMode -> Bool
> :: SamplerReductionMode -> SamplerReductionMode -> Bool
$c> :: SamplerReductionMode -> SamplerReductionMode -> Bool
<= :: SamplerReductionMode -> SamplerReductionMode -> Bool
$c<= :: SamplerReductionMode -> SamplerReductionMode -> Bool
< :: SamplerReductionMode -> SamplerReductionMode -> Bool
$c< :: SamplerReductionMode -> SamplerReductionMode -> Bool
compare :: SamplerReductionMode -> SamplerReductionMode -> Ordering
$ccompare :: SamplerReductionMode -> SamplerReductionMode -> Ordering
$cp1Ord :: Eq SamplerReductionMode
Ord, Ptr b -> Int -> IO SamplerReductionMode
Ptr b -> Int -> SamplerReductionMode -> IO ()
Ptr SamplerReductionMode -> IO SamplerReductionMode
Ptr SamplerReductionMode -> Int -> IO SamplerReductionMode
Ptr SamplerReductionMode -> Int -> SamplerReductionMode -> IO ()
Ptr SamplerReductionMode -> SamplerReductionMode -> IO ()
SamplerReductionMode -> Int
(SamplerReductionMode -> Int)
-> (SamplerReductionMode -> Int)
-> (Ptr SamplerReductionMode -> Int -> IO SamplerReductionMode)
-> (Ptr SamplerReductionMode
    -> Int -> SamplerReductionMode -> IO ())
-> (forall b. Ptr b -> Int -> IO SamplerReductionMode)
-> (forall b. Ptr b -> Int -> SamplerReductionMode -> IO ())
-> (Ptr SamplerReductionMode -> IO SamplerReductionMode)
-> (Ptr SamplerReductionMode -> SamplerReductionMode -> IO ())
-> Storable SamplerReductionMode
forall b. Ptr b -> Int -> IO SamplerReductionMode
forall b. Ptr b -> Int -> SamplerReductionMode -> 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 SamplerReductionMode -> SamplerReductionMode -> IO ()
$cpoke :: Ptr SamplerReductionMode -> SamplerReductionMode -> IO ()
peek :: Ptr SamplerReductionMode -> IO SamplerReductionMode
$cpeek :: Ptr SamplerReductionMode -> IO SamplerReductionMode
pokeByteOff :: Ptr b -> Int -> SamplerReductionMode -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SamplerReductionMode -> IO ()
peekByteOff :: Ptr b -> Int -> IO SamplerReductionMode
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SamplerReductionMode
pokeElemOff :: Ptr SamplerReductionMode -> Int -> SamplerReductionMode -> IO ()
$cpokeElemOff :: Ptr SamplerReductionMode -> Int -> SamplerReductionMode -> IO ()
peekElemOff :: Ptr SamplerReductionMode -> Int -> IO SamplerReductionMode
$cpeekElemOff :: Ptr SamplerReductionMode -> Int -> IO SamplerReductionMode
alignment :: SamplerReductionMode -> Int
$calignment :: SamplerReductionMode -> Int
sizeOf :: SamplerReductionMode -> Int
$csizeOf :: SamplerReductionMode -> Int
Storable, SamplerReductionMode
SamplerReductionMode -> Zero SamplerReductionMode
forall a. a -> Zero a
zero :: SamplerReductionMode
$czero :: SamplerReductionMode
Zero)

-- | 'SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE' specifies that texel values
-- are combined by computing a weighted average of values in the footprint,
-- using weights as specified in
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#textures-unnormalized-to-integer the image operations chapter>.
pattern $bSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE :: SamplerReductionMode
$mSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE :: forall r. SamplerReductionMode -> (Void# -> r) -> (Void# -> r) -> r
SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE = SamplerReductionMode 0
-- | 'SAMPLER_REDUCTION_MODE_MIN' specifies that texel values are combined by
-- taking the component-wise minimum of values in the footprint with
-- non-zero weights.
pattern $bSAMPLER_REDUCTION_MODE_MIN :: SamplerReductionMode
$mSAMPLER_REDUCTION_MODE_MIN :: forall r. SamplerReductionMode -> (Void# -> r) -> (Void# -> r) -> r
SAMPLER_REDUCTION_MODE_MIN              = SamplerReductionMode 1
-- | 'SAMPLER_REDUCTION_MODE_MAX' specifies that texel values are combined by
-- taking the component-wise maximum of values in the footprint with
-- non-zero weights.
pattern $bSAMPLER_REDUCTION_MODE_MAX :: SamplerReductionMode
$mSAMPLER_REDUCTION_MODE_MAX :: forall r. SamplerReductionMode -> (Void# -> r) -> (Void# -> r) -> r
SAMPLER_REDUCTION_MODE_MAX              = SamplerReductionMode 2
{-# complete SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE,
             SAMPLER_REDUCTION_MODE_MIN,
             SAMPLER_REDUCTION_MODE_MAX :: SamplerReductionMode #-}

conNameSamplerReductionMode :: String
conNameSamplerReductionMode :: String
conNameSamplerReductionMode = "SamplerReductionMode"

enumPrefixSamplerReductionMode :: String
enumPrefixSamplerReductionMode :: String
enumPrefixSamplerReductionMode = "SAMPLER_REDUCTION_MODE_"

showTableSamplerReductionMode :: [(SamplerReductionMode, String)]
showTableSamplerReductionMode :: [(SamplerReductionMode, String)]
showTableSamplerReductionMode =
  [ (SamplerReductionMode
SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, "WEIGHTED_AVERAGE")
  , (SamplerReductionMode
SAMPLER_REDUCTION_MODE_MIN             , "MIN")
  , (SamplerReductionMode
SAMPLER_REDUCTION_MODE_MAX             , "MAX")
  ]

instance Show SamplerReductionMode where
  showsPrec :: Int -> SamplerReductionMode -> ShowS
showsPrec = String
-> [(SamplerReductionMode, String)]
-> String
-> (SamplerReductionMode -> Int32)
-> (Int32 -> ShowS)
-> Int
-> SamplerReductionMode
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixSamplerReductionMode
                            [(SamplerReductionMode, String)]
showTableSamplerReductionMode
                            String
conNameSamplerReductionMode
                            (\(SamplerReductionMode x :: Int32
x) -> Int32
x)
                            (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)

instance Read SamplerReductionMode where
  readPrec :: ReadPrec SamplerReductionMode
readPrec = String
-> [(SamplerReductionMode, String)]
-> String
-> (Int32 -> SamplerReductionMode)
-> ReadPrec SamplerReductionMode
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixSamplerReductionMode
                          [(SamplerReductionMode, String)]
showTableSamplerReductionMode
                          String
conNameSamplerReductionMode
                          Int32 -> SamplerReductionMode
SamplerReductionMode