{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_private_data  ( createPrivateDataSlotEXT
                                              , withPrivateDataSlotEXT
                                              , destroyPrivateDataSlotEXT
                                              , setPrivateDataEXT
                                              , getPrivateDataEXT
                                              , DevicePrivateDataCreateInfoEXT(..)
                                              , PrivateDataSlotCreateInfoEXT(..)
                                              , PhysicalDevicePrivateDataFeaturesEXT(..)
                                              , PrivateDataSlotCreateFlagBitsEXT(..)
                                              , PrivateDataSlotCreateFlagsEXT
                                              , EXT_PRIVATE_DATA_SPEC_VERSION
                                              , pattern EXT_PRIVATE_DATA_SPEC_VERSION
                                              , EXT_PRIVATE_DATA_EXTENSION_NAME
                                              , pattern EXT_PRIVATE_DATA_EXTENSION_NAME
                                              , PrivateDataSlotEXT(..)
                                              ) where

import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytesAligned)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import Numeric (showHex)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import Data.Word (Word32)
import Data.Word (Word64)
import Text.Read.Lex (Lexeme(Ident))
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Vulkan.Core10.BaseType (bool32ToBool)
import Vulkan.Core10.BaseType (boolToBool32)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Core10.BaseType (Bool32)
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Dynamic (DeviceCmds(pVkCreatePrivateDataSlotEXT))
import Vulkan.Dynamic (DeviceCmds(pVkDestroyPrivateDataSlotEXT))
import Vulkan.Dynamic (DeviceCmds(pVkGetPrivateDataEXT))
import Vulkan.Dynamic (DeviceCmds(pVkSetPrivateDataEXT))
import Vulkan.Core10.Handles (Device_T)
import Vulkan.Core10.BaseType (Flags)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.Core10.Enums.ObjectType (ObjectType)
import Vulkan.Core10.Enums.ObjectType (ObjectType(..))
import Vulkan.Extensions.Handles (PrivateDataSlotEXT)
import Vulkan.Extensions.Handles (PrivateDataSlotEXT(..))
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Exception (VulkanException(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.Handles (PrivateDataSlotEXT(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCreatePrivateDataSlotEXT
  :: FunPtr (Ptr Device_T -> Ptr PrivateDataSlotCreateInfoEXT -> Ptr AllocationCallbacks -> Ptr PrivateDataSlotEXT -> IO Result) -> Ptr Device_T -> Ptr PrivateDataSlotCreateInfoEXT -> Ptr AllocationCallbacks -> Ptr PrivateDataSlotEXT -> IO Result

-- | vkCreatePrivateDataSlotEXT - Create a slot for private data storage
--
-- = Parameters
--
-- -   @device@ is the logical device associated with the creation of the
--     object(s) holding the private data slot.
--
-- -   @pCreateInfo@ is a pointer to a 'PrivateDataSlotCreateInfoEXT'
--
-- -   @pAllocator@ controls host memory allocation as described in the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>
--     chapter.
--
-- -   @pPrivateDataSlot@ is a pointer to a
--     'Vulkan.Extensions.Handles.PrivateDataSlotEXT' handle in which the
--     resulting private data slot is returned
--
-- == Valid Usage (Implicit)
--
-- -   @device@ /must/ be a valid 'Vulkan.Core10.Handles.Device' handle
--
-- -   @pCreateInfo@ /must/ be a valid pointer to a valid
--     'PrivateDataSlotCreateInfoEXT' structure
--
-- -   If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid
--     pointer to a valid
--     'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' structure
--
-- -   @pPrivateDataSlot@ /must/ be a valid pointer to a
--     'Vulkan.Extensions.Handles.PrivateDataSlotEXT' handle
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
-- = See Also
--
-- 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks',
-- 'Vulkan.Core10.Handles.Device', 'PrivateDataSlotCreateInfoEXT',
-- 'Vulkan.Extensions.Handles.PrivateDataSlotEXT'
createPrivateDataSlotEXT :: forall io . MonadIO io => Device -> PrivateDataSlotCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io (PrivateDataSlotEXT)
createPrivateDataSlotEXT :: Device
-> PrivateDataSlotCreateInfoEXT
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io PrivateDataSlotEXT
createPrivateDataSlotEXT device :: Device
device createInfo :: PrivateDataSlotCreateInfoEXT
createInfo allocator :: "allocator" ::: Maybe AllocationCallbacks
allocator = IO PrivateDataSlotEXT -> io PrivateDataSlotEXT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PrivateDataSlotEXT -> io PrivateDataSlotEXT)
-> (ContT PrivateDataSlotEXT IO PrivateDataSlotEXT
    -> IO PrivateDataSlotEXT)
-> ContT PrivateDataSlotEXT IO PrivateDataSlotEXT
-> io PrivateDataSlotEXT
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT PrivateDataSlotEXT IO PrivateDataSlotEXT
-> IO PrivateDataSlotEXT
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT PrivateDataSlotEXT IO PrivateDataSlotEXT
 -> io PrivateDataSlotEXT)
-> ContT PrivateDataSlotEXT IO PrivateDataSlotEXT
-> io PrivateDataSlotEXT
forall a b. (a -> b) -> a -> b
$ do
  let vkCreatePrivateDataSlotEXTPtr :: FunPtr
  (Ptr Device_T
   -> ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
   -> IO Result)
vkCreatePrivateDataSlotEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> ("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
      -> IO Result)
pVkCreatePrivateDataSlotEXT (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
  IO () -> ContT PrivateDataSlotEXT IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT PrivateDataSlotEXT IO ())
-> IO () -> ContT PrivateDataSlotEXT IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
   -> IO Result)
vkCreatePrivateDataSlotEXTPtr FunPtr
  (Ptr Device_T
   -> ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
   -> IO Result)
-> FunPtr
     (Ptr Device_T
      -> ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> ("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Device_T
   -> ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
   -> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkCreatePrivateDataSlotEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkCreatePrivateDataSlotEXT' :: Ptr Device_T
-> ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
-> IO Result
vkCreatePrivateDataSlotEXT' = FunPtr
  (Ptr Device_T
   -> ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
   -> IO Result)
-> Ptr Device_T
-> ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
-> IO Result
mkVkCreatePrivateDataSlotEXT FunPtr
  (Ptr Device_T
   -> ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
   -> IO Result)
vkCreatePrivateDataSlotEXTPtr
  "pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT
pCreateInfo <- ((("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
  -> IO PrivateDataSlotEXT)
 -> IO PrivateDataSlotEXT)
-> ContT
     PrivateDataSlotEXT
     IO
     ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
   -> IO PrivateDataSlotEXT)
  -> IO PrivateDataSlotEXT)
 -> ContT
      PrivateDataSlotEXT
      IO
      ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT))
-> ((("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
     -> IO PrivateDataSlotEXT)
    -> IO PrivateDataSlotEXT)
-> ContT
     PrivateDataSlotEXT
     IO
     ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
forall a b. (a -> b) -> a -> b
$ PrivateDataSlotCreateInfoEXT
-> (("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
    -> IO PrivateDataSlotEXT)
-> IO PrivateDataSlotEXT
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (PrivateDataSlotCreateInfoEXT
createInfo)
  "pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
    Nothing -> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ContT
     PrivateDataSlotEXT IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall (f :: * -> *) a. Applicative f => a -> f a
pure "pAllocator" ::: Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
    Just j :: AllocationCallbacks
j -> ((("pAllocator" ::: Ptr AllocationCallbacks)
  -> IO PrivateDataSlotEXT)
 -> IO PrivateDataSlotEXT)
-> ContT
     PrivateDataSlotEXT IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAllocator" ::: Ptr AllocationCallbacks)
   -> IO PrivateDataSlotEXT)
  -> IO PrivateDataSlotEXT)
 -> ContT
      PrivateDataSlotEXT IO ("pAllocator" ::: Ptr AllocationCallbacks))
-> ((("pAllocator" ::: Ptr AllocationCallbacks)
     -> IO PrivateDataSlotEXT)
    -> IO PrivateDataSlotEXT)
-> ContT
     PrivateDataSlotEXT IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks
-> (("pAllocator" ::: Ptr AllocationCallbacks)
    -> IO PrivateDataSlotEXT)
-> IO PrivateDataSlotEXT
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
  "pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT
pPPrivateDataSlot <- ((("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
  -> IO PrivateDataSlotEXT)
 -> IO PrivateDataSlotEXT)
-> ContT
     PrivateDataSlotEXT
     IO
     ("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
   -> IO PrivateDataSlotEXT)
  -> IO PrivateDataSlotEXT)
 -> ContT
      PrivateDataSlotEXT
      IO
      ("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT))
-> ((("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
     -> IO PrivateDataSlotEXT)
    -> IO PrivateDataSlotEXT)
-> ContT
     PrivateDataSlotEXT
     IO
     ("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
forall a b. (a -> b) -> a -> b
$ IO ("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
-> (("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT) -> IO ())
-> (("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
    -> IO PrivateDataSlotEXT)
-> IO PrivateDataSlotEXT
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
forall a. Int -> IO (Ptr a)
callocBytes @PrivateDataSlotEXT 8) ("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT) -> IO ()
forall a. Ptr a -> IO ()
free
  Result
r <- IO Result -> ContT PrivateDataSlotEXT IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT PrivateDataSlotEXT IO Result)
-> IO Result -> ContT PrivateDataSlotEXT IO Result
forall a b. (a -> b) -> a -> b
$ Ptr Device_T
-> ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
-> IO Result
vkCreatePrivateDataSlotEXT' (Device -> Ptr Device_T
deviceHandle (Device
device)) "pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT
pCreateInfo "pAllocator" ::: Ptr AllocationCallbacks
pAllocator ("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT
pPPrivateDataSlot)
  IO () -> ContT PrivateDataSlotEXT IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT PrivateDataSlotEXT IO ())
-> IO () -> ContT PrivateDataSlotEXT IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
  PrivateDataSlotEXT
pPrivateDataSlot <- IO PrivateDataSlotEXT
-> ContT PrivateDataSlotEXT IO PrivateDataSlotEXT
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO PrivateDataSlotEXT
 -> ContT PrivateDataSlotEXT IO PrivateDataSlotEXT)
-> IO PrivateDataSlotEXT
-> ContT PrivateDataSlotEXT IO PrivateDataSlotEXT
forall a b. (a -> b) -> a -> b
$ ("pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT)
-> IO PrivateDataSlotEXT
forall a. Storable a => Ptr a -> IO a
peek @PrivateDataSlotEXT "pPrivateDataSlot" ::: Ptr PrivateDataSlotEXT
pPPrivateDataSlot
  PrivateDataSlotEXT
-> ContT PrivateDataSlotEXT IO PrivateDataSlotEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PrivateDataSlotEXT
 -> ContT PrivateDataSlotEXT IO PrivateDataSlotEXT)
-> PrivateDataSlotEXT
-> ContT PrivateDataSlotEXT IO PrivateDataSlotEXT
forall a b. (a -> b) -> a -> b
$ (PrivateDataSlotEXT
pPrivateDataSlot)

-- | A convenience wrapper to make a compatible pair of calls to
-- 'createPrivateDataSlotEXT' and 'destroyPrivateDataSlotEXT'
--
-- To ensure that 'destroyPrivateDataSlotEXT' is always called: pass
-- 'Control.Exception.bracket' (or the allocate function from your
-- favourite resource management library) as the first argument.
-- To just extract the pair pass '(,)' as the first argument.
--
withPrivateDataSlotEXT :: forall io r . MonadIO io => Device -> PrivateDataSlotCreateInfoEXT -> Maybe AllocationCallbacks -> (io (PrivateDataSlotEXT) -> ((PrivateDataSlotEXT) -> io ()) -> r) -> r
withPrivateDataSlotEXT :: Device
-> PrivateDataSlotCreateInfoEXT
-> ("allocator" ::: Maybe AllocationCallbacks)
-> (io PrivateDataSlotEXT -> (PrivateDataSlotEXT -> io ()) -> r)
-> r
withPrivateDataSlotEXT device :: Device
device pCreateInfo :: PrivateDataSlotCreateInfoEXT
pCreateInfo pAllocator :: "allocator" ::: Maybe AllocationCallbacks
pAllocator b :: io PrivateDataSlotEXT -> (PrivateDataSlotEXT -> io ()) -> r
b =
  io PrivateDataSlotEXT -> (PrivateDataSlotEXT -> io ()) -> r
b (Device
-> PrivateDataSlotCreateInfoEXT
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io PrivateDataSlotEXT
forall (io :: * -> *).
MonadIO io =>
Device
-> PrivateDataSlotCreateInfoEXT
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io PrivateDataSlotEXT
createPrivateDataSlotEXT Device
device PrivateDataSlotCreateInfoEXT
pCreateInfo "allocator" ::: Maybe AllocationCallbacks
pAllocator)
    (\(PrivateDataSlotEXT
o0) -> Device
-> PrivateDataSlotEXT
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
forall (io :: * -> *).
MonadIO io =>
Device
-> PrivateDataSlotEXT
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyPrivateDataSlotEXT Device
device PrivateDataSlotEXT
o0 "allocator" ::: Maybe AllocationCallbacks
pAllocator)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkDestroyPrivateDataSlotEXT
  :: FunPtr (Ptr Device_T -> PrivateDataSlotEXT -> Ptr AllocationCallbacks -> IO ()) -> Ptr Device_T -> PrivateDataSlotEXT -> Ptr AllocationCallbacks -> IO ()

-- | vkDestroyPrivateDataSlotEXT - Destroy a private data slot
--
-- = Parameters
--
-- -   @device@ is the logical device associated with the creation of the
--     object(s) holding the private data slot.
--
-- -   @pAllocator@ controls host memory allocation as described in the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>
--     chapter.
--
-- -   @privateDataSlot@ is the private data slot to destroy.
--
-- = See Also
--
-- 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks',
-- 'Vulkan.Core10.Handles.Device',
-- 'Vulkan.Extensions.Handles.PrivateDataSlotEXT'
destroyPrivateDataSlotEXT :: forall io . MonadIO io => Device -> PrivateDataSlotEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
destroyPrivateDataSlotEXT :: Device
-> PrivateDataSlotEXT
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyPrivateDataSlotEXT device :: Device
device privateDataSlot :: PrivateDataSlotEXT
privateDataSlot allocator :: "allocator" ::: Maybe AllocationCallbacks
allocator = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let vkDestroyPrivateDataSlotEXTPtr :: FunPtr
  (Ptr Device_T
   -> PrivateDataSlotEXT
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> IO ())
vkDestroyPrivateDataSlotEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> PrivateDataSlotEXT
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> IO ())
pVkDestroyPrivateDataSlotEXT (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
  IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> PrivateDataSlotEXT
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> IO ())
vkDestroyPrivateDataSlotEXTPtr FunPtr
  (Ptr Device_T
   -> PrivateDataSlotEXT
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> IO ())
-> FunPtr
     (Ptr Device_T
      -> PrivateDataSlotEXT
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Device_T
   -> PrivateDataSlotEXT
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkDestroyPrivateDataSlotEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkDestroyPrivateDataSlotEXT' :: Ptr Device_T
-> PrivateDataSlotEXT
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
vkDestroyPrivateDataSlotEXT' = FunPtr
  (Ptr Device_T
   -> PrivateDataSlotEXT
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> IO ())
-> Ptr Device_T
-> PrivateDataSlotEXT
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
mkVkDestroyPrivateDataSlotEXT FunPtr
  (Ptr Device_T
   -> PrivateDataSlotEXT
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> IO ())
vkDestroyPrivateDataSlotEXTPtr
  "pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
    Nothing -> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall (f :: * -> *) a. Applicative f => a -> f a
pure "pAllocator" ::: Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
    Just j :: AllocationCallbacks
j -> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ())
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ())
 -> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks))
-> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ())
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks
-> (("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
  IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Device_T
-> PrivateDataSlotEXT
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
vkDestroyPrivateDataSlotEXT' (Device -> Ptr Device_T
deviceHandle (Device
device)) (PrivateDataSlotEXT
privateDataSlot) "pAllocator" ::: Ptr AllocationCallbacks
pAllocator
  () -> ContT () IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ()


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkSetPrivateDataEXT
  :: FunPtr (Ptr Device_T -> ObjectType -> Word64 -> PrivateDataSlotEXT -> Word64 -> IO Result) -> Ptr Device_T -> ObjectType -> Word64 -> PrivateDataSlotEXT -> Word64 -> IO Result

-- | vkSetPrivateDataEXT - Associate data with a Vulkan object
--
-- = Parameters
--
-- -   @device@ is the device that created the object.
--
-- -   @objectType@ is a 'Vulkan.Core10.Enums.ObjectType.ObjectType'
--     specifying the type of object to associate data with.
--
-- -   @objectHandle@ is a handle to the object to associate data with.
--
-- -   @privateDataSlot@ is a handle to a
--     'Vulkan.Extensions.Handles.PrivateDataSlotEXT' specifying location
--     of private data storage.
--
-- -   @data@ is user defined data to associate the object with. This data
--     will be stored at @privateDataSlot@.
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
-- = See Also
--
-- 'Vulkan.Core10.Handles.Device',
-- 'Vulkan.Core10.Enums.ObjectType.ObjectType',
-- 'Vulkan.Extensions.Handles.PrivateDataSlotEXT'
setPrivateDataEXT :: forall io . MonadIO io => Device -> ObjectType -> ("objectHandle" ::: Word64) -> PrivateDataSlotEXT -> ("data" ::: Word64) -> io ()
setPrivateDataEXT :: Device
-> ObjectType
-> ("objectHandle" ::: Word64)
-> PrivateDataSlotEXT
-> ("objectHandle" ::: Word64)
-> io ()
setPrivateDataEXT device :: Device
device objectType :: ObjectType
objectType objectHandle :: "objectHandle" ::: Word64
objectHandle privateDataSlot :: PrivateDataSlotEXT
privateDataSlot data' :: "objectHandle" ::: Word64
data' = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ()) -> IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let vkSetPrivateDataEXTPtr :: FunPtr
  (Ptr Device_T
   -> ObjectType
   -> ("objectHandle" ::: Word64)
   -> PrivateDataSlotEXT
   -> ("objectHandle" ::: Word64)
   -> IO Result)
vkSetPrivateDataEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> ObjectType
      -> ("objectHandle" ::: Word64)
      -> PrivateDataSlotEXT
      -> ("objectHandle" ::: Word64)
      -> IO Result)
pVkSetPrivateDataEXT (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
  Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> ObjectType
   -> ("objectHandle" ::: Word64)
   -> PrivateDataSlotEXT
   -> ("objectHandle" ::: Word64)
   -> IO Result)
vkSetPrivateDataEXTPtr FunPtr
  (Ptr Device_T
   -> ObjectType
   -> ("objectHandle" ::: Word64)
   -> PrivateDataSlotEXT
   -> ("objectHandle" ::: Word64)
   -> IO Result)
-> FunPtr
     (Ptr Device_T
      -> ObjectType
      -> ("objectHandle" ::: Word64)
      -> PrivateDataSlotEXT
      -> ("objectHandle" ::: Word64)
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Device_T
   -> ObjectType
   -> ("objectHandle" ::: Word64)
   -> PrivateDataSlotEXT
   -> ("objectHandle" ::: Word64)
   -> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkSetPrivateDataEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkSetPrivateDataEXT' :: Ptr Device_T
-> ObjectType
-> ("objectHandle" ::: Word64)
-> PrivateDataSlotEXT
-> ("objectHandle" ::: Word64)
-> IO Result
vkSetPrivateDataEXT' = FunPtr
  (Ptr Device_T
   -> ObjectType
   -> ("objectHandle" ::: Word64)
   -> PrivateDataSlotEXT
   -> ("objectHandle" ::: Word64)
   -> IO Result)
-> Ptr Device_T
-> ObjectType
-> ("objectHandle" ::: Word64)
-> PrivateDataSlotEXT
-> ("objectHandle" ::: Word64)
-> IO Result
mkVkSetPrivateDataEXT FunPtr
  (Ptr Device_T
   -> ObjectType
   -> ("objectHandle" ::: Word64)
   -> PrivateDataSlotEXT
   -> ("objectHandle" ::: Word64)
   -> IO Result)
vkSetPrivateDataEXTPtr
  Result
r <- Ptr Device_T
-> ObjectType
-> ("objectHandle" ::: Word64)
-> PrivateDataSlotEXT
-> ("objectHandle" ::: Word64)
-> IO Result
vkSetPrivateDataEXT' (Device -> Ptr Device_T
deviceHandle (Device
device)) (ObjectType
objectType) ("objectHandle" ::: Word64
objectHandle) (PrivateDataSlotEXT
privateDataSlot) ("objectHandle" ::: Word64
data')
  Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetPrivateDataEXT
  :: FunPtr (Ptr Device_T -> ObjectType -> Word64 -> PrivateDataSlotEXT -> Ptr Word64 -> IO ()) -> Ptr Device_T -> ObjectType -> Word64 -> PrivateDataSlotEXT -> Ptr Word64 -> IO ()

-- | vkGetPrivateDataEXT - Retrieve data associated with a Vulkan object
--
-- = Parameters
--
-- -   @device@ is the device that created the object
--
-- -   @objectType@ is a 'Vulkan.Core10.Enums.ObjectType.ObjectType'
--     specifying the type of object data is associated with.
--
-- -   @objectHandle@ is a handle to the object data is associated with.
--
-- -   @privateDataSlot@ is a handle to a
--     'Vulkan.Extensions.Handles.PrivateDataSlotEXT' specifying location
--     of private data pointer storage.
--
-- -   @pData@ is a pointer to specify where user data is returned. @0@
--     will be written in the absence of a previous call to
--     'setPrivateDataEXT' using the object specified by @objectHandle@.
--
-- = Description
--
-- Note
--
-- Due to platform details on Android, implementations might not be able to
-- reliably return @0@ from calls to 'getPrivateDataEXT' for
-- 'Vulkan.Extensions.Handles.SwapchainKHR' objects on which
-- 'setPrivateDataEXT' has not previously been called. This erratum is
-- exclusive to the Android platform and objects of type
-- 'Vulkan.Extensions.Handles.SwapchainKHR'.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'Vulkan.Core10.Handles.Device',
-- 'Vulkan.Core10.Enums.ObjectType.ObjectType',
-- 'Vulkan.Extensions.Handles.PrivateDataSlotEXT'
getPrivateDataEXT :: forall io . MonadIO io => Device -> ObjectType -> ("objectHandle" ::: Word64) -> PrivateDataSlotEXT -> io (("data" ::: Word64))
getPrivateDataEXT :: Device
-> ObjectType
-> ("objectHandle" ::: Word64)
-> PrivateDataSlotEXT
-> io ("objectHandle" ::: Word64)
getPrivateDataEXT device :: Device
device objectType :: ObjectType
objectType objectHandle :: "objectHandle" ::: Word64
objectHandle privateDataSlot :: PrivateDataSlotEXT
privateDataSlot = IO ("objectHandle" ::: Word64) -> io ("objectHandle" ::: Word64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ("objectHandle" ::: Word64) -> io ("objectHandle" ::: Word64))
-> (ContT
      ("objectHandle" ::: Word64) IO ("objectHandle" ::: Word64)
    -> IO ("objectHandle" ::: Word64))
-> ContT ("objectHandle" ::: Word64) IO ("objectHandle" ::: Word64)
-> io ("objectHandle" ::: Word64)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT ("objectHandle" ::: Word64) IO ("objectHandle" ::: Word64)
-> IO ("objectHandle" ::: Word64)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT ("objectHandle" ::: Word64) IO ("objectHandle" ::: Word64)
 -> io ("objectHandle" ::: Word64))
-> ContT ("objectHandle" ::: Word64) IO ("objectHandle" ::: Word64)
-> io ("objectHandle" ::: Word64)
forall a b. (a -> b) -> a -> b
$ do
  let vkGetPrivateDataEXTPtr :: FunPtr
  (Ptr Device_T
   -> ObjectType
   -> ("objectHandle" ::: Word64)
   -> PrivateDataSlotEXT
   -> ("pData" ::: Ptr ("objectHandle" ::: Word64))
   -> IO ())
vkGetPrivateDataEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> ObjectType
      -> ("objectHandle" ::: Word64)
      -> PrivateDataSlotEXT
      -> ("pData" ::: Ptr ("objectHandle" ::: Word64))
      -> IO ())
pVkGetPrivateDataEXT (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
  IO () -> ContT ("objectHandle" ::: Word64) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT ("objectHandle" ::: Word64) IO ())
-> IO () -> ContT ("objectHandle" ::: Word64) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> ObjectType
   -> ("objectHandle" ::: Word64)
   -> PrivateDataSlotEXT
   -> ("pData" ::: Ptr ("objectHandle" ::: Word64))
   -> IO ())
vkGetPrivateDataEXTPtr FunPtr
  (Ptr Device_T
   -> ObjectType
   -> ("objectHandle" ::: Word64)
   -> PrivateDataSlotEXT
   -> ("pData" ::: Ptr ("objectHandle" ::: Word64))
   -> IO ())
-> FunPtr
     (Ptr Device_T
      -> ObjectType
      -> ("objectHandle" ::: Word64)
      -> PrivateDataSlotEXT
      -> ("pData" ::: Ptr ("objectHandle" ::: Word64))
      -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Device_T
   -> ObjectType
   -> ("objectHandle" ::: Word64)
   -> PrivateDataSlotEXT
   -> ("pData" ::: Ptr ("objectHandle" ::: Word64))
   -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkGetPrivateDataEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetPrivateDataEXT' :: Ptr Device_T
-> ObjectType
-> ("objectHandle" ::: Word64)
-> PrivateDataSlotEXT
-> ("pData" ::: Ptr ("objectHandle" ::: Word64))
-> IO ()
vkGetPrivateDataEXT' = FunPtr
  (Ptr Device_T
   -> ObjectType
   -> ("objectHandle" ::: Word64)
   -> PrivateDataSlotEXT
   -> ("pData" ::: Ptr ("objectHandle" ::: Word64))
   -> IO ())
-> Ptr Device_T
-> ObjectType
-> ("objectHandle" ::: Word64)
-> PrivateDataSlotEXT
-> ("pData" ::: Ptr ("objectHandle" ::: Word64))
-> IO ()
mkVkGetPrivateDataEXT FunPtr
  (Ptr Device_T
   -> ObjectType
   -> ("objectHandle" ::: Word64)
   -> PrivateDataSlotEXT
   -> ("pData" ::: Ptr ("objectHandle" ::: Word64))
   -> IO ())
vkGetPrivateDataEXTPtr
  "pData" ::: Ptr ("objectHandle" ::: Word64)
pPData <- ((("pData" ::: Ptr ("objectHandle" ::: Word64))
  -> IO ("objectHandle" ::: Word64))
 -> IO ("objectHandle" ::: Word64))
-> ContT
     ("objectHandle" ::: Word64)
     IO
     ("pData" ::: Ptr ("objectHandle" ::: Word64))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pData" ::: Ptr ("objectHandle" ::: Word64))
   -> IO ("objectHandle" ::: Word64))
  -> IO ("objectHandle" ::: Word64))
 -> ContT
      ("objectHandle" ::: Word64)
      IO
      ("pData" ::: Ptr ("objectHandle" ::: Word64)))
-> ((("pData" ::: Ptr ("objectHandle" ::: Word64))
     -> IO ("objectHandle" ::: Word64))
    -> IO ("objectHandle" ::: Word64))
-> ContT
     ("objectHandle" ::: Word64)
     IO
     ("pData" ::: Ptr ("objectHandle" ::: Word64))
forall a b. (a -> b) -> a -> b
$ IO ("pData" ::: Ptr ("objectHandle" ::: Word64))
-> (("pData" ::: Ptr ("objectHandle" ::: Word64)) -> IO ())
-> (("pData" ::: Ptr ("objectHandle" ::: Word64))
    -> IO ("objectHandle" ::: Word64))
-> IO ("objectHandle" ::: Word64)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("pData" ::: Ptr ("objectHandle" ::: Word64))
forall a. Int -> IO (Ptr a)
callocBytes @Word64 8) ("pData" ::: Ptr ("objectHandle" ::: Word64)) -> IO ()
forall a. Ptr a -> IO ()
free
  IO () -> ContT ("objectHandle" ::: Word64) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT ("objectHandle" ::: Word64) IO ())
-> IO () -> ContT ("objectHandle" ::: Word64) IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Device_T
-> ObjectType
-> ("objectHandle" ::: Word64)
-> PrivateDataSlotEXT
-> ("pData" ::: Ptr ("objectHandle" ::: Word64))
-> IO ()
vkGetPrivateDataEXT' (Device -> Ptr Device_T
deviceHandle (Device
device)) (ObjectType
objectType) ("objectHandle" ::: Word64
objectHandle) (PrivateDataSlotEXT
privateDataSlot) ("pData" ::: Ptr ("objectHandle" ::: Word64)
pPData)
  "objectHandle" ::: Word64
pData <- IO ("objectHandle" ::: Word64)
-> ContT ("objectHandle" ::: Word64) IO ("objectHandle" ::: Word64)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("objectHandle" ::: Word64)
 -> ContT
      ("objectHandle" ::: Word64) IO ("objectHandle" ::: Word64))
-> IO ("objectHandle" ::: Word64)
-> ContT ("objectHandle" ::: Word64) IO ("objectHandle" ::: Word64)
forall a b. (a -> b) -> a -> b
$ ("pData" ::: Ptr ("objectHandle" ::: Word64))
-> IO ("objectHandle" ::: Word64)
forall a. Storable a => Ptr a -> IO a
peek @Word64 "pData" ::: Ptr ("objectHandle" ::: Word64)
pPData
  ("objectHandle" ::: Word64)
-> ContT ("objectHandle" ::: Word64) IO ("objectHandle" ::: Word64)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("objectHandle" ::: Word64)
 -> ContT
      ("objectHandle" ::: Word64) IO ("objectHandle" ::: Word64))
-> ("objectHandle" ::: Word64)
-> ContT ("objectHandle" ::: Word64) IO ("objectHandle" ::: Word64)
forall a b. (a -> b) -> a -> b
$ ("objectHandle" ::: Word64
pData)


-- | VkDevicePrivateDataCreateInfoEXT - Reserve private data slots
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data DevicePrivateDataCreateInfoEXT = DevicePrivateDataCreateInfoEXT
  { -- | @privateDataSlotRequestCount@ is the amount of slots to reserve.
    DevicePrivateDataCreateInfoEXT -> Word32
privateDataSlotRequestCount :: Word32 }
  deriving (Typeable)
deriving instance Show DevicePrivateDataCreateInfoEXT

instance ToCStruct DevicePrivateDataCreateInfoEXT where
  withCStruct :: DevicePrivateDataCreateInfoEXT
-> (Ptr DevicePrivateDataCreateInfoEXT -> IO b) -> IO b
withCStruct x :: DevicePrivateDataCreateInfoEXT
x f :: Ptr DevicePrivateDataCreateInfoEXT -> IO b
f = Int -> Int -> (Ptr DevicePrivateDataCreateInfoEXT -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr DevicePrivateDataCreateInfoEXT -> IO b) -> IO b)
-> (Ptr DevicePrivateDataCreateInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr DevicePrivateDataCreateInfoEXT
p -> Ptr DevicePrivateDataCreateInfoEXT
-> DevicePrivateDataCreateInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DevicePrivateDataCreateInfoEXT
p DevicePrivateDataCreateInfoEXT
x (Ptr DevicePrivateDataCreateInfoEXT -> IO b
f Ptr DevicePrivateDataCreateInfoEXT
p)
  pokeCStruct :: Ptr DevicePrivateDataCreateInfoEXT
-> DevicePrivateDataCreateInfoEXT -> IO b -> IO b
pokeCStruct p :: Ptr DevicePrivateDataCreateInfoEXT
p DevicePrivateDataCreateInfoEXT{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DevicePrivateDataCreateInfoEXT
p Ptr DevicePrivateDataCreateInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DevicePrivateDataCreateInfoEXT
p Ptr DevicePrivateDataCreateInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DevicePrivateDataCreateInfoEXT
p Ptr DevicePrivateDataCreateInfoEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) (Word32
privateDataSlotRequestCount)
    IO b
f
  cStructSize :: Int
cStructSize = 24
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr DevicePrivateDataCreateInfoEXT -> IO b -> IO b
pokeZeroCStruct p :: Ptr DevicePrivateDataCreateInfoEXT
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DevicePrivateDataCreateInfoEXT
p Ptr DevicePrivateDataCreateInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DevicePrivateDataCreateInfoEXT
p Ptr DevicePrivateDataCreateInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DevicePrivateDataCreateInfoEXT
p Ptr DevicePrivateDataCreateInfoEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct DevicePrivateDataCreateInfoEXT where
  peekCStruct :: Ptr DevicePrivateDataCreateInfoEXT
-> IO DevicePrivateDataCreateInfoEXT
peekCStruct p :: Ptr DevicePrivateDataCreateInfoEXT
p = do
    Word32
privateDataSlotRequestCount <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr DevicePrivateDataCreateInfoEXT
p Ptr DevicePrivateDataCreateInfoEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32))
    DevicePrivateDataCreateInfoEXT -> IO DevicePrivateDataCreateInfoEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (DevicePrivateDataCreateInfoEXT
 -> IO DevicePrivateDataCreateInfoEXT)
-> DevicePrivateDataCreateInfoEXT
-> IO DevicePrivateDataCreateInfoEXT
forall a b. (a -> b) -> a -> b
$ Word32 -> DevicePrivateDataCreateInfoEXT
DevicePrivateDataCreateInfoEXT
             Word32
privateDataSlotRequestCount

instance Storable DevicePrivateDataCreateInfoEXT where
  sizeOf :: DevicePrivateDataCreateInfoEXT -> Int
sizeOf ~DevicePrivateDataCreateInfoEXT
_ = 24
  alignment :: DevicePrivateDataCreateInfoEXT -> Int
alignment ~DevicePrivateDataCreateInfoEXT
_ = 8
  peek :: Ptr DevicePrivateDataCreateInfoEXT
-> IO DevicePrivateDataCreateInfoEXT
peek = Ptr DevicePrivateDataCreateInfoEXT
-> IO DevicePrivateDataCreateInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr DevicePrivateDataCreateInfoEXT
-> DevicePrivateDataCreateInfoEXT -> IO ()
poke ptr :: Ptr DevicePrivateDataCreateInfoEXT
ptr poked :: DevicePrivateDataCreateInfoEXT
poked = Ptr DevicePrivateDataCreateInfoEXT
-> DevicePrivateDataCreateInfoEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DevicePrivateDataCreateInfoEXT
ptr DevicePrivateDataCreateInfoEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero DevicePrivateDataCreateInfoEXT where
  zero :: DevicePrivateDataCreateInfoEXT
zero = Word32 -> DevicePrivateDataCreateInfoEXT
DevicePrivateDataCreateInfoEXT
           Word32
forall a. Zero a => a
zero


-- | VkPrivateDataSlotCreateInfoEXT - Structure specifying the parameters of
-- private data slot construction
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'PrivateDataSlotCreateFlagsEXT',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'createPrivateDataSlotEXT'
data PrivateDataSlotCreateInfoEXT = PrivateDataSlotCreateInfoEXT
  { -- | @flags@ /must/ be @0@
    PrivateDataSlotCreateInfoEXT -> PrivateDataSlotCreateFlagsEXT
flags :: PrivateDataSlotCreateFlagsEXT }
  deriving (Typeable)
deriving instance Show PrivateDataSlotCreateInfoEXT

instance ToCStruct PrivateDataSlotCreateInfoEXT where
  withCStruct :: PrivateDataSlotCreateInfoEXT
-> (("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT) -> IO b)
-> IO b
withCStruct x :: PrivateDataSlotCreateInfoEXT
x f :: ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT) -> IO b
f = Int
-> Int
-> (("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT) -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT) -> IO b)
 -> IO b)
-> (("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT) -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT
p -> ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
-> PrivateDataSlotCreateInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT
p PrivateDataSlotCreateInfoEXT
x (("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT) -> IO b
f "pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT
p)
  pokeCStruct :: ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
-> PrivateDataSlotCreateInfoEXT -> IO b -> IO b
pokeCStruct p :: "pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT
p PrivateDataSlotCreateInfoEXT{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT
p ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT
p ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT
p ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
-> Int -> Ptr PrivateDataSlotCreateFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr PrivateDataSlotCreateFlagsEXT)) (PrivateDataSlotCreateFlagsEXT
flags)
    IO b
f
  cStructSize :: Int
cStructSize = 24
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
-> IO b -> IO b
pokeZeroCStruct p :: "pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT
p ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT
p ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT
p ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
-> Int -> Ptr PrivateDataSlotCreateFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr PrivateDataSlotCreateFlagsEXT)) (PrivateDataSlotCreateFlagsEXT
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct PrivateDataSlotCreateInfoEXT where
  peekCStruct :: ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
-> IO PrivateDataSlotCreateInfoEXT
peekCStruct p :: "pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT
p = do
    PrivateDataSlotCreateFlagsEXT
flags <- Ptr PrivateDataSlotCreateFlagsEXT
-> IO PrivateDataSlotCreateFlagsEXT
forall a. Storable a => Ptr a -> IO a
peek @PrivateDataSlotCreateFlagsEXT (("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT
p ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
-> Int -> Ptr PrivateDataSlotCreateFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr PrivateDataSlotCreateFlagsEXT))
    PrivateDataSlotCreateInfoEXT -> IO PrivateDataSlotCreateInfoEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PrivateDataSlotCreateInfoEXT -> IO PrivateDataSlotCreateInfoEXT)
-> PrivateDataSlotCreateInfoEXT -> IO PrivateDataSlotCreateInfoEXT
forall a b. (a -> b) -> a -> b
$ PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateInfoEXT
PrivateDataSlotCreateInfoEXT
             PrivateDataSlotCreateFlagsEXT
flags

instance Storable PrivateDataSlotCreateInfoEXT where
  sizeOf :: PrivateDataSlotCreateInfoEXT -> Int
sizeOf ~PrivateDataSlotCreateInfoEXT
_ = 24
  alignment :: PrivateDataSlotCreateInfoEXT -> Int
alignment ~PrivateDataSlotCreateInfoEXT
_ = 8
  peek :: ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
-> IO PrivateDataSlotCreateInfoEXT
peek = ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
-> IO PrivateDataSlotCreateInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
-> PrivateDataSlotCreateInfoEXT -> IO ()
poke ptr :: "pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT
ptr poked :: PrivateDataSlotCreateInfoEXT
poked = ("pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT)
-> PrivateDataSlotCreateInfoEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCreateInfo" ::: Ptr PrivateDataSlotCreateInfoEXT
ptr PrivateDataSlotCreateInfoEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PrivateDataSlotCreateInfoEXT where
  zero :: PrivateDataSlotCreateInfoEXT
zero = PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateInfoEXT
PrivateDataSlotCreateInfoEXT
           PrivateDataSlotCreateFlagsEXT
forall a. Zero a => a
zero


-- | VkPhysicalDevicePrivateDataFeaturesEXT - Structure specifying physical
-- device support
--
-- = Members
--
-- The members of the 'PhysicalDevicePrivateDataFeaturesEXT' structure
-- describe the following features:
--
-- = Description
--
-- If the 'PhysicalDevicePrivateDataFeaturesEXT' structure is included in
-- the @pNext@ chain of
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
-- it is filled with values indicating whether the feature is supported.
-- 'PhysicalDevicePrivateDataFeaturesEXT' /can/ also be used in the @pNext@
-- chain of 'Vulkan.Core10.Device.DeviceCreateInfo' to enable the features.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'Vulkan.Core10.BaseType.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDevicePrivateDataFeaturesEXT = PhysicalDevicePrivateDataFeaturesEXT
  { -- | @privateData@ indicates whether the implementation supports private
    -- data. See
    -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#private-data Private Data>.
    PhysicalDevicePrivateDataFeaturesEXT -> Bool
privateData :: Bool }
  deriving (Typeable)
deriving instance Show PhysicalDevicePrivateDataFeaturesEXT

instance ToCStruct PhysicalDevicePrivateDataFeaturesEXT where
  withCStruct :: PhysicalDevicePrivateDataFeaturesEXT
-> (Ptr PhysicalDevicePrivateDataFeaturesEXT -> IO b) -> IO b
withCStruct x :: PhysicalDevicePrivateDataFeaturesEXT
x f :: Ptr PhysicalDevicePrivateDataFeaturesEXT -> IO b
f = Int
-> Int
-> (Ptr PhysicalDevicePrivateDataFeaturesEXT -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr PhysicalDevicePrivateDataFeaturesEXT -> IO b) -> IO b)
-> (Ptr PhysicalDevicePrivateDataFeaturesEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDevicePrivateDataFeaturesEXT
p -> Ptr PhysicalDevicePrivateDataFeaturesEXT
-> PhysicalDevicePrivateDataFeaturesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePrivateDataFeaturesEXT
p PhysicalDevicePrivateDataFeaturesEXT
x (Ptr PhysicalDevicePrivateDataFeaturesEXT -> IO b
f Ptr PhysicalDevicePrivateDataFeaturesEXT
p)
  pokeCStruct :: Ptr PhysicalDevicePrivateDataFeaturesEXT
-> PhysicalDevicePrivateDataFeaturesEXT -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDevicePrivateDataFeaturesEXT
p PhysicalDevicePrivateDataFeaturesEXT{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePrivateDataFeaturesEXT
p Ptr PhysicalDevicePrivateDataFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePrivateDataFeaturesEXT
p Ptr PhysicalDevicePrivateDataFeaturesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePrivateDataFeaturesEXT
p Ptr PhysicalDevicePrivateDataFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
privateData))
    IO b
f
  cStructSize :: Int
cStructSize = 24
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr PhysicalDevicePrivateDataFeaturesEXT -> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDevicePrivateDataFeaturesEXT
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePrivateDataFeaturesEXT
p Ptr PhysicalDevicePrivateDataFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePrivateDataFeaturesEXT
p Ptr PhysicalDevicePrivateDataFeaturesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePrivateDataFeaturesEXT
p Ptr PhysicalDevicePrivateDataFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDevicePrivateDataFeaturesEXT where
  peekCStruct :: Ptr PhysicalDevicePrivateDataFeaturesEXT
-> IO PhysicalDevicePrivateDataFeaturesEXT
peekCStruct p :: Ptr PhysicalDevicePrivateDataFeaturesEXT
p = do
    Bool32
privateData <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDevicePrivateDataFeaturesEXT
p Ptr PhysicalDevicePrivateDataFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32))
    PhysicalDevicePrivateDataFeaturesEXT
-> IO PhysicalDevicePrivateDataFeaturesEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDevicePrivateDataFeaturesEXT
 -> IO PhysicalDevicePrivateDataFeaturesEXT)
-> PhysicalDevicePrivateDataFeaturesEXT
-> IO PhysicalDevicePrivateDataFeaturesEXT
forall a b. (a -> b) -> a -> b
$ Bool -> PhysicalDevicePrivateDataFeaturesEXT
PhysicalDevicePrivateDataFeaturesEXT
             (Bool32 -> Bool
bool32ToBool Bool32
privateData)

instance Storable PhysicalDevicePrivateDataFeaturesEXT where
  sizeOf :: PhysicalDevicePrivateDataFeaturesEXT -> Int
sizeOf ~PhysicalDevicePrivateDataFeaturesEXT
_ = 24
  alignment :: PhysicalDevicePrivateDataFeaturesEXT -> Int
alignment ~PhysicalDevicePrivateDataFeaturesEXT
_ = 8
  peek :: Ptr PhysicalDevicePrivateDataFeaturesEXT
-> IO PhysicalDevicePrivateDataFeaturesEXT
peek = Ptr PhysicalDevicePrivateDataFeaturesEXT
-> IO PhysicalDevicePrivateDataFeaturesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDevicePrivateDataFeaturesEXT
-> PhysicalDevicePrivateDataFeaturesEXT -> IO ()
poke ptr :: Ptr PhysicalDevicePrivateDataFeaturesEXT
ptr poked :: PhysicalDevicePrivateDataFeaturesEXT
poked = Ptr PhysicalDevicePrivateDataFeaturesEXT
-> PhysicalDevicePrivateDataFeaturesEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePrivateDataFeaturesEXT
ptr PhysicalDevicePrivateDataFeaturesEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PhysicalDevicePrivateDataFeaturesEXT where
  zero :: PhysicalDevicePrivateDataFeaturesEXT
zero = Bool -> PhysicalDevicePrivateDataFeaturesEXT
PhysicalDevicePrivateDataFeaturesEXT
           Bool
forall a. Zero a => a
zero


-- | VkPrivateDataSlotCreateFlagBitsEXT - Bitmask specifying additional
-- parameters for private data slot creation
--
-- = See Also
--
-- 'PrivateDataSlotCreateFlagsEXT'
newtype PrivateDataSlotCreateFlagBitsEXT = PrivateDataSlotCreateFlagBitsEXT Flags
  deriving newtype (PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> Bool
(PrivateDataSlotCreateFlagsEXT
 -> PrivateDataSlotCreateFlagsEXT -> Bool)
-> (PrivateDataSlotCreateFlagsEXT
    -> PrivateDataSlotCreateFlagsEXT -> Bool)
-> Eq PrivateDataSlotCreateFlagsEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> Bool
$c/= :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> Bool
== :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> Bool
$c== :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> Bool
Eq, Eq PrivateDataSlotCreateFlagsEXT
Eq PrivateDataSlotCreateFlagsEXT =>
(PrivateDataSlotCreateFlagsEXT
 -> PrivateDataSlotCreateFlagsEXT -> Ordering)
-> (PrivateDataSlotCreateFlagsEXT
    -> PrivateDataSlotCreateFlagsEXT -> Bool)
-> (PrivateDataSlotCreateFlagsEXT
    -> PrivateDataSlotCreateFlagsEXT -> Bool)
-> (PrivateDataSlotCreateFlagsEXT
    -> PrivateDataSlotCreateFlagsEXT -> Bool)
-> (PrivateDataSlotCreateFlagsEXT
    -> PrivateDataSlotCreateFlagsEXT -> Bool)
-> (PrivateDataSlotCreateFlagsEXT
    -> PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT)
-> (PrivateDataSlotCreateFlagsEXT
    -> PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT)
-> Ord PrivateDataSlotCreateFlagsEXT
PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> Bool
PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> Ordering
PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT
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 :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT
$cmin :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT
max :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT
$cmax :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT
>= :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> Bool
$c>= :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> Bool
> :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> Bool
$c> :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> Bool
<= :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> Bool
$c<= :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> Bool
< :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> Bool
$c< :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> Bool
compare :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> Ordering
$ccompare :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> Ordering
$cp1Ord :: Eq PrivateDataSlotCreateFlagsEXT
Ord, Ptr b -> Int -> IO PrivateDataSlotCreateFlagsEXT
Ptr b -> Int -> PrivateDataSlotCreateFlagsEXT -> IO ()
Ptr PrivateDataSlotCreateFlagsEXT
-> IO PrivateDataSlotCreateFlagsEXT
Ptr PrivateDataSlotCreateFlagsEXT
-> Int -> IO PrivateDataSlotCreateFlagsEXT
Ptr PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT -> IO ()
Ptr PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> IO ()
PrivateDataSlotCreateFlagsEXT -> Int
(PrivateDataSlotCreateFlagsEXT -> Int)
-> (PrivateDataSlotCreateFlagsEXT -> Int)
-> (Ptr PrivateDataSlotCreateFlagsEXT
    -> Int -> IO PrivateDataSlotCreateFlagsEXT)
-> (Ptr PrivateDataSlotCreateFlagsEXT
    -> Int -> PrivateDataSlotCreateFlagsEXT -> IO ())
-> (forall b. Ptr b -> Int -> IO PrivateDataSlotCreateFlagsEXT)
-> (forall b.
    Ptr b -> Int -> PrivateDataSlotCreateFlagsEXT -> IO ())
-> (Ptr PrivateDataSlotCreateFlagsEXT
    -> IO PrivateDataSlotCreateFlagsEXT)
-> (Ptr PrivateDataSlotCreateFlagsEXT
    -> PrivateDataSlotCreateFlagsEXT -> IO ())
-> Storable PrivateDataSlotCreateFlagsEXT
forall b. Ptr b -> Int -> IO PrivateDataSlotCreateFlagsEXT
forall b. Ptr b -> Int -> PrivateDataSlotCreateFlagsEXT -> 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 PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> IO ()
$cpoke :: Ptr PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> IO ()
peek :: Ptr PrivateDataSlotCreateFlagsEXT
-> IO PrivateDataSlotCreateFlagsEXT
$cpeek :: Ptr PrivateDataSlotCreateFlagsEXT
-> IO PrivateDataSlotCreateFlagsEXT
pokeByteOff :: Ptr b -> Int -> PrivateDataSlotCreateFlagsEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> PrivateDataSlotCreateFlagsEXT -> IO ()
peekByteOff :: Ptr b -> Int -> IO PrivateDataSlotCreateFlagsEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PrivateDataSlotCreateFlagsEXT
pokeElemOff :: Ptr PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT -> IO ()
$cpokeElemOff :: Ptr PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT -> IO ()
peekElemOff :: Ptr PrivateDataSlotCreateFlagsEXT
-> Int -> IO PrivateDataSlotCreateFlagsEXT
$cpeekElemOff :: Ptr PrivateDataSlotCreateFlagsEXT
-> Int -> IO PrivateDataSlotCreateFlagsEXT
alignment :: PrivateDataSlotCreateFlagsEXT -> Int
$calignment :: PrivateDataSlotCreateFlagsEXT -> Int
sizeOf :: PrivateDataSlotCreateFlagsEXT -> Int
$csizeOf :: PrivateDataSlotCreateFlagsEXT -> Int
Storable, PrivateDataSlotCreateFlagsEXT
PrivateDataSlotCreateFlagsEXT -> Zero PrivateDataSlotCreateFlagsEXT
forall a. a -> Zero a
zero :: PrivateDataSlotCreateFlagsEXT
$czero :: PrivateDataSlotCreateFlagsEXT
Zero, Eq PrivateDataSlotCreateFlagsEXT
PrivateDataSlotCreateFlagsEXT
Eq PrivateDataSlotCreateFlagsEXT =>
(PrivateDataSlotCreateFlagsEXT
 -> PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT)
-> (PrivateDataSlotCreateFlagsEXT
    -> PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT)
-> (PrivateDataSlotCreateFlagsEXT
    -> PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT)
-> (PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT)
-> (PrivateDataSlotCreateFlagsEXT
    -> Int -> PrivateDataSlotCreateFlagsEXT)
-> (PrivateDataSlotCreateFlagsEXT
    -> Int -> PrivateDataSlotCreateFlagsEXT)
-> PrivateDataSlotCreateFlagsEXT
-> (Int -> PrivateDataSlotCreateFlagsEXT)
-> (PrivateDataSlotCreateFlagsEXT
    -> Int -> PrivateDataSlotCreateFlagsEXT)
-> (PrivateDataSlotCreateFlagsEXT
    -> Int -> PrivateDataSlotCreateFlagsEXT)
-> (PrivateDataSlotCreateFlagsEXT
    -> Int -> PrivateDataSlotCreateFlagsEXT)
-> (PrivateDataSlotCreateFlagsEXT -> Int -> Bool)
-> (PrivateDataSlotCreateFlagsEXT -> Maybe Int)
-> (PrivateDataSlotCreateFlagsEXT -> Int)
-> (PrivateDataSlotCreateFlagsEXT -> Bool)
-> (PrivateDataSlotCreateFlagsEXT
    -> Int -> PrivateDataSlotCreateFlagsEXT)
-> (PrivateDataSlotCreateFlagsEXT
    -> Int -> PrivateDataSlotCreateFlagsEXT)
-> (PrivateDataSlotCreateFlagsEXT
    -> Int -> PrivateDataSlotCreateFlagsEXT)
-> (PrivateDataSlotCreateFlagsEXT
    -> Int -> PrivateDataSlotCreateFlagsEXT)
-> (PrivateDataSlotCreateFlagsEXT
    -> Int -> PrivateDataSlotCreateFlagsEXT)
-> (PrivateDataSlotCreateFlagsEXT
    -> Int -> PrivateDataSlotCreateFlagsEXT)
-> (PrivateDataSlotCreateFlagsEXT -> Int)
-> Bits PrivateDataSlotCreateFlagsEXT
Int -> PrivateDataSlotCreateFlagsEXT
PrivateDataSlotCreateFlagsEXT -> Bool
PrivateDataSlotCreateFlagsEXT -> Int
PrivateDataSlotCreateFlagsEXT -> Maybe Int
PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT
PrivateDataSlotCreateFlagsEXT -> Int -> Bool
PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT
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 :: PrivateDataSlotCreateFlagsEXT -> Int
$cpopCount :: PrivateDataSlotCreateFlagsEXT -> Int
rotateR :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
$crotateR :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
rotateL :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
$crotateL :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
unsafeShiftR :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
$cunsafeShiftR :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
shiftR :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
$cshiftR :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
unsafeShiftL :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
$cunsafeShiftL :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
shiftL :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
$cshiftL :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
isSigned :: PrivateDataSlotCreateFlagsEXT -> Bool
$cisSigned :: PrivateDataSlotCreateFlagsEXT -> Bool
bitSize :: PrivateDataSlotCreateFlagsEXT -> Int
$cbitSize :: PrivateDataSlotCreateFlagsEXT -> Int
bitSizeMaybe :: PrivateDataSlotCreateFlagsEXT -> Maybe Int
$cbitSizeMaybe :: PrivateDataSlotCreateFlagsEXT -> Maybe Int
testBit :: PrivateDataSlotCreateFlagsEXT -> Int -> Bool
$ctestBit :: PrivateDataSlotCreateFlagsEXT -> Int -> Bool
complementBit :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
$ccomplementBit :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
clearBit :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
$cclearBit :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
setBit :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
$csetBit :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
bit :: Int -> PrivateDataSlotCreateFlagsEXT
$cbit :: Int -> PrivateDataSlotCreateFlagsEXT
zeroBits :: PrivateDataSlotCreateFlagsEXT
$czeroBits :: PrivateDataSlotCreateFlagsEXT
rotate :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
$crotate :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
shift :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
$cshift :: PrivateDataSlotCreateFlagsEXT
-> Int -> PrivateDataSlotCreateFlagsEXT
complement :: PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT
$ccomplement :: PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT
xor :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT
$cxor :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT
.|. :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT
$c.|. :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT
.&. :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT
$c.&. :: PrivateDataSlotCreateFlagsEXT
-> PrivateDataSlotCreateFlagsEXT -> PrivateDataSlotCreateFlagsEXT
$cp1Bits :: Eq PrivateDataSlotCreateFlagsEXT
Bits)



type PrivateDataSlotCreateFlagsEXT = PrivateDataSlotCreateFlagBitsEXT

instance Show PrivateDataSlotCreateFlagBitsEXT where
  showsPrec :: Int -> PrivateDataSlotCreateFlagsEXT -> ShowS
showsPrec p :: Int
p = \case
    PrivateDataSlotCreateFlagBitsEXT x :: Word32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "PrivateDataSlotCreateFlagBitsEXT 0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word32 -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Word32
x)

instance Read PrivateDataSlotCreateFlagBitsEXT where
  readPrec :: ReadPrec PrivateDataSlotCreateFlagsEXT
readPrec = ReadPrec PrivateDataSlotCreateFlagsEXT
-> ReadPrec PrivateDataSlotCreateFlagsEXT
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec PrivateDataSlotCreateFlagsEXT)]
-> ReadPrec PrivateDataSlotCreateFlagsEXT
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose []
                     ReadPrec PrivateDataSlotCreateFlagsEXT
-> ReadPrec PrivateDataSlotCreateFlagsEXT
-> ReadPrec PrivateDataSlotCreateFlagsEXT
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec PrivateDataSlotCreateFlagsEXT
-> ReadPrec PrivateDataSlotCreateFlagsEXT
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "PrivateDataSlotCreateFlagBitsEXT")
                       Word32
v <- ReadPrec Word32 -> ReadPrec Word32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Word32
forall a. Read a => ReadPrec a
readPrec
                       PrivateDataSlotCreateFlagsEXT
-> ReadPrec PrivateDataSlotCreateFlagsEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Word32 -> PrivateDataSlotCreateFlagsEXT
PrivateDataSlotCreateFlagBitsEXT Word32
v)))


type EXT_PRIVATE_DATA_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_EXT_PRIVATE_DATA_SPEC_VERSION"
pattern EXT_PRIVATE_DATA_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_PRIVATE_DATA_SPEC_VERSION :: a
$mEXT_PRIVATE_DATA_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
EXT_PRIVATE_DATA_SPEC_VERSION = 1


type EXT_PRIVATE_DATA_EXTENSION_NAME = "VK_EXT_private_data"

-- No documentation found for TopLevel "VK_EXT_PRIVATE_DATA_EXTENSION_NAME"
pattern EXT_PRIVATE_DATA_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_PRIVATE_DATA_EXTENSION_NAME :: a
$mEXT_PRIVATE_DATA_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_PRIVATE_DATA_EXTENSION_NAME = "VK_EXT_private_data"