{-# language CPP #-}
-- No documentation found for Chapter "PeerMemoryFeatureFlagBits"
module Vulkan.Core11.Enums.PeerMemoryFeatureFlagBits  ( PeerMemoryFeatureFlags
                                                      , PeerMemoryFeatureFlagBits( PEER_MEMORY_FEATURE_COPY_SRC_BIT
                                                                                 , PEER_MEMORY_FEATURE_COPY_DST_BIT
                                                                                 , PEER_MEMORY_FEATURE_GENERIC_SRC_BIT
                                                                                 , PEER_MEMORY_FEATURE_GENERIC_DST_BIT
                                                                                 , ..
                                                                                 )
                                                      ) 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 PeerMemoryFeatureFlags = PeerMemoryFeatureFlagBits

-- | VkPeerMemoryFeatureFlagBits - Bitmask specifying supported peer memory
-- features
--
-- = Description
--
-- Note
--
-- The peer memory features of a memory heap also apply to any accesses
-- that /may/ be performed during
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#synchronization-image-layout-transitions image layout transitions>.
--
-- 'PEER_MEMORY_FEATURE_COPY_DST_BIT' /must/ be supported for all host
-- local heaps and for at least one device-local memory heap.
--
-- If a device does not support a peer memory feature, it is still valid to
-- use a resource that includes both local and peer memory bindings with
-- the corresponding access type as long as only the local bindings are
-- actually accessed. For example, an application doing split-frame
-- rendering would use framebuffer attachments that include both local and
-- peer memory bindings, but would scissor the rendering to only update
-- local memory.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_1 VK_VERSION_1_1>,
-- 'PeerMemoryFeatureFlags'
newtype PeerMemoryFeatureFlagBits = PeerMemoryFeatureFlagBits Flags
  deriving newtype (PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> Bool
$c/= :: PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> Bool
== :: PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> Bool
$c== :: PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> Bool
Eq, Eq PeerMemoryFeatureFlagBits
PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> Bool
PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> Ordering
PeerMemoryFeatureFlagBits
-> PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits
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 :: PeerMemoryFeatureFlagBits
-> PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits
$cmin :: PeerMemoryFeatureFlagBits
-> PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits
max :: PeerMemoryFeatureFlagBits
-> PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits
$cmax :: PeerMemoryFeatureFlagBits
-> PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits
>= :: PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> Bool
$c>= :: PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> Bool
> :: PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> Bool
$c> :: PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> Bool
<= :: PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> Bool
$c<= :: PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> Bool
< :: PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> Bool
$c< :: PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> Bool
compare :: PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> Ordering
$ccompare :: PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> Ordering
Ord, Ptr PeerMemoryFeatureFlagBits -> IO PeerMemoryFeatureFlagBits
Ptr PeerMemoryFeatureFlagBits
-> Int -> IO PeerMemoryFeatureFlagBits
Ptr PeerMemoryFeatureFlagBits
-> Int -> PeerMemoryFeatureFlagBits -> IO ()
Ptr PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> IO ()
PeerMemoryFeatureFlagBits -> Int
forall b. Ptr b -> Int -> IO PeerMemoryFeatureFlagBits
forall b. Ptr b -> Int -> PeerMemoryFeatureFlagBits -> 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 PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> IO ()
$cpoke :: Ptr PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits -> IO ()
peek :: Ptr PeerMemoryFeatureFlagBits -> IO PeerMemoryFeatureFlagBits
$cpeek :: Ptr PeerMemoryFeatureFlagBits -> IO PeerMemoryFeatureFlagBits
pokeByteOff :: forall b. Ptr b -> Int -> PeerMemoryFeatureFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> PeerMemoryFeatureFlagBits -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO PeerMemoryFeatureFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PeerMemoryFeatureFlagBits
pokeElemOff :: Ptr PeerMemoryFeatureFlagBits
-> Int -> PeerMemoryFeatureFlagBits -> IO ()
$cpokeElemOff :: Ptr PeerMemoryFeatureFlagBits
-> Int -> PeerMemoryFeatureFlagBits -> IO ()
peekElemOff :: Ptr PeerMemoryFeatureFlagBits
-> Int -> IO PeerMemoryFeatureFlagBits
$cpeekElemOff :: Ptr PeerMemoryFeatureFlagBits
-> Int -> IO PeerMemoryFeatureFlagBits
alignment :: PeerMemoryFeatureFlagBits -> Int
$calignment :: PeerMemoryFeatureFlagBits -> Int
sizeOf :: PeerMemoryFeatureFlagBits -> Int
$csizeOf :: PeerMemoryFeatureFlagBits -> Int
Storable, PeerMemoryFeatureFlagBits
forall a. a -> Zero a
zero :: PeerMemoryFeatureFlagBits
$czero :: PeerMemoryFeatureFlagBits
Zero, Eq PeerMemoryFeatureFlagBits
PeerMemoryFeatureFlagBits
Int -> PeerMemoryFeatureFlagBits
PeerMemoryFeatureFlagBits -> Bool
PeerMemoryFeatureFlagBits -> Int
PeerMemoryFeatureFlagBits -> Maybe Int
PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits
PeerMemoryFeatureFlagBits -> Int -> Bool
PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
PeerMemoryFeatureFlagBits
-> PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits
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 :: PeerMemoryFeatureFlagBits -> Int
$cpopCount :: PeerMemoryFeatureFlagBits -> Int
rotateR :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
$crotateR :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
rotateL :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
$crotateL :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
unsafeShiftR :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
$cunsafeShiftR :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
shiftR :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
$cshiftR :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
unsafeShiftL :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
$cunsafeShiftL :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
shiftL :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
$cshiftL :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
isSigned :: PeerMemoryFeatureFlagBits -> Bool
$cisSigned :: PeerMemoryFeatureFlagBits -> Bool
bitSize :: PeerMemoryFeatureFlagBits -> Int
$cbitSize :: PeerMemoryFeatureFlagBits -> Int
bitSizeMaybe :: PeerMemoryFeatureFlagBits -> Maybe Int
$cbitSizeMaybe :: PeerMemoryFeatureFlagBits -> Maybe Int
testBit :: PeerMemoryFeatureFlagBits -> Int -> Bool
$ctestBit :: PeerMemoryFeatureFlagBits -> Int -> Bool
complementBit :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
$ccomplementBit :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
clearBit :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
$cclearBit :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
setBit :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
$csetBit :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
bit :: Int -> PeerMemoryFeatureFlagBits
$cbit :: Int -> PeerMemoryFeatureFlagBits
zeroBits :: PeerMemoryFeatureFlagBits
$czeroBits :: PeerMemoryFeatureFlagBits
rotate :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
$crotate :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
shift :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
$cshift :: PeerMemoryFeatureFlagBits -> Int -> PeerMemoryFeatureFlagBits
complement :: PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits
$ccomplement :: PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits
xor :: PeerMemoryFeatureFlagBits
-> PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits
$cxor :: PeerMemoryFeatureFlagBits
-> PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits
.|. :: PeerMemoryFeatureFlagBits
-> PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits
$c.|. :: PeerMemoryFeatureFlagBits
-> PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits
.&. :: PeerMemoryFeatureFlagBits
-> PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits
$c.&. :: PeerMemoryFeatureFlagBits
-> PeerMemoryFeatureFlagBits -> PeerMemoryFeatureFlagBits
Bits, Bits PeerMemoryFeatureFlagBits
PeerMemoryFeatureFlagBits -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: PeerMemoryFeatureFlagBits -> Int
$ccountTrailingZeros :: PeerMemoryFeatureFlagBits -> Int
countLeadingZeros :: PeerMemoryFeatureFlagBits -> Int
$ccountLeadingZeros :: PeerMemoryFeatureFlagBits -> Int
finiteBitSize :: PeerMemoryFeatureFlagBits -> Int
$cfiniteBitSize :: PeerMemoryFeatureFlagBits -> Int
FiniteBits)

-- | 'PEER_MEMORY_FEATURE_COPY_SRC_BIT' specifies that the memory /can/ be
-- accessed as the source of any @vkCmdCopy*@ command.
pattern $bPEER_MEMORY_FEATURE_COPY_SRC_BIT :: PeerMemoryFeatureFlagBits
$mPEER_MEMORY_FEATURE_COPY_SRC_BIT :: forall {r}.
PeerMemoryFeatureFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
PEER_MEMORY_FEATURE_COPY_SRC_BIT = PeerMemoryFeatureFlagBits 0x00000001

-- | 'PEER_MEMORY_FEATURE_COPY_DST_BIT' specifies that the memory /can/ be
-- accessed as the destination of any @vkCmdCopy*@ command.
pattern $bPEER_MEMORY_FEATURE_COPY_DST_BIT :: PeerMemoryFeatureFlagBits
$mPEER_MEMORY_FEATURE_COPY_DST_BIT :: forall {r}.
PeerMemoryFeatureFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
PEER_MEMORY_FEATURE_COPY_DST_BIT = PeerMemoryFeatureFlagBits 0x00000002

-- | 'PEER_MEMORY_FEATURE_GENERIC_SRC_BIT' specifies that the memory /can/ be
-- read as any memory access type.
pattern $bPEER_MEMORY_FEATURE_GENERIC_SRC_BIT :: PeerMemoryFeatureFlagBits
$mPEER_MEMORY_FEATURE_GENERIC_SRC_BIT :: forall {r}.
PeerMemoryFeatureFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
PEER_MEMORY_FEATURE_GENERIC_SRC_BIT = PeerMemoryFeatureFlagBits 0x00000004

-- | 'PEER_MEMORY_FEATURE_GENERIC_DST_BIT' specifies that the memory /can/ be
-- written as any memory access type. Shader atomics are considered to be
-- writes.
pattern $bPEER_MEMORY_FEATURE_GENERIC_DST_BIT :: PeerMemoryFeatureFlagBits
$mPEER_MEMORY_FEATURE_GENERIC_DST_BIT :: forall {r}.
PeerMemoryFeatureFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
PEER_MEMORY_FEATURE_GENERIC_DST_BIT = PeerMemoryFeatureFlagBits 0x00000008

conNamePeerMemoryFeatureFlagBits :: String
conNamePeerMemoryFeatureFlagBits :: String
conNamePeerMemoryFeatureFlagBits = String
"PeerMemoryFeatureFlagBits"

enumPrefixPeerMemoryFeatureFlagBits :: String
enumPrefixPeerMemoryFeatureFlagBits :: String
enumPrefixPeerMemoryFeatureFlagBits = String
"PEER_MEMORY_FEATURE_"

showTablePeerMemoryFeatureFlagBits :: [(PeerMemoryFeatureFlagBits, String)]
showTablePeerMemoryFeatureFlagBits :: [(PeerMemoryFeatureFlagBits, String)]
showTablePeerMemoryFeatureFlagBits =
  [
    ( PeerMemoryFeatureFlagBits
PEER_MEMORY_FEATURE_COPY_SRC_BIT
    , String
"COPY_SRC_BIT"
    )
  ,
    ( PeerMemoryFeatureFlagBits
PEER_MEMORY_FEATURE_COPY_DST_BIT
    , String
"COPY_DST_BIT"
    )
  ,
    ( PeerMemoryFeatureFlagBits
PEER_MEMORY_FEATURE_GENERIC_SRC_BIT
    , String
"GENERIC_SRC_BIT"
    )
  ,
    ( PeerMemoryFeatureFlagBits
PEER_MEMORY_FEATURE_GENERIC_DST_BIT
    , String
"GENERIC_DST_BIT"
    )
  ]

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