{-# language CPP #-}
-- No documentation found for Chapter "SampleCountFlagBits"
module Vulkan.Core10.Enums.SampleCountFlagBits  ( SampleCountFlags
                                                , SampleCountFlagBits( SAMPLE_COUNT_1_BIT
                                                                     , SAMPLE_COUNT_2_BIT
                                                                     , SAMPLE_COUNT_4_BIT
                                                                     , SAMPLE_COUNT_8_BIT
                                                                     , SAMPLE_COUNT_16_BIT
                                                                     , SAMPLE_COUNT_32_BIT
                                                                     , SAMPLE_COUNT_64_BIT
                                                                     , ..
                                                                     )
                                                ) where

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

-- | VkSampleCountFlagBits - Bitmask specifying sample counts supported for
-- an image used for storage operations
--
-- = See Also
--
-- 'Vulkan.Core10.Pass.AttachmentDescription',
-- 'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.AttachmentDescription2',
-- 'Vulkan.Extensions.VK_NV_coverage_reduction_mode.FramebufferMixedSamplesCombinationNV',
-- 'Vulkan.Core10.Image.ImageCreateInfo',
-- 'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.PhysicalDeviceFragmentShadingRateEnumsPropertiesNV',
-- 'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PhysicalDeviceFragmentShadingRatePropertiesKHR',
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceSparseImageFormatInfo2',
-- 'Vulkan.Core10.Pipeline.PipelineMultisampleStateCreateInfo',
-- 'SampleCountFlags',
-- 'Vulkan.Extensions.VK_EXT_sample_locations.SampleLocationsInfoEXT',
-- 'Vulkan.Extensions.VK_EXT_sample_locations.getPhysicalDeviceMultisamplePropertiesEXT',
-- 'Vulkan.Core10.SparseResourceMemoryManagement.getPhysicalDeviceSparseImageFormatProperties'
newtype SampleCountFlagBits = SampleCountFlagBits Flags
  deriving newtype (SampleCountFlagBits -> SampleCountFlagBits -> Bool
(SampleCountFlagBits -> SampleCountFlagBits -> Bool)
-> (SampleCountFlagBits -> SampleCountFlagBits -> Bool)
-> Eq SampleCountFlagBits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
$c/= :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
== :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
$c== :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
Eq, Eq SampleCountFlagBits
Eq SampleCountFlagBits =>
(SampleCountFlagBits -> SampleCountFlagBits -> Ordering)
-> (SampleCountFlagBits -> SampleCountFlagBits -> Bool)
-> (SampleCountFlagBits -> SampleCountFlagBits -> Bool)
-> (SampleCountFlagBits -> SampleCountFlagBits -> Bool)
-> (SampleCountFlagBits -> SampleCountFlagBits -> Bool)
-> (SampleCountFlagBits
    -> SampleCountFlagBits -> SampleCountFlagBits)
-> (SampleCountFlagBits
    -> SampleCountFlagBits -> SampleCountFlagBits)
-> Ord SampleCountFlagBits
SampleCountFlagBits -> SampleCountFlagBits -> Bool
SampleCountFlagBits -> SampleCountFlagBits -> Ordering
SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
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 :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
$cmin :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
max :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
$cmax :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
>= :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
$c>= :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
> :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
$c> :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
<= :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
$c<= :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
< :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
$c< :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
compare :: SampleCountFlagBits -> SampleCountFlagBits -> Ordering
$ccompare :: SampleCountFlagBits -> SampleCountFlagBits -> Ordering
$cp1Ord :: Eq SampleCountFlagBits
Ord, Ptr b -> Int -> IO SampleCountFlagBits
Ptr b -> Int -> SampleCountFlagBits -> IO ()
Ptr SampleCountFlagBits -> IO SampleCountFlagBits
Ptr SampleCountFlagBits -> Int -> IO SampleCountFlagBits
Ptr SampleCountFlagBits -> Int -> SampleCountFlagBits -> IO ()
Ptr SampleCountFlagBits -> SampleCountFlagBits -> IO ()
SampleCountFlagBits -> Int
(SampleCountFlagBits -> Int)
-> (SampleCountFlagBits -> Int)
-> (Ptr SampleCountFlagBits -> Int -> IO SampleCountFlagBits)
-> (Ptr SampleCountFlagBits -> Int -> SampleCountFlagBits -> IO ())
-> (forall b. Ptr b -> Int -> IO SampleCountFlagBits)
-> (forall b. Ptr b -> Int -> SampleCountFlagBits -> IO ())
-> (Ptr SampleCountFlagBits -> IO SampleCountFlagBits)
-> (Ptr SampleCountFlagBits -> SampleCountFlagBits -> IO ())
-> Storable SampleCountFlagBits
forall b. Ptr b -> Int -> IO SampleCountFlagBits
forall b. Ptr b -> Int -> SampleCountFlagBits -> 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 SampleCountFlagBits -> SampleCountFlagBits -> IO ()
$cpoke :: Ptr SampleCountFlagBits -> SampleCountFlagBits -> IO ()
peek :: Ptr SampleCountFlagBits -> IO SampleCountFlagBits
$cpeek :: Ptr SampleCountFlagBits -> IO SampleCountFlagBits
pokeByteOff :: Ptr b -> Int -> SampleCountFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SampleCountFlagBits -> IO ()
peekByteOff :: Ptr b -> Int -> IO SampleCountFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SampleCountFlagBits
pokeElemOff :: Ptr SampleCountFlagBits -> Int -> SampleCountFlagBits -> IO ()
$cpokeElemOff :: Ptr SampleCountFlagBits -> Int -> SampleCountFlagBits -> IO ()
peekElemOff :: Ptr SampleCountFlagBits -> Int -> IO SampleCountFlagBits
$cpeekElemOff :: Ptr SampleCountFlagBits -> Int -> IO SampleCountFlagBits
alignment :: SampleCountFlagBits -> Int
$calignment :: SampleCountFlagBits -> Int
sizeOf :: SampleCountFlagBits -> Int
$csizeOf :: SampleCountFlagBits -> Int
Storable, SampleCountFlagBits
SampleCountFlagBits -> Zero SampleCountFlagBits
forall a. a -> Zero a
zero :: SampleCountFlagBits
$czero :: SampleCountFlagBits
Zero, Eq SampleCountFlagBits
SampleCountFlagBits
Eq SampleCountFlagBits =>
(SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits)
-> (SampleCountFlagBits
    -> SampleCountFlagBits -> SampleCountFlagBits)
-> (SampleCountFlagBits
    -> SampleCountFlagBits -> SampleCountFlagBits)
-> (SampleCountFlagBits -> SampleCountFlagBits)
-> (SampleCountFlagBits -> Int -> SampleCountFlagBits)
-> (SampleCountFlagBits -> Int -> SampleCountFlagBits)
-> SampleCountFlagBits
-> (Int -> SampleCountFlagBits)
-> (SampleCountFlagBits -> Int -> SampleCountFlagBits)
-> (SampleCountFlagBits -> Int -> SampleCountFlagBits)
-> (SampleCountFlagBits -> Int -> SampleCountFlagBits)
-> (SampleCountFlagBits -> Int -> Bool)
-> (SampleCountFlagBits -> Maybe Int)
-> (SampleCountFlagBits -> Int)
-> (SampleCountFlagBits -> Bool)
-> (SampleCountFlagBits -> Int -> SampleCountFlagBits)
-> (SampleCountFlagBits -> Int -> SampleCountFlagBits)
-> (SampleCountFlagBits -> Int -> SampleCountFlagBits)
-> (SampleCountFlagBits -> Int -> SampleCountFlagBits)
-> (SampleCountFlagBits -> Int -> SampleCountFlagBits)
-> (SampleCountFlagBits -> Int -> SampleCountFlagBits)
-> (SampleCountFlagBits -> Int)
-> Bits SampleCountFlagBits
Int -> SampleCountFlagBits
SampleCountFlagBits -> Bool
SampleCountFlagBits -> Int
SampleCountFlagBits -> Maybe Int
SampleCountFlagBits -> SampleCountFlagBits
SampleCountFlagBits -> Int -> Bool
SampleCountFlagBits -> Int -> SampleCountFlagBits
SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
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 :: SampleCountFlagBits -> Int
$cpopCount :: SampleCountFlagBits -> Int
rotateR :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$crotateR :: SampleCountFlagBits -> Int -> SampleCountFlagBits
rotateL :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$crotateL :: SampleCountFlagBits -> Int -> SampleCountFlagBits
unsafeShiftR :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$cunsafeShiftR :: SampleCountFlagBits -> Int -> SampleCountFlagBits
shiftR :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$cshiftR :: SampleCountFlagBits -> Int -> SampleCountFlagBits
unsafeShiftL :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$cunsafeShiftL :: SampleCountFlagBits -> Int -> SampleCountFlagBits
shiftL :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$cshiftL :: SampleCountFlagBits -> Int -> SampleCountFlagBits
isSigned :: SampleCountFlagBits -> Bool
$cisSigned :: SampleCountFlagBits -> Bool
bitSize :: SampleCountFlagBits -> Int
$cbitSize :: SampleCountFlagBits -> Int
bitSizeMaybe :: SampleCountFlagBits -> Maybe Int
$cbitSizeMaybe :: SampleCountFlagBits -> Maybe Int
testBit :: SampleCountFlagBits -> Int -> Bool
$ctestBit :: SampleCountFlagBits -> Int -> Bool
complementBit :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$ccomplementBit :: SampleCountFlagBits -> Int -> SampleCountFlagBits
clearBit :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$cclearBit :: SampleCountFlagBits -> Int -> SampleCountFlagBits
setBit :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$csetBit :: SampleCountFlagBits -> Int -> SampleCountFlagBits
bit :: Int -> SampleCountFlagBits
$cbit :: Int -> SampleCountFlagBits
zeroBits :: SampleCountFlagBits
$czeroBits :: SampleCountFlagBits
rotate :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$crotate :: SampleCountFlagBits -> Int -> SampleCountFlagBits
shift :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$cshift :: SampleCountFlagBits -> Int -> SampleCountFlagBits
complement :: SampleCountFlagBits -> SampleCountFlagBits
$ccomplement :: SampleCountFlagBits -> SampleCountFlagBits
xor :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
$cxor :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
.|. :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
$c.|. :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
.&. :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
$c.&. :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
$cp1Bits :: Eq SampleCountFlagBits
Bits, Bits SampleCountFlagBits
Bits SampleCountFlagBits =>
(SampleCountFlagBits -> Int)
-> (SampleCountFlagBits -> Int)
-> (SampleCountFlagBits -> Int)
-> FiniteBits SampleCountFlagBits
SampleCountFlagBits -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: SampleCountFlagBits -> Int
$ccountTrailingZeros :: SampleCountFlagBits -> Int
countLeadingZeros :: SampleCountFlagBits -> Int
$ccountLeadingZeros :: SampleCountFlagBits -> Int
finiteBitSize :: SampleCountFlagBits -> Int
$cfiniteBitSize :: SampleCountFlagBits -> Int
$cp1FiniteBits :: Bits SampleCountFlagBits
FiniteBits)

-- | 'SAMPLE_COUNT_1_BIT' specifies an image with one sample per pixel.
pattern $bSAMPLE_COUNT_1_BIT :: SampleCountFlagBits
$mSAMPLE_COUNT_1_BIT :: forall r. SampleCountFlagBits -> (Void# -> r) -> (Void# -> r) -> r
SAMPLE_COUNT_1_BIT  = SampleCountFlagBits 0x00000001
-- | 'SAMPLE_COUNT_2_BIT' specifies an image with 2 samples per pixel.
pattern $bSAMPLE_COUNT_2_BIT :: SampleCountFlagBits
$mSAMPLE_COUNT_2_BIT :: forall r. SampleCountFlagBits -> (Void# -> r) -> (Void# -> r) -> r
SAMPLE_COUNT_2_BIT  = SampleCountFlagBits 0x00000002
-- | 'SAMPLE_COUNT_4_BIT' specifies an image with 4 samples per pixel.
pattern $bSAMPLE_COUNT_4_BIT :: SampleCountFlagBits
$mSAMPLE_COUNT_4_BIT :: forall r. SampleCountFlagBits -> (Void# -> r) -> (Void# -> r) -> r
SAMPLE_COUNT_4_BIT  = SampleCountFlagBits 0x00000004
-- | 'SAMPLE_COUNT_8_BIT' specifies an image with 8 samples per pixel.
pattern $bSAMPLE_COUNT_8_BIT :: SampleCountFlagBits
$mSAMPLE_COUNT_8_BIT :: forall r. SampleCountFlagBits -> (Void# -> r) -> (Void# -> r) -> r
SAMPLE_COUNT_8_BIT  = SampleCountFlagBits 0x00000008
-- | 'SAMPLE_COUNT_16_BIT' specifies an image with 16 samples per pixel.
pattern $bSAMPLE_COUNT_16_BIT :: SampleCountFlagBits
$mSAMPLE_COUNT_16_BIT :: forall r. SampleCountFlagBits -> (Void# -> r) -> (Void# -> r) -> r
SAMPLE_COUNT_16_BIT = SampleCountFlagBits 0x00000010
-- | 'SAMPLE_COUNT_32_BIT' specifies an image with 32 samples per pixel.
pattern $bSAMPLE_COUNT_32_BIT :: SampleCountFlagBits
$mSAMPLE_COUNT_32_BIT :: forall r. SampleCountFlagBits -> (Void# -> r) -> (Void# -> r) -> r
SAMPLE_COUNT_32_BIT = SampleCountFlagBits 0x00000020
-- | 'SAMPLE_COUNT_64_BIT' specifies an image with 64 samples per pixel.
pattern $bSAMPLE_COUNT_64_BIT :: SampleCountFlagBits
$mSAMPLE_COUNT_64_BIT :: forall r. SampleCountFlagBits -> (Void# -> r) -> (Void# -> r) -> r
SAMPLE_COUNT_64_BIT = SampleCountFlagBits 0x00000040

conNameSampleCountFlagBits :: String
conNameSampleCountFlagBits :: String
conNameSampleCountFlagBits = "SampleCountFlagBits"

enumPrefixSampleCountFlagBits :: String
enumPrefixSampleCountFlagBits :: String
enumPrefixSampleCountFlagBits = "SAMPLE_COUNT_"

showTableSampleCountFlagBits :: [(SampleCountFlagBits, String)]
showTableSampleCountFlagBits :: [(SampleCountFlagBits, String)]
showTableSampleCountFlagBits =
  [ (SampleCountFlagBits
SAMPLE_COUNT_1_BIT , "1_BIT")
  , (SampleCountFlagBits
SAMPLE_COUNT_2_BIT , "2_BIT")
  , (SampleCountFlagBits
SAMPLE_COUNT_4_BIT , "4_BIT")
  , (SampleCountFlagBits
SAMPLE_COUNT_8_BIT , "8_BIT")
  , (SampleCountFlagBits
SAMPLE_COUNT_16_BIT, "16_BIT")
  , (SampleCountFlagBits
SAMPLE_COUNT_32_BIT, "32_BIT")
  , (SampleCountFlagBits
SAMPLE_COUNT_64_BIT, "64_BIT")
  ]

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

instance Read SampleCountFlagBits where
  readPrec :: ReadPrec SampleCountFlagBits
readPrec = String
-> [(SampleCountFlagBits, String)]
-> String
-> (Flags -> SampleCountFlagBits)
-> ReadPrec SampleCountFlagBits
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixSampleCountFlagBits
                          [(SampleCountFlagBits, String)]
showTableSampleCountFlagBits
                          String
conNameSampleCountFlagBits
                          Flags -> SampleCountFlagBits
SampleCountFlagBits