{-# language CPP #-}
-- No documentation found for Chapter "SamplerCreateFlagBits"
module Vulkan.Core10.Enums.SamplerCreateFlagBits  ( SamplerCreateFlags
                                                  , SamplerCreateFlagBits( SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM
                                                                         , SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT
                                                                         , SAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT
                                                                         , SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT
                                                                         , SAMPLER_CREATE_SUBSAMPLED_BIT_EXT
                                                                         , ..
                                                                         )
                                                  ) where

import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showString)
import Numeric (showHex)
import Vulkan.Zero (Zero)
import Foreign.Storable (Storable)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Vulkan.Core10.FundamentalTypes (Flags)
type SamplerCreateFlags = SamplerCreateFlagBits

-- | VkSamplerCreateFlagBits - Bitmask specifying additional parameters of
-- sampler
--
-- = Description
--
-- Note
--
-- The approximations used when
-- 'SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT' is specified
-- are implementation defined. Some implementations /may/ interpolate
-- between fragment density levels in a subsampled image. In that case,
-- this bit /may/ be used to decide whether the interpolation factors are
-- calculated per fragment or at a coarser granularity.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'SamplerCreateFlags'
newtype SamplerCreateFlagBits = SamplerCreateFlagBits Flags
  deriving newtype (SamplerCreateFlagBits -> SamplerCreateFlagBits -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SamplerCreateFlagBits -> SamplerCreateFlagBits -> Bool
$c/= :: SamplerCreateFlagBits -> SamplerCreateFlagBits -> Bool
== :: SamplerCreateFlagBits -> SamplerCreateFlagBits -> Bool
$c== :: SamplerCreateFlagBits -> SamplerCreateFlagBits -> Bool
Eq, Eq SamplerCreateFlagBits
SamplerCreateFlagBits -> SamplerCreateFlagBits -> Bool
SamplerCreateFlagBits -> SamplerCreateFlagBits -> Ordering
SamplerCreateFlagBits
-> SamplerCreateFlagBits -> SamplerCreateFlagBits
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 :: SamplerCreateFlagBits
-> SamplerCreateFlagBits -> SamplerCreateFlagBits
$cmin :: SamplerCreateFlagBits
-> SamplerCreateFlagBits -> SamplerCreateFlagBits
max :: SamplerCreateFlagBits
-> SamplerCreateFlagBits -> SamplerCreateFlagBits
$cmax :: SamplerCreateFlagBits
-> SamplerCreateFlagBits -> SamplerCreateFlagBits
>= :: SamplerCreateFlagBits -> SamplerCreateFlagBits -> Bool
$c>= :: SamplerCreateFlagBits -> SamplerCreateFlagBits -> Bool
> :: SamplerCreateFlagBits -> SamplerCreateFlagBits -> Bool
$c> :: SamplerCreateFlagBits -> SamplerCreateFlagBits -> Bool
<= :: SamplerCreateFlagBits -> SamplerCreateFlagBits -> Bool
$c<= :: SamplerCreateFlagBits -> SamplerCreateFlagBits -> Bool
< :: SamplerCreateFlagBits -> SamplerCreateFlagBits -> Bool
$c< :: SamplerCreateFlagBits -> SamplerCreateFlagBits -> Bool
compare :: SamplerCreateFlagBits -> SamplerCreateFlagBits -> Ordering
$ccompare :: SamplerCreateFlagBits -> SamplerCreateFlagBits -> Ordering
Ord, Ptr SamplerCreateFlagBits -> IO SamplerCreateFlagBits
Ptr SamplerCreateFlagBits -> Int -> IO SamplerCreateFlagBits
Ptr SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits -> IO ()
Ptr SamplerCreateFlagBits -> SamplerCreateFlagBits -> IO ()
SamplerCreateFlagBits -> Int
forall b. Ptr b -> Int -> IO SamplerCreateFlagBits
forall b. Ptr b -> Int -> SamplerCreateFlagBits -> 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 SamplerCreateFlagBits -> SamplerCreateFlagBits -> IO ()
$cpoke :: Ptr SamplerCreateFlagBits -> SamplerCreateFlagBits -> IO ()
peek :: Ptr SamplerCreateFlagBits -> IO SamplerCreateFlagBits
$cpeek :: Ptr SamplerCreateFlagBits -> IO SamplerCreateFlagBits
pokeByteOff :: forall b. Ptr b -> Int -> SamplerCreateFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SamplerCreateFlagBits -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO SamplerCreateFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SamplerCreateFlagBits
pokeElemOff :: Ptr SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits -> IO ()
$cpokeElemOff :: Ptr SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits -> IO ()
peekElemOff :: Ptr SamplerCreateFlagBits -> Int -> IO SamplerCreateFlagBits
$cpeekElemOff :: Ptr SamplerCreateFlagBits -> Int -> IO SamplerCreateFlagBits
alignment :: SamplerCreateFlagBits -> Int
$calignment :: SamplerCreateFlagBits -> Int
sizeOf :: SamplerCreateFlagBits -> Int
$csizeOf :: SamplerCreateFlagBits -> Int
Storable, SamplerCreateFlagBits
forall a. a -> Zero a
zero :: SamplerCreateFlagBits
$czero :: SamplerCreateFlagBits
Zero, Eq SamplerCreateFlagBits
SamplerCreateFlagBits
Int -> SamplerCreateFlagBits
SamplerCreateFlagBits -> Bool
SamplerCreateFlagBits -> Int
SamplerCreateFlagBits -> Maybe Int
SamplerCreateFlagBits -> SamplerCreateFlagBits
SamplerCreateFlagBits -> Int -> Bool
SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
SamplerCreateFlagBits
-> SamplerCreateFlagBits -> SamplerCreateFlagBits
forall a.
Eq a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: SamplerCreateFlagBits -> Int
$cpopCount :: SamplerCreateFlagBits -> Int
rotateR :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
$crotateR :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
rotateL :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
$crotateL :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
unsafeShiftR :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
$cunsafeShiftR :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
shiftR :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
$cshiftR :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
unsafeShiftL :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
$cunsafeShiftL :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
shiftL :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
$cshiftL :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
isSigned :: SamplerCreateFlagBits -> Bool
$cisSigned :: SamplerCreateFlagBits -> Bool
bitSize :: SamplerCreateFlagBits -> Int
$cbitSize :: SamplerCreateFlagBits -> Int
bitSizeMaybe :: SamplerCreateFlagBits -> Maybe Int
$cbitSizeMaybe :: SamplerCreateFlagBits -> Maybe Int
testBit :: SamplerCreateFlagBits -> Int -> Bool
$ctestBit :: SamplerCreateFlagBits -> Int -> Bool
complementBit :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
$ccomplementBit :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
clearBit :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
$cclearBit :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
setBit :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
$csetBit :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
bit :: Int -> SamplerCreateFlagBits
$cbit :: Int -> SamplerCreateFlagBits
zeroBits :: SamplerCreateFlagBits
$czeroBits :: SamplerCreateFlagBits
rotate :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
$crotate :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
shift :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
$cshift :: SamplerCreateFlagBits -> Int -> SamplerCreateFlagBits
complement :: SamplerCreateFlagBits -> SamplerCreateFlagBits
$ccomplement :: SamplerCreateFlagBits -> SamplerCreateFlagBits
xor :: SamplerCreateFlagBits
-> SamplerCreateFlagBits -> SamplerCreateFlagBits
$cxor :: SamplerCreateFlagBits
-> SamplerCreateFlagBits -> SamplerCreateFlagBits
.|. :: SamplerCreateFlagBits
-> SamplerCreateFlagBits -> SamplerCreateFlagBits
$c.|. :: SamplerCreateFlagBits
-> SamplerCreateFlagBits -> SamplerCreateFlagBits
.&. :: SamplerCreateFlagBits
-> SamplerCreateFlagBits -> SamplerCreateFlagBits
$c.&. :: SamplerCreateFlagBits
-> SamplerCreateFlagBits -> SamplerCreateFlagBits
Bits, Bits SamplerCreateFlagBits
SamplerCreateFlagBits -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: SamplerCreateFlagBits -> Int
$ccountTrailingZeros :: SamplerCreateFlagBits -> Int
countLeadingZeros :: SamplerCreateFlagBits -> Int
$ccountLeadingZeros :: SamplerCreateFlagBits -> Int
finiteBitSize :: SamplerCreateFlagBits -> Int
$cfiniteBitSize :: SamplerCreateFlagBits -> Int
FiniteBits)

-- | #samplers-imageprocessingsampler#
-- 'SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM' specifies that the sampler
-- will read from images using only @OpImageWeightedSampleQCOM@,
-- @OpImageBoxFilterQCOM@, @OpImageBlockMatchGatherSSDQCOM@,
-- @OpImageBlockMatchGatherSADQCOM@, @OpImageBlockMatchWindowSSDQCOM@,
-- @OpImageBlockMatchWindowSADQCOM@, @OpImageBlockMatchSSDQCOM@, or
-- @OpImageBlockMatchSADQCOM@.
pattern $bSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM :: SamplerCreateFlagBits
$mSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM :: forall {r}.
SamplerCreateFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM = SamplerCreateFlagBits 0x00000010

-- | 'SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT' specifies that
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#textures-cubemapedge cube map edge handling>
-- is not performed.
pattern $bSAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT :: SamplerCreateFlagBits
$mSAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT :: forall {r}.
SamplerCreateFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT = SamplerCreateFlagBits 0x00000004

-- | 'SAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT' specifies that
-- the sampler /can/ be used with descriptor buffers when capturing and
-- replaying (e.g. for trace capture and replay), see
-- 'Vulkan.Extensions.VK_EXT_descriptor_buffer.OpaqueCaptureDescriptorDataCreateInfoEXT'
-- for more detail.
pattern $bSAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT :: SamplerCreateFlagBits
$mSAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT :: forall {r}.
SamplerCreateFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = SamplerCreateFlagBits 0x00000008

-- | 'SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT' specifies that
-- the implementation /may/ use approximations when reconstructing a full
-- color value for texture access from a subsampled image.
pattern $bSAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT :: SamplerCreateFlagBits
$mSAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT :: forall {r}.
SamplerCreateFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT = SamplerCreateFlagBits 0x00000002

-- | #samplers-subsamplesampler# 'SAMPLER_CREATE_SUBSAMPLED_BIT_EXT'
-- specifies that the sampler will read from an image created with @flags@
-- containing
-- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT'.
pattern $bSAMPLER_CREATE_SUBSAMPLED_BIT_EXT :: SamplerCreateFlagBits
$mSAMPLER_CREATE_SUBSAMPLED_BIT_EXT :: forall {r}.
SamplerCreateFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SAMPLER_CREATE_SUBSAMPLED_BIT_EXT = SamplerCreateFlagBits 0x00000001

conNameSamplerCreateFlagBits :: String
conNameSamplerCreateFlagBits :: String
conNameSamplerCreateFlagBits = String
"SamplerCreateFlagBits"

enumPrefixSamplerCreateFlagBits :: String
enumPrefixSamplerCreateFlagBits :: String
enumPrefixSamplerCreateFlagBits = String
"SAMPLER_CREATE_"

showTableSamplerCreateFlagBits :: [(SamplerCreateFlagBits, String)]
showTableSamplerCreateFlagBits :: [(SamplerCreateFlagBits, String)]
showTableSamplerCreateFlagBits =
  [
    ( SamplerCreateFlagBits
SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM
    , String
"IMAGE_PROCESSING_BIT_QCOM"
    )
  ,
    ( SamplerCreateFlagBits
SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT
    , String
"NON_SEAMLESS_CUBE_MAP_BIT_EXT"
    )
  ,
    ( SamplerCreateFlagBits
SAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT
    , String
"DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT"
    )
  ,
    ( SamplerCreateFlagBits
SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT
    , String
"SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT"
    )
  ,
    ( SamplerCreateFlagBits
SAMPLER_CREATE_SUBSAMPLED_BIT_EXT
    , String
"SUBSAMPLED_BIT_EXT"
    )
  ]

instance Show SamplerCreateFlagBits where
  showsPrec :: Int -> SamplerCreateFlagBits -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixSamplerCreateFlagBits
      [(SamplerCreateFlagBits, String)]
showTableSamplerCreateFlagBits
      String
conNameSamplerCreateFlagBits
      (\(SamplerCreateFlagBits Flags
x) -> Flags
x)
      (\Flags
x -> String -> ShowS
showString String
"0x" forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)

instance Read SamplerCreateFlagBits where
  readPrec :: ReadPrec SamplerCreateFlagBits
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixSamplerCreateFlagBits
      [(SamplerCreateFlagBits, String)]
showTableSamplerCreateFlagBits
      String
conNameSamplerCreateFlagBits
      Flags -> SamplerCreateFlagBits
SamplerCreateFlagBits