{-# language CPP #-}
-- No documentation found for Chapter "MemoryUnmapFlagBits"
module Vulkan.Core14.Enums.MemoryUnmapFlagBits  ( MemoryUnmapFlags
                                                , MemoryUnmapFlagBits( MEMORY_UNMAP_RESERVE_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 MemoryUnmapFlags = MemoryUnmapFlagBits

-- | VkMemoryUnmapFlagBits - Bitmask specifying additional parameters of a
-- memory unmap
--
-- = Description
--
-- -   'MEMORY_UNMAP_RESERVE_BIT_EXT' requests that virtual address range
--     currently occupied by the memory map remain reserved after the
--     'Vulkan.Core14.Promoted_From_VK_KHR_map_memory2Roadmap.unmapMemory2'
--     call completes. Future system memory map operations or calls to
--     'Vulkan.Core10.Memory.mapMemory' or
--     'Vulkan.Core14.Promoted_From_VK_KHR_map_memory2Roadmap.mapMemory2'
--     will not return addresses in that range unless the range has since
--     been unreserved by the client or the mapping is explicitly placed in
--     that range by calling
--     'Vulkan.Core14.Promoted_From_VK_KHR_map_memory2Roadmap.mapMemory2'
--     with
--     'Vulkan.Core10.Enums.MemoryMapFlagBits.MEMORY_MAP_PLACED_BIT_EXT',
--     or doing the system memory map equivalent. When
--     'MEMORY_UNMAP_RESERVE_BIT_EXT' is set, the memory unmap operation
--     /may/ fail, in which case the memory object will remain host mapped
--     and
--     'Vulkan.Core14.Promoted_From_VK_KHR_map_memory2Roadmap.unmapMemory2'
--     will return 'Vulkan.Core10.Enums.Result.ERROR_MEMORY_MAP_FAILED'.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_map_memory2 VK_KHR_map_memory2>,
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_4 VK_VERSION_1_4>,
-- 'MemoryUnmapFlags'
newtype MemoryUnmapFlagBits = MemoryUnmapFlagBits Flags
  deriving newtype (MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool
(MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool)
-> (MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool)
-> Eq MemoryUnmapFlagBits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool
== :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool
$c/= :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool
/= :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool
Eq, Eq MemoryUnmapFlagBits
Eq MemoryUnmapFlagBits =>
(MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Ordering)
-> (MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool)
-> (MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool)
-> (MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool)
-> (MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool)
-> (MemoryUnmapFlagBits
    -> MemoryUnmapFlagBits -> MemoryUnmapFlagBits)
-> (MemoryUnmapFlagBits
    -> MemoryUnmapFlagBits -> MemoryUnmapFlagBits)
-> Ord MemoryUnmapFlagBits
MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool
MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Ordering
MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> MemoryUnmapFlagBits
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
$ccompare :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Ordering
compare :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Ordering
$c< :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool
< :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool
$c<= :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool
<= :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool
$c> :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool
> :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool
$c>= :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool
>= :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> Bool
$cmax :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> MemoryUnmapFlagBits
max :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> MemoryUnmapFlagBits
$cmin :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> MemoryUnmapFlagBits
min :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> MemoryUnmapFlagBits
Ord, Ptr MemoryUnmapFlagBits -> IO MemoryUnmapFlagBits
Ptr MemoryUnmapFlagBits -> Int -> IO MemoryUnmapFlagBits
Ptr MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits -> IO ()
Ptr MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> IO ()
MemoryUnmapFlagBits -> Int
(MemoryUnmapFlagBits -> Int)
-> (MemoryUnmapFlagBits -> Int)
-> (Ptr MemoryUnmapFlagBits -> Int -> IO MemoryUnmapFlagBits)
-> (Ptr MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits -> IO ())
-> (forall b. Ptr b -> Int -> IO MemoryUnmapFlagBits)
-> (forall b. Ptr b -> Int -> MemoryUnmapFlagBits -> IO ())
-> (Ptr MemoryUnmapFlagBits -> IO MemoryUnmapFlagBits)
-> (Ptr MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> IO ())
-> Storable MemoryUnmapFlagBits
forall b. Ptr b -> Int -> IO MemoryUnmapFlagBits
forall b. Ptr b -> Int -> MemoryUnmapFlagBits -> 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
$csizeOf :: MemoryUnmapFlagBits -> Int
sizeOf :: MemoryUnmapFlagBits -> Int
$calignment :: MemoryUnmapFlagBits -> Int
alignment :: MemoryUnmapFlagBits -> Int
$cpeekElemOff :: Ptr MemoryUnmapFlagBits -> Int -> IO MemoryUnmapFlagBits
peekElemOff :: Ptr MemoryUnmapFlagBits -> Int -> IO MemoryUnmapFlagBits
$cpokeElemOff :: Ptr MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits -> IO ()
pokeElemOff :: Ptr MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO MemoryUnmapFlagBits
peekByteOff :: forall b. Ptr b -> Int -> IO MemoryUnmapFlagBits
$cpokeByteOff :: forall b. Ptr b -> Int -> MemoryUnmapFlagBits -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> MemoryUnmapFlagBits -> IO ()
$cpeek :: Ptr MemoryUnmapFlagBits -> IO MemoryUnmapFlagBits
peek :: Ptr MemoryUnmapFlagBits -> IO MemoryUnmapFlagBits
$cpoke :: Ptr MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> IO ()
poke :: Ptr MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> IO ()
Storable, MemoryUnmapFlagBits
MemoryUnmapFlagBits -> Zero MemoryUnmapFlagBits
forall a. a -> Zero a
$czero :: MemoryUnmapFlagBits
zero :: MemoryUnmapFlagBits
Zero, Eq MemoryUnmapFlagBits
MemoryUnmapFlagBits
Eq MemoryUnmapFlagBits =>
(MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> MemoryUnmapFlagBits)
-> (MemoryUnmapFlagBits
    -> MemoryUnmapFlagBits -> MemoryUnmapFlagBits)
-> (MemoryUnmapFlagBits
    -> MemoryUnmapFlagBits -> MemoryUnmapFlagBits)
-> (MemoryUnmapFlagBits -> MemoryUnmapFlagBits)
-> (MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits)
-> (MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits)
-> MemoryUnmapFlagBits
-> (Int -> MemoryUnmapFlagBits)
-> (MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits)
-> (MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits)
-> (MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits)
-> (MemoryUnmapFlagBits -> Int -> Bool)
-> (MemoryUnmapFlagBits -> Maybe Int)
-> (MemoryUnmapFlagBits -> Int)
-> (MemoryUnmapFlagBits -> Bool)
-> (MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits)
-> (MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits)
-> (MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits)
-> (MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits)
-> (MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits)
-> (MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits)
-> (MemoryUnmapFlagBits -> Int)
-> Bits MemoryUnmapFlagBits
Int -> MemoryUnmapFlagBits
MemoryUnmapFlagBits -> Bool
MemoryUnmapFlagBits -> Int
MemoryUnmapFlagBits -> Maybe Int
MemoryUnmapFlagBits -> MemoryUnmapFlagBits
MemoryUnmapFlagBits -> Int -> Bool
MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> MemoryUnmapFlagBits
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
$c.&. :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> MemoryUnmapFlagBits
.&. :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> MemoryUnmapFlagBits
$c.|. :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> MemoryUnmapFlagBits
.|. :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> MemoryUnmapFlagBits
$cxor :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> MemoryUnmapFlagBits
xor :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits -> MemoryUnmapFlagBits
$ccomplement :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits
complement :: MemoryUnmapFlagBits -> MemoryUnmapFlagBits
$cshift :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
shift :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
$crotate :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
rotate :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
$czeroBits :: MemoryUnmapFlagBits
zeroBits :: MemoryUnmapFlagBits
$cbit :: Int -> MemoryUnmapFlagBits
bit :: Int -> MemoryUnmapFlagBits
$csetBit :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
setBit :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
$cclearBit :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
clearBit :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
$ccomplementBit :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
complementBit :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
$ctestBit :: MemoryUnmapFlagBits -> Int -> Bool
testBit :: MemoryUnmapFlagBits -> Int -> Bool
$cbitSizeMaybe :: MemoryUnmapFlagBits -> Maybe Int
bitSizeMaybe :: MemoryUnmapFlagBits -> Maybe Int
$cbitSize :: MemoryUnmapFlagBits -> Int
bitSize :: MemoryUnmapFlagBits -> Int
$cisSigned :: MemoryUnmapFlagBits -> Bool
isSigned :: MemoryUnmapFlagBits -> Bool
$cshiftL :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
shiftL :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
$cunsafeShiftL :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
unsafeShiftL :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
$cshiftR :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
shiftR :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
$cunsafeShiftR :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
unsafeShiftR :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
$crotateL :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
rotateL :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
$crotateR :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
rotateR :: MemoryUnmapFlagBits -> Int -> MemoryUnmapFlagBits
$cpopCount :: MemoryUnmapFlagBits -> Int
popCount :: MemoryUnmapFlagBits -> Int
Bits, Bits MemoryUnmapFlagBits
Bits MemoryUnmapFlagBits =>
(MemoryUnmapFlagBits -> Int)
-> (MemoryUnmapFlagBits -> Int)
-> (MemoryUnmapFlagBits -> Int)
-> FiniteBits MemoryUnmapFlagBits
MemoryUnmapFlagBits -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
$cfiniteBitSize :: MemoryUnmapFlagBits -> Int
finiteBitSize :: MemoryUnmapFlagBits -> Int
$ccountLeadingZeros :: MemoryUnmapFlagBits -> Int
countLeadingZeros :: MemoryUnmapFlagBits -> Int
$ccountTrailingZeros :: MemoryUnmapFlagBits -> Int
countTrailingZeros :: MemoryUnmapFlagBits -> Int
FiniteBits)

-- No documentation found for Nested "VkMemoryUnmapFlagBits" "VK_MEMORY_UNMAP_RESERVE_BIT_EXT"
pattern $mMEMORY_UNMAP_RESERVE_BIT_EXT :: forall {r}.
MemoryUnmapFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
$bMEMORY_UNMAP_RESERVE_BIT_EXT :: MemoryUnmapFlagBits
MEMORY_UNMAP_RESERVE_BIT_EXT = MemoryUnmapFlagBits 0x00000001

conNameMemoryUnmapFlagBits :: String
conNameMemoryUnmapFlagBits :: String
conNameMemoryUnmapFlagBits = String
"MemoryUnmapFlagBits"

enumPrefixMemoryUnmapFlagBits :: String
enumPrefixMemoryUnmapFlagBits :: String
enumPrefixMemoryUnmapFlagBits = String
"MEMORY_UNMAP_RESERVE_BIT_EXT"

showTableMemoryUnmapFlagBits :: [(MemoryUnmapFlagBits, String)]
showTableMemoryUnmapFlagBits :: [(MemoryUnmapFlagBits, String)]
showTableMemoryUnmapFlagBits = [(MemoryUnmapFlagBits
MEMORY_UNMAP_RESERVE_BIT_EXT, String
"")]

instance Show MemoryUnmapFlagBits where
  showsPrec :: Int -> MemoryUnmapFlagBits -> ShowS
showsPrec =
    String
-> [(MemoryUnmapFlagBits, String)]
-> String
-> (MemoryUnmapFlagBits -> Word32)
-> (Word32 -> ShowS)
-> Int
-> MemoryUnmapFlagBits
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixMemoryUnmapFlagBits
      [(MemoryUnmapFlagBits, String)]
showTableMemoryUnmapFlagBits
      String
conNameMemoryUnmapFlagBits
      (\(MemoryUnmapFlagBits Word32
x) -> Word32
x)
      (\Word32
x -> String -> ShowS
showString String
"0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word32 -> ShowS
forall a. Integral a => a -> ShowS
showHex Word32
x)

instance Read MemoryUnmapFlagBits where
  readPrec :: ReadPrec MemoryUnmapFlagBits
readPrec =
    String
-> [(MemoryUnmapFlagBits, String)]
-> String
-> (Word32 -> MemoryUnmapFlagBits)
-> ReadPrec MemoryUnmapFlagBits
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixMemoryUnmapFlagBits
      [(MemoryUnmapFlagBits, String)]
showTableMemoryUnmapFlagBits
      String
conNameMemoryUnmapFlagBits
      Word32 -> MemoryUnmapFlagBits
MemoryUnmapFlagBits