{-# language CPP #-}
-- No documentation found for Chapter "ResolveModeFlagBits"
module Vulkan.Core12.Enums.ResolveModeFlagBits  ( ResolveModeFlags
                                                , ResolveModeFlagBits( RESOLVE_MODE_NONE
                                                                     , RESOLVE_MODE_SAMPLE_ZERO_BIT
                                                                     , RESOLVE_MODE_AVERAGE_BIT
                                                                     , RESOLVE_MODE_MIN_BIT
                                                                     , RESOLVE_MODE_MAX_BIT
                                                                     , RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID
                                                                     , ..
                                                                     )
                                                ) 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 ResolveModeFlags = ResolveModeFlagBits

-- | VkResolveModeFlagBits - Bitmask indicating supported depth and stencil
-- resolve modes
--
-- = Description
--
-- If no resolve mode is otherwise specified, 'RESOLVE_MODE_AVERAGE_BIT' is
-- used.
--
-- Note
--
-- No range compression or Y′CBCR model conversion is performed by
-- 'RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID'; applications have to
-- do these conversions themselves. Value outputs are expected to match
-- those that would be read through a
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#textures-sampler-YCbCr-conversion-modelconversion Y′CBCR sampler using >.
-- The color space that the values should be in is defined by the platform
-- and is not exposed via Vulkan.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_depth_stencil_resolve VK_KHR_depth_stencil_resolve>,
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_2 VK_VERSION_1_2>,
-- 'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.RenderingAttachmentInfo',
-- 'ResolveModeFlags',
-- 'Vulkan.Core12.Promoted_From_VK_KHR_depth_stencil_resolve.SubpassDescriptionDepthStencilResolve'
newtype ResolveModeFlagBits = ResolveModeFlagBits Flags
  deriving newtype (ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
$c/= :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
== :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
$c== :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
Eq, Eq ResolveModeFlagBits
ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
ResolveModeFlagBits -> ResolveModeFlagBits -> Ordering
ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
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 :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
$cmin :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
max :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
$cmax :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
>= :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
$c>= :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
> :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
$c> :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
<= :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
$c<= :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
< :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
$c< :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
compare :: ResolveModeFlagBits -> ResolveModeFlagBits -> Ordering
$ccompare :: ResolveModeFlagBits -> ResolveModeFlagBits -> Ordering
Ord, Ptr ResolveModeFlagBits -> IO ResolveModeFlagBits
Ptr ResolveModeFlagBits -> Int -> IO ResolveModeFlagBits
Ptr ResolveModeFlagBits -> Int -> ResolveModeFlagBits -> IO ()
Ptr ResolveModeFlagBits -> ResolveModeFlagBits -> IO ()
ResolveModeFlagBits -> Int
forall b. Ptr b -> Int -> IO ResolveModeFlagBits
forall b. Ptr b -> Int -> ResolveModeFlagBits -> 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 ResolveModeFlagBits -> ResolveModeFlagBits -> IO ()
$cpoke :: Ptr ResolveModeFlagBits -> ResolveModeFlagBits -> IO ()
peek :: Ptr ResolveModeFlagBits -> IO ResolveModeFlagBits
$cpeek :: Ptr ResolveModeFlagBits -> IO ResolveModeFlagBits
pokeByteOff :: forall b. Ptr b -> Int -> ResolveModeFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ResolveModeFlagBits -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO ResolveModeFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ResolveModeFlagBits
pokeElemOff :: Ptr ResolveModeFlagBits -> Int -> ResolveModeFlagBits -> IO ()
$cpokeElemOff :: Ptr ResolveModeFlagBits -> Int -> ResolveModeFlagBits -> IO ()
peekElemOff :: Ptr ResolveModeFlagBits -> Int -> IO ResolveModeFlagBits
$cpeekElemOff :: Ptr ResolveModeFlagBits -> Int -> IO ResolveModeFlagBits
alignment :: ResolveModeFlagBits -> Int
$calignment :: ResolveModeFlagBits -> Int
sizeOf :: ResolveModeFlagBits -> Int
$csizeOf :: ResolveModeFlagBits -> Int
Storable, ResolveModeFlagBits
forall a. a -> Zero a
zero :: ResolveModeFlagBits
$czero :: ResolveModeFlagBits
Zero, Eq ResolveModeFlagBits
ResolveModeFlagBits
Int -> ResolveModeFlagBits
ResolveModeFlagBits -> Bool
ResolveModeFlagBits -> Int
ResolveModeFlagBits -> Maybe Int
ResolveModeFlagBits -> ResolveModeFlagBits
ResolveModeFlagBits -> Int -> Bool
ResolveModeFlagBits -> Int -> ResolveModeFlagBits
ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
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 :: ResolveModeFlagBits -> Int
$cpopCount :: ResolveModeFlagBits -> Int
rotateR :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$crotateR :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
rotateL :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$crotateL :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
unsafeShiftR :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$cunsafeShiftR :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
shiftR :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$cshiftR :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
unsafeShiftL :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$cunsafeShiftL :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
shiftL :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$cshiftL :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
isSigned :: ResolveModeFlagBits -> Bool
$cisSigned :: ResolveModeFlagBits -> Bool
bitSize :: ResolveModeFlagBits -> Int
$cbitSize :: ResolveModeFlagBits -> Int
bitSizeMaybe :: ResolveModeFlagBits -> Maybe Int
$cbitSizeMaybe :: ResolveModeFlagBits -> Maybe Int
testBit :: ResolveModeFlagBits -> Int -> Bool
$ctestBit :: ResolveModeFlagBits -> Int -> Bool
complementBit :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$ccomplementBit :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
clearBit :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$cclearBit :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
setBit :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$csetBit :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
bit :: Int -> ResolveModeFlagBits
$cbit :: Int -> ResolveModeFlagBits
zeroBits :: ResolveModeFlagBits
$czeroBits :: ResolveModeFlagBits
rotate :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$crotate :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
shift :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$cshift :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
complement :: ResolveModeFlagBits -> ResolveModeFlagBits
$ccomplement :: ResolveModeFlagBits -> ResolveModeFlagBits
xor :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
$cxor :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
.|. :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
$c.|. :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
.&. :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
$c.&. :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
Bits, Bits ResolveModeFlagBits
ResolveModeFlagBits -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: ResolveModeFlagBits -> Int
$ccountTrailingZeros :: ResolveModeFlagBits -> Int
countLeadingZeros :: ResolveModeFlagBits -> Int
$ccountLeadingZeros :: ResolveModeFlagBits -> Int
finiteBitSize :: ResolveModeFlagBits -> Int
$cfiniteBitSize :: ResolveModeFlagBits -> Int
FiniteBits)

-- | 'RESOLVE_MODE_NONE' indicates that no resolve operation is done.
pattern $bRESOLVE_MODE_NONE :: ResolveModeFlagBits
$mRESOLVE_MODE_NONE :: forall {r}.
ResolveModeFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
RESOLVE_MODE_NONE = ResolveModeFlagBits 0x00000000

-- | 'RESOLVE_MODE_SAMPLE_ZERO_BIT' indicates that result of the resolve
-- operation is equal to the value of sample 0.
pattern $bRESOLVE_MODE_SAMPLE_ZERO_BIT :: ResolveModeFlagBits
$mRESOLVE_MODE_SAMPLE_ZERO_BIT :: forall {r}.
ResolveModeFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
RESOLVE_MODE_SAMPLE_ZERO_BIT = ResolveModeFlagBits 0x00000001

-- | 'RESOLVE_MODE_AVERAGE_BIT' indicates that result of the resolve
-- operation is the average of the sample values.
pattern $bRESOLVE_MODE_AVERAGE_BIT :: ResolveModeFlagBits
$mRESOLVE_MODE_AVERAGE_BIT :: forall {r}.
ResolveModeFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
RESOLVE_MODE_AVERAGE_BIT = ResolveModeFlagBits 0x00000002

-- | 'RESOLVE_MODE_MIN_BIT' indicates that result of the resolve operation is
-- the minimum of the sample values.
pattern $bRESOLVE_MODE_MIN_BIT :: ResolveModeFlagBits
$mRESOLVE_MODE_MIN_BIT :: forall {r}.
ResolveModeFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
RESOLVE_MODE_MIN_BIT = ResolveModeFlagBits 0x00000004

-- | 'RESOLVE_MODE_MAX_BIT' indicates that result of the resolve operation is
-- the maximum of the sample values.
pattern $bRESOLVE_MODE_MAX_BIT :: ResolveModeFlagBits
$mRESOLVE_MODE_MAX_BIT :: forall {r}.
ResolveModeFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
RESOLVE_MODE_MAX_BIT = ResolveModeFlagBits 0x00000008

-- | 'RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID' indicates that rather
-- than a multisample resolve, a single sampled color attachment will be
-- downsampled into a Y′CBCR format image specified by an external Android
-- format. Unlike other resolve modes, implementations can resolve multiple
-- times during rendering, or even bypass writing to the color attachment
-- altogether, as long as the final value is resolved to the resolve
-- attachment. Values in the G, B, and R channels of the color attachment
-- will be written to the Y, CB, and CR channels of the external format
-- image, respectively. Chroma values are calculated as if sampling with a
-- linear filter from the color attachment at full rate, at the location
-- the chroma values sit according to
-- 'Vulkan.Extensions.VK_ANDROID_external_format_resolve.PhysicalDeviceExternalFormatResolvePropertiesANDROID'::@chromaOffsetX@,
-- 'Vulkan.Extensions.VK_ANDROID_external_format_resolve.PhysicalDeviceExternalFormatResolvePropertiesANDROID'::@chromaOffsetY@,
-- and the chroma sample rate of the resolved image.
pattern $bRESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID :: ResolveModeFlagBits
$mRESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID :: forall {r}.
ResolveModeFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID = ResolveModeFlagBits 0x00000010

conNameResolveModeFlagBits :: String
conNameResolveModeFlagBits :: String
conNameResolveModeFlagBits = String
"ResolveModeFlagBits"

enumPrefixResolveModeFlagBits :: String
enumPrefixResolveModeFlagBits :: String
enumPrefixResolveModeFlagBits = String
"RESOLVE_MODE_"

showTableResolveModeFlagBits :: [(ResolveModeFlagBits, String)]
showTableResolveModeFlagBits :: [(ResolveModeFlagBits, String)]
showTableResolveModeFlagBits =
  [ (ResolveModeFlagBits
RESOLVE_MODE_NONE, String
"NONE")
  ,
    ( ResolveModeFlagBits
RESOLVE_MODE_SAMPLE_ZERO_BIT
    , String
"SAMPLE_ZERO_BIT"
    )
  , (ResolveModeFlagBits
RESOLVE_MODE_AVERAGE_BIT, String
"AVERAGE_BIT")
  , (ResolveModeFlagBits
RESOLVE_MODE_MIN_BIT, String
"MIN_BIT")
  , (ResolveModeFlagBits
RESOLVE_MODE_MAX_BIT, String
"MAX_BIT")
  ,
    ( ResolveModeFlagBits
RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID
    , String
"EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID"
    )
  ]

instance Show ResolveModeFlagBits where
  showsPrec :: Int -> ResolveModeFlagBits -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixResolveModeFlagBits
      [(ResolveModeFlagBits, String)]
showTableResolveModeFlagBits
      String
conNameResolveModeFlagBits
      (\(ResolveModeFlagBits 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 ResolveModeFlagBits where
  readPrec :: ReadPrec ResolveModeFlagBits
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixResolveModeFlagBits
      [(ResolveModeFlagBits, String)]
showTableResolveModeFlagBits
      String
conNameResolveModeFlagBits
      Flags -> ResolveModeFlagBits
ResolveModeFlagBits