{-# 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
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_sampler_filter_minmax VK_EXT_sampler_filter_minmax>,
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_2 VK_VERSION_1_2>,
-- 'Vulkan.Core12.Promoted_From_VK_EXT_sampler_filter_minmax.SamplerReductionModeCreateInfo'
newtype SamplerReductionMode = SamplerReductionMode Int32
  deriving newtype (SamplerReductionMode -> SamplerReductionMode -> Bool
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
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
Ord, Ptr SamplerReductionMode -> IO SamplerReductionMode
Ptr SamplerReductionMode -> Int -> IO SamplerReductionMode
Ptr SamplerReductionMode -> Int -> SamplerReductionMode -> IO ()
Ptr SamplerReductionMode -> SamplerReductionMode -> IO ()
SamplerReductionMode -> Int
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 :: forall b. Ptr b -> Int -> SamplerReductionMode -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SamplerReductionMode -> IO ()
peekByteOff :: forall b. 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
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://registry.khronos.org/vulkan/specs/1.3-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 -> ((# #) -> r) -> ((# #) -> 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 -> ((# #) -> r) -> ((# #) -> 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 -> ((# #) -> r) -> ((# #) -> 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 = String
"SamplerReductionMode"

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

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

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

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