{-# language CPP #-}
module Vulkan.Core10.Enums.Filter  (Filter( FILTER_NEAREST
                                          , FILTER_LINEAR
                                          , FILTER_CUBIC_IMG
                                          , ..
                                          )) where

import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import Text.Read.Lex (Lexeme(Ident))
import Vulkan.Zero (Zero)
-- | VkFilter - Specify filters used for texture lookups
--
-- = Description
--
-- These filters are described in detail in
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#textures-texel-filtering Texel Filtering>.
--
-- = See Also
--
-- 'Vulkan.Extensions.VK_KHR_copy_commands2.BlitImageInfo2KHR',
-- '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
/= :: Filter -> Filter -> Bool
$c/= :: Filter -> Filter -> Bool
== :: Filter -> Filter -> Bool
$c== :: 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
min :: Filter -> Filter -> Filter
$cmin :: Filter -> Filter -> Filter
max :: Filter -> Filter -> Filter
$cmax :: Filter -> Filter -> Filter
>= :: Filter -> Filter -> Bool
$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
compare :: Filter -> Filter -> Ordering
$ccompare :: Filter -> Filter -> Ordering
$cp1Ord :: Eq Filter
Ord, Ptr b -> Int -> IO Filter
Ptr b -> Int -> Filter -> IO ()
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
poke :: Ptr Filter -> Filter -> IO ()
$cpoke :: Ptr Filter -> Filter -> IO ()
peek :: Ptr Filter -> IO Filter
$cpeek :: Ptr Filter -> IO Filter
pokeByteOff :: Ptr b -> Int -> Filter -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> Filter -> IO ()
peekByteOff :: Ptr b -> Int -> IO Filter
$cpeekByteOff :: forall b. Ptr b -> Int -> IO Filter
pokeElemOff :: Ptr Filter -> Int -> Filter -> IO ()
$cpokeElemOff :: Ptr Filter -> Int -> Filter -> IO ()
peekElemOff :: Ptr Filter -> Int -> IO Filter
$cpeekElemOff :: Ptr Filter -> Int -> IO Filter
alignment :: Filter -> Int
$calignment :: Filter -> Int
sizeOf :: Filter -> Int
$csizeOf :: Filter -> Int
Storable, Filter
Filter -> Zero Filter
forall a. a -> Zero a
zero :: Filter
$czero :: Filter
Zero)

-- | 'FILTER_NEAREST' specifies nearest filtering.
pattern $bFILTER_NEAREST :: Filter
$mFILTER_NEAREST :: forall r. Filter -> (Void# -> r) -> (Void# -> r) -> r
FILTER_NEAREST = Filter 0
-- | 'FILTER_LINEAR' specifies linear filtering.
pattern $bFILTER_LINEAR :: Filter
$mFILTER_LINEAR :: forall r. Filter -> (Void# -> r) -> (Void# -> r) -> r
FILTER_LINEAR = Filter 1
-- No documentation found for Nested "VkFilter" "VK_FILTER_CUBIC_IMG"
pattern $bFILTER_CUBIC_IMG :: Filter
$mFILTER_CUBIC_IMG :: forall r. Filter -> (Void# -> r) -> (Void# -> r) -> r
FILTER_CUBIC_IMG = Filter 1000015000
{-# complete FILTER_NEAREST,
             FILTER_LINEAR,
             FILTER_CUBIC_IMG :: Filter #-}

instance Show Filter where
  showsPrec :: Int -> Filter -> ShowS
showsPrec p :: Int
p = \case
    FILTER_NEAREST -> String -> ShowS
showString "FILTER_NEAREST"
    FILTER_LINEAR -> String -> ShowS
showString "FILTER_LINEAR"
    FILTER_CUBIC_IMG -> String -> ShowS
showString "FILTER_CUBIC_IMG"
    Filter x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "Filter " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11 Int32
x)

instance Read Filter where
  readPrec :: ReadPrec Filter
readPrec = ReadPrec Filter -> ReadPrec Filter
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec Filter)] -> ReadPrec Filter
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("FILTER_NEAREST", Filter -> ReadPrec Filter
forall (f :: * -> *) a. Applicative f => a -> f a
pure Filter
FILTER_NEAREST)
                            , ("FILTER_LINEAR", Filter -> ReadPrec Filter
forall (f :: * -> *) a. Applicative f => a -> f a
pure Filter
FILTER_LINEAR)
                            , ("FILTER_CUBIC_IMG", Filter -> ReadPrec Filter
forall (f :: * -> *) a. Applicative f => a -> f a
pure Filter
FILTER_CUBIC_IMG)]
                     ReadPrec Filter -> ReadPrec Filter -> ReadPrec Filter
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int -> ReadPrec Filter -> ReadPrec Filter
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "Filter")
                       Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
                       Filter -> ReadPrec Filter
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> Filter
Filter Int32
v)))