{-# language CPP #-}
-- No documentation found for Chapter "Filter"
module Vulkan.Core10.Enums.Filter  (Filter( FILTER_NEAREST
                                          , FILTER_LINEAR
                                          , FILTER_CUBIC_EXT
                                          , ..
                                          )) 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))

-- | VkFilter - Specify filters used for texture lookups
--
-- = Description
--
-- These filters are described in detail in
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#textures-texel-filtering Texel Filtering>.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core13.Promoted_From_VK_KHR_copy_commands2.BlitImageInfo2',
-- 'Vulkan.Core10.Sampler.SamplerCreateInfo',
-- 'Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionCreateInfo',
-- 'Vulkan.Core10.CommandBufferBuilding.cmdBlitImage'
newtype Filter = Filter Int32
  deriving newtype (Filter -> Filter -> Bool
(Filter -> Filter -> Bool)
-> (Filter -> Filter -> Bool) -> Eq Filter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Filter -> Filter -> Bool
== :: Filter -> Filter -> Bool
$c/= :: Filter -> Filter -> Bool
/= :: Filter -> Filter -> Bool
Eq, Eq Filter
Eq Filter =>
(Filter -> Filter -> Ordering)
-> (Filter -> Filter -> Bool)
-> (Filter -> Filter -> Bool)
-> (Filter -> Filter -> Bool)
-> (Filter -> Filter -> Bool)
-> (Filter -> Filter -> Filter)
-> (Filter -> Filter -> Filter)
-> Ord Filter
Filter -> Filter -> Bool
Filter -> Filter -> Ordering
Filter -> Filter -> Filter
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
$ccompare :: Filter -> Filter -> Ordering
compare :: Filter -> Filter -> Ordering
$c< :: Filter -> Filter -> Bool
< :: Filter -> Filter -> Bool
$c<= :: Filter -> Filter -> Bool
<= :: Filter -> Filter -> Bool
$c> :: Filter -> Filter -> Bool
> :: Filter -> Filter -> Bool
$c>= :: Filter -> Filter -> Bool
>= :: Filter -> Filter -> Bool
$cmax :: Filter -> Filter -> Filter
max :: Filter -> Filter -> Filter
$cmin :: Filter -> Filter -> Filter
min :: Filter -> Filter -> Filter
Ord, Ptr Filter -> IO Filter
Ptr Filter -> Int -> IO Filter
Ptr Filter -> Int -> Filter -> IO ()
Ptr Filter -> Filter -> IO ()
Filter -> Int
(Filter -> Int)
-> (Filter -> Int)
-> (Ptr Filter -> Int -> IO Filter)
-> (Ptr Filter -> Int -> Filter -> IO ())
-> (forall b. Ptr b -> Int -> IO Filter)
-> (forall b. Ptr b -> Int -> Filter -> IO ())
-> (Ptr Filter -> IO Filter)
-> (Ptr Filter -> Filter -> IO ())
-> Storable Filter
forall b. Ptr b -> Int -> IO Filter
forall b. Ptr b -> Int -> Filter -> 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
$csizeOf :: Filter -> Int
sizeOf :: Filter -> Int
$calignment :: Filter -> Int
alignment :: Filter -> Int
$cpeekElemOff :: Ptr Filter -> Int -> IO Filter
peekElemOff :: Ptr Filter -> Int -> IO Filter
$cpokeElemOff :: Ptr Filter -> Int -> Filter -> IO ()
pokeElemOff :: Ptr Filter -> Int -> Filter -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO Filter
peekByteOff :: forall b. Ptr b -> Int -> IO Filter
$cpokeByteOff :: forall b. Ptr b -> Int -> Filter -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> Filter -> IO ()
$cpeek :: Ptr Filter -> IO Filter
peek :: Ptr Filter -> IO Filter
$cpoke :: Ptr Filter -> Filter -> IO ()
poke :: Ptr Filter -> Filter -> IO ()
Storable, Filter
Filter -> Zero Filter
forall a. a -> Zero a
$czero :: Filter
zero :: Filter
Zero)

-- | 'FILTER_NEAREST' specifies nearest filtering.
pattern $mFILTER_NEAREST :: forall {r}. Filter -> ((# #) -> r) -> ((# #) -> r) -> r
$bFILTER_NEAREST :: Filter
FILTER_NEAREST = Filter 0

-- | 'FILTER_LINEAR' specifies linear filtering.
pattern $mFILTER_LINEAR :: forall {r}. Filter -> ((# #) -> r) -> ((# #) -> r) -> r
$bFILTER_LINEAR :: Filter
FILTER_LINEAR = Filter 1

-- | 'FILTER_CUBIC_EXT' specifies cubic filtering.
pattern $mFILTER_CUBIC_EXT :: forall {r}. Filter -> ((# #) -> r) -> ((# #) -> r) -> r
$bFILTER_CUBIC_EXT :: Filter
FILTER_CUBIC_EXT = Filter 1000015000

{-# COMPLETE
  FILTER_NEAREST
  , FILTER_LINEAR
  , FILTER_CUBIC_EXT ::
    Filter
  #-}

conNameFilter :: String
conNameFilter :: String
conNameFilter = String
"Filter"

enumPrefixFilter :: String
enumPrefixFilter :: String
enumPrefixFilter = String
"FILTER_"

showTableFilter :: [(Filter, String)]
showTableFilter :: [(Filter, String)]
showTableFilter =
  [ (Filter
FILTER_NEAREST, String
"NEAREST")
  , (Filter
FILTER_LINEAR, String
"LINEAR")
  , (Filter
FILTER_CUBIC_EXT, String
"CUBIC_EXT")
  ]

instance Show Filter where
  showsPrec :: Int -> Filter -> ShowS
showsPrec =
    String
-> [(Filter, String)]
-> String
-> (Filter -> Int32)
-> (Int32 -> ShowS)
-> Int
-> Filter
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixFilter
      [(Filter, String)]
showTableFilter
      String
conNameFilter
      (\(Filter Int32
x) -> Int32
x)
      (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read Filter where
  readPrec :: ReadPrec Filter
readPrec =
    String
-> [(Filter, String)]
-> String
-> (Int32 -> Filter)
-> ReadPrec Filter
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixFilter
      [(Filter, String)]
showTableFilter
      String
conNameFilter
      Int32 -> Filter
Filter