{-# language CPP #-}
module Vulkan.Extensions.VK_KHR_pipeline_binary ( createPipelineBinariesKHR
, destroyPipelineBinaryKHR
, getPipelineKeyKHR
, getPipelineBinaryDataKHR
, releaseCapturedPipelineDataKHR
, PipelineBinaryCreateInfoKHR(..)
, PipelineBinaryHandlesInfoKHR(..)
, PipelineBinaryDataKHR(..)
, PipelineBinaryKeysAndDataKHR(..)
, PipelineBinaryKeyKHR(..)
, PipelineBinaryInfoKHR(..)
, ReleaseCapturedPipelineDataInfoKHR(..)
, PipelineBinaryDataInfoKHR(..)
, PipelineCreateInfoKHR(..)
, PhysicalDevicePipelineBinaryFeaturesKHR(..)
, DevicePipelineBinaryInternalCacheControlKHR(..)
, PhysicalDevicePipelineBinaryPropertiesKHR(..)
, KHR_PIPELINE_BINARY_SPEC_VERSION
, pattern KHR_PIPELINE_BINARY_SPEC_VERSION
, KHR_PIPELINE_BINARY_EXTENSION_NAME
, pattern KHR_PIPELINE_BINARY_EXTENSION_NAME
, PipelineBinaryKHR(..)
, MAX_PIPELINE_BINARY_KEY_SIZE_KHR
, pattern MAX_PIPELINE_BINARY_KEY_SIZE_KHR
) where
import Vulkan.CStruct.Utils (FixedArray)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import Foreign.Marshal.Utils (maybePeek)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (castPtr)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import Data.ByteString (packCStringLen)
import Data.Coerce (coerce)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Data.Vector (generateM)
import qualified Data.Vector (imapM_)
import qualified Data.Vector (length)
import Foreign.C.Types (CSize(..))
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.C.Types (CChar)
import Foreign.C.Types (CSize)
import Foreign.C.Types (CSize(..))
import Foreign.C.Types (CSize(CSize))
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import Data.Word (Word32)
import Data.Word (Word64)
import Data.Word (Word8)
import Data.ByteString (ByteString)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.CStruct.Utils (peekByteStringFromSizedVectorPtr)
import Vulkan.CStruct.Utils (pokeFixedLengthByteString)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.Handles (Device(Device))
import Vulkan.Dynamic (DeviceCmds(pVkCreatePipelineBinariesKHR))
import Vulkan.Dynamic (DeviceCmds(pVkDestroyPipelineBinaryKHR))
import Vulkan.Dynamic (DeviceCmds(pVkGetPipelineBinaryDataKHR))
import Vulkan.Dynamic (DeviceCmds(pVkGetPipelineKeyKHR))
import Vulkan.Dynamic (DeviceCmds(pVkReleaseCapturedPipelineDataKHR))
import Vulkan.Core10.Handles (Device_T)
import Vulkan.Core10.APIConstants (MAX_PIPELINE_BINARY_KEY_SIZE_KHR)
import Vulkan.Core10.Handles (Pipeline)
import Vulkan.Extensions.Handles (PipelineBinaryKHR)
import Vulkan.Extensions.Handles (PipelineBinaryKHR(..))
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DEVICE_PIPELINE_BINARY_INTERNAL_CACHE_CONTROL_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_BINARY_FEATURES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_BINARY_PROPERTIES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_BINARY_CREATE_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_BINARY_DATA_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_BINARY_HANDLES_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_BINARY_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_BINARY_KEY_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_CREATE_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_RELEASE_CAPTURED_PIPELINE_DATA_INFO_KHR))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Core10.APIConstants (MAX_PIPELINE_BINARY_KEY_SIZE_KHR)
import Vulkan.Extensions.Handles (PipelineBinaryKHR(..))
import Vulkan.Core10.APIConstants (pattern MAX_PIPELINE_BINARY_KEY_SIZE_KHR)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCreatePipelineBinariesKHR
:: FunPtr (Ptr Device_T -> Ptr PipelineBinaryCreateInfoKHR -> Ptr AllocationCallbacks -> Ptr PipelineBinaryHandlesInfoKHR -> IO Result) -> Ptr Device_T -> Ptr PipelineBinaryCreateInfoKHR -> Ptr AllocationCallbacks -> Ptr PipelineBinaryHandlesInfoKHR -> IO Result
createPipelineBinariesKHR :: forall io
. (MonadIO io)
=>
Device
->
PipelineBinaryCreateInfoKHR
->
("allocator" ::: Maybe AllocationCallbacks)
-> io (Result, ("binaries" ::: PipelineBinaryHandlesInfoKHR))
createPipelineBinariesKHR :: forall (io :: * -> *).
MonadIO io =>
Device
-> PipelineBinaryCreateInfoKHR
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
createPipelineBinariesKHR Device
device PipelineBinaryCreateInfoKHR
createInfo "allocator" ::: Maybe AllocationCallbacks
allocator = IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
-> io (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
-> io (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> (ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
IO
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
IO
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
-> io (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
IO
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
IO
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
-> io (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
IO
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
-> io (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
forall a b. (a -> b) -> a -> b
$ do
let vkCreatePipelineBinariesKHRPtr :: FunPtr
(Ptr Device_T
-> Ptr PipelineBinaryCreateInfoKHR
-> Ptr AllocationCallbacks
-> Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO Result)
vkCreatePipelineBinariesKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> Ptr PipelineBinaryCreateInfoKHR
-> Ptr AllocationCallbacks
-> Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO Result)
pVkCreatePipelineBinariesKHR (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO ()
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR) IO ()
forall (m :: * -> *) a.
Monad m =>
m a
-> ContT (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR) m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR) IO ())
-> IO ()
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> Ptr PipelineBinaryCreateInfoKHR
-> Ptr AllocationCallbacks
-> Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO Result)
vkCreatePipelineBinariesKHRPtr FunPtr
(Ptr Device_T
-> Ptr PipelineBinaryCreateInfoKHR
-> Ptr AllocationCallbacks
-> Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO Result)
-> FunPtr
(Ptr Device_T
-> Ptr PipelineBinaryCreateInfoKHR
-> Ptr AllocationCallbacks
-> Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> Ptr PipelineBinaryCreateInfoKHR
-> Ptr AllocationCallbacks
-> Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. (HasCallStack, 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 String
"" String
"The function pointer for vkCreatePipelineBinariesKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCreatePipelineBinariesKHR' :: Ptr Device_T
-> Ptr PipelineBinaryCreateInfoKHR
-> Ptr AllocationCallbacks
-> Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO Result
vkCreatePipelineBinariesKHR' = FunPtr
(Ptr Device_T
-> Ptr PipelineBinaryCreateInfoKHR
-> Ptr AllocationCallbacks
-> Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO Result)
-> Ptr Device_T
-> Ptr PipelineBinaryCreateInfoKHR
-> Ptr AllocationCallbacks
-> Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO Result
mkVkCreatePipelineBinariesKHR FunPtr
(Ptr Device_T
-> Ptr PipelineBinaryCreateInfoKHR
-> Ptr AllocationCallbacks
-> Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO Result)
vkCreatePipelineBinariesKHRPtr
pCreateInfo <- ((Ptr PipelineBinaryCreateInfoKHR
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
IO
(Ptr PipelineBinaryCreateInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr PipelineBinaryCreateInfoKHR
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
IO
(Ptr PipelineBinaryCreateInfoKHR))
-> ((Ptr PipelineBinaryCreateInfoKHR
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
IO
(Ptr PipelineBinaryCreateInfoKHR)
forall a b. (a -> b) -> a -> b
$ PipelineBinaryCreateInfoKHR
-> (Ptr PipelineBinaryCreateInfoKHR
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
PipelineBinaryCreateInfoKHR
-> (Ptr PipelineBinaryCreateInfoKHR -> IO b) -> IO b
withCStruct (PipelineBinaryCreateInfoKHR
createInfo)
pAllocator <- case (allocator) of
"allocator" ::: Maybe AllocationCallbacks
Nothing -> Ptr AllocationCallbacks
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
IO
(Ptr AllocationCallbacks)
forall a.
a
-> ContT (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR) IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> ((Ptr AllocationCallbacks
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
IO
(Ptr AllocationCallbacks)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr AllocationCallbacks
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
IO
(Ptr AllocationCallbacks))
-> ((Ptr AllocationCallbacks
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
IO
(Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks
-> (Ptr AllocationCallbacks
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
AllocationCallbacks -> (Ptr AllocationCallbacks -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
pPBinaries <- ContT (withZeroCStruct @PipelineBinaryHandlesInfoKHR)
r <- lift $ traceAroundEvent "vkCreatePipelineBinariesKHR" (vkCreatePipelineBinariesKHR'
(deviceHandle (device))
pCreateInfo
pAllocator
(pPBinaries))
lift $ when (r < SUCCESS) (throwIO (VulkanException r))
pBinaries <- lift $ peekCStruct @PipelineBinaryHandlesInfoKHR pPBinaries
pure $ (r, pBinaries)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkDestroyPipelineBinaryKHR
:: FunPtr (Ptr Device_T -> PipelineBinaryKHR -> Ptr AllocationCallbacks -> IO ()) -> Ptr Device_T -> PipelineBinaryKHR -> Ptr AllocationCallbacks -> IO ()
destroyPipelineBinaryKHR :: forall io
. (MonadIO io)
=>
Device
->
PipelineBinaryKHR
->
("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyPipelineBinaryKHR :: forall (io :: * -> *).
MonadIO io =>
Device
-> PipelineBinaryKHR
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyPipelineBinaryKHR Device
device
PipelineBinaryKHR
pipelineBinary
"allocator" ::: Maybe AllocationCallbacks
allocator = IO () -> io ()
forall a. IO a -> io a
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 vkDestroyPipelineBinaryKHRPtr :: FunPtr
(Ptr Device_T
-> PipelineBinaryKHR -> Ptr AllocationCallbacks -> IO ())
vkDestroyPipelineBinaryKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> PipelineBinaryKHR -> Ptr AllocationCallbacks -> IO ())
pVkDestroyPipelineBinaryKHR (case Device
device of Device{DeviceCmds
deviceCmds :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT () IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT () m a
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
-> PipelineBinaryKHR -> Ptr AllocationCallbacks -> IO ())
vkDestroyPipelineBinaryKHRPtr FunPtr
(Ptr Device_T
-> PipelineBinaryKHR -> Ptr AllocationCallbacks -> IO ())
-> FunPtr
(Ptr Device_T
-> PipelineBinaryKHR -> Ptr AllocationCallbacks -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> PipelineBinaryKHR -> Ptr AllocationCallbacks -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. (HasCallStack, 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 String
"" String
"The function pointer for vkDestroyPipelineBinaryKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkDestroyPipelineBinaryKHR' :: Ptr Device_T
-> PipelineBinaryKHR -> Ptr AllocationCallbacks -> IO ()
vkDestroyPipelineBinaryKHR' = FunPtr
(Ptr Device_T
-> PipelineBinaryKHR -> Ptr AllocationCallbacks -> IO ())
-> Ptr Device_T
-> PipelineBinaryKHR
-> Ptr AllocationCallbacks
-> IO ()
mkVkDestroyPipelineBinaryKHR FunPtr
(Ptr Device_T
-> PipelineBinaryKHR -> Ptr AllocationCallbacks -> IO ())
vkDestroyPipelineBinaryKHRPtr
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
"allocator" ::: Maybe AllocationCallbacks
Nothing -> Ptr AllocationCallbacks -> ContT () IO (Ptr AllocationCallbacks)
forall a. a -> ContT () IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> ((Ptr AllocationCallbacks -> IO ()) -> IO ())
-> ContT () IO (Ptr AllocationCallbacks)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr AllocationCallbacks -> IO ()) -> IO ())
-> ContT () IO (Ptr AllocationCallbacks))
-> ((Ptr AllocationCallbacks -> IO ()) -> IO ())
-> ContT () IO (Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks -> (Ptr AllocationCallbacks -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
AllocationCallbacks -> (Ptr AllocationCallbacks -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
lift $ traceAroundEvent "vkDestroyPipelineBinaryKHR" (vkDestroyPipelineBinaryKHR'
(deviceHandle (device))
(pipelineBinary)
pAllocator)
pure $ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPipelineKeyKHR
:: FunPtr (Ptr Device_T -> Ptr PipelineCreateInfoKHR -> Ptr PipelineBinaryKeyKHR -> IO Result) -> Ptr Device_T -> Ptr PipelineCreateInfoKHR -> Ptr PipelineBinaryKeyKHR -> IO Result
getPipelineKeyKHR :: forall io
. (MonadIO io)
=>
Device
->
("pipelineCreateInfo" ::: Maybe PipelineCreateInfoKHR)
-> io (("pipelineKey" ::: PipelineBinaryKeyKHR))
getPipelineKeyKHR :: forall (io :: * -> *).
MonadIO io =>
Device
-> ("pipelineCreateInfo" ::: Maybe PipelineCreateInfoKHR)
-> io ("pipelineKey" ::: PipelineBinaryKeyKHR)
getPipelineKeyKHR Device
device "pipelineCreateInfo" ::: Maybe PipelineCreateInfoKHR
pipelineCreateInfo = IO ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> io ("pipelineKey" ::: PipelineBinaryKeyKHR)
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> io ("pipelineKey" ::: PipelineBinaryKeyKHR))
-> (ContT
("pipelineKey" ::: PipelineBinaryKeyKHR)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR))
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR)
-> io ("pipelineKey" ::: PipelineBinaryKeyKHR)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
("pipelineKey" ::: PipelineBinaryKeyKHR)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
("pipelineKey" ::: PipelineBinaryKeyKHR)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR)
-> io ("pipelineKey" ::: PipelineBinaryKeyKHR))
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR)
-> io ("pipelineKey" ::: PipelineBinaryKeyKHR)
forall a b. (a -> b) -> a -> b
$ do
let vkGetPipelineKeyKHRPtr :: FunPtr
(Ptr Device_T
-> Ptr PipelineCreateInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO Result)
vkGetPipelineKeyKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> Ptr PipelineCreateInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO Result)
pVkGetPipelineKeyKHR (case Device
device of Device{DeviceCmds
deviceCmds :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT ("pipelineKey" ::: PipelineBinaryKeyKHR) IO ()
forall (m :: * -> *) a.
Monad m =>
m a -> ContT ("pipelineKey" ::: PipelineBinaryKeyKHR) m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT ("pipelineKey" ::: PipelineBinaryKeyKHR) IO ())
-> IO () -> ContT ("pipelineKey" ::: PipelineBinaryKeyKHR) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> Ptr PipelineCreateInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO Result)
vkGetPipelineKeyKHRPtr FunPtr
(Ptr Device_T
-> Ptr PipelineCreateInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO Result)
-> FunPtr
(Ptr Device_T
-> Ptr PipelineCreateInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> Ptr PipelineCreateInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. (HasCallStack, 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 String
"" String
"The function pointer for vkGetPipelineKeyKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetPipelineKeyKHR' :: Ptr Device_T
-> Ptr PipelineCreateInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO Result
vkGetPipelineKeyKHR' = FunPtr
(Ptr Device_T
-> Ptr PipelineCreateInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO Result)
-> Ptr Device_T
-> Ptr PipelineCreateInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO Result
mkVkGetPipelineKeyKHR FunPtr
(Ptr Device_T
-> Ptr PipelineCreateInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO Result)
vkGetPipelineKeyKHRPtr
pPipelineCreateInfo <- case ("pipelineCreateInfo" ::: Maybe PipelineCreateInfoKHR
pipelineCreateInfo) of
"pipelineCreateInfo" ::: Maybe PipelineCreateInfoKHR
Nothing -> Ptr PipelineCreateInfoKHR
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR)
IO
(Ptr PipelineCreateInfoKHR)
forall a. a -> ContT ("pipelineKey" ::: PipelineBinaryKeyKHR) IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr PipelineCreateInfoKHR
forall a. Ptr a
nullPtr
Just PipelineCreateInfoKHR
j -> ((Ptr PipelineCreateInfoKHR
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR))
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR))
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR)
IO
(Ptr PipelineCreateInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr PipelineCreateInfoKHR
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR))
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR))
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR)
IO
(Ptr PipelineCreateInfoKHR))
-> ((Ptr PipelineCreateInfoKHR
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR))
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR))
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR)
IO
(Ptr PipelineCreateInfoKHR)
forall a b. (a -> b) -> a -> b
$ PipelineCreateInfoKHR
-> (Ptr PipelineCreateInfoKHR
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR))
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
PipelineCreateInfoKHR
-> (Ptr PipelineCreateInfoKHR -> IO b) -> IO b
withCStruct (PipelineCreateInfoKHR
j)
pPPipelineKey <- ContT (withZeroCStruct @PipelineBinaryKeyKHR)
r <- lift $ traceAroundEvent "vkGetPipelineKeyKHR" (vkGetPipelineKeyKHR'
(deviceHandle (device))
pPipelineCreateInfo
(pPPipelineKey))
lift $ when (r < SUCCESS) (throwIO (VulkanException r))
pPipelineKey <- lift $ peekCStruct @PipelineBinaryKeyKHR pPPipelineKey
pure $ (pPipelineKey)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPipelineBinaryDataKHR
:: FunPtr (Ptr Device_T -> Ptr PipelineBinaryDataInfoKHR -> Ptr PipelineBinaryKeyKHR -> Ptr CSize -> Ptr () -> IO Result) -> Ptr Device_T -> Ptr PipelineBinaryDataInfoKHR -> Ptr PipelineBinaryKeyKHR -> Ptr CSize -> Ptr () -> IO Result
getPipelineBinaryDataKHR :: forall io
. (MonadIO io)
=>
Device
->
PipelineBinaryDataInfoKHR
-> io (PipelineBinaryKeyKHR, ("pipelineBinaryData" ::: ByteString))
getPipelineBinaryDataKHR :: forall (io :: * -> *).
MonadIO io =>
Device
-> PipelineBinaryDataInfoKHR
-> io
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
getPipelineBinaryDataKHR Device
device PipelineBinaryDataInfoKHR
info = IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
-> io
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
-> io
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> (ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
-> io
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
-> io
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
-> io
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
forall a b. (a -> b) -> a -> b
$ do
let vkGetPipelineBinaryDataKHRPtr :: FunPtr
(Ptr Device_T
-> Ptr PipelineBinaryDataInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Ptr CSize
-> Ptr ()
-> IO Result)
vkGetPipelineBinaryDataKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> Ptr PipelineBinaryDataInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Ptr CSize
-> Ptr ()
-> IO Result)
pVkGetPipelineBinaryDataKHR (case Device
device of Device{DeviceCmds
deviceCmds :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO ()
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
()
forall (m :: * -> *) a.
Monad m =>
m a
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
m
a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
())
-> IO ()
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> Ptr PipelineBinaryDataInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Ptr CSize
-> Ptr ()
-> IO Result)
vkGetPipelineBinaryDataKHRPtr FunPtr
(Ptr Device_T
-> Ptr PipelineBinaryDataInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Ptr CSize
-> Ptr ()
-> IO Result)
-> FunPtr
(Ptr Device_T
-> Ptr PipelineBinaryDataInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Ptr CSize
-> Ptr ()
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> Ptr PipelineBinaryDataInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Ptr CSize
-> Ptr ()
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. (HasCallStack, 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 String
"" String
"The function pointer for vkGetPipelineBinaryDataKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetPipelineBinaryDataKHR' :: Ptr Device_T
-> Ptr PipelineBinaryDataInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Ptr CSize
-> Ptr ()
-> IO Result
vkGetPipelineBinaryDataKHR' = FunPtr
(Ptr Device_T
-> Ptr PipelineBinaryDataInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Ptr CSize
-> Ptr ()
-> IO Result)
-> Ptr Device_T
-> Ptr PipelineBinaryDataInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Ptr CSize
-> Ptr ()
-> IO Result
mkVkGetPipelineBinaryDataKHR FunPtr
(Ptr Device_T
-> Ptr PipelineBinaryDataInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Ptr CSize
-> Ptr ()
-> IO Result)
vkGetPipelineBinaryDataKHRPtr
let device' :: Ptr Device_T
device' = Device -> Ptr Device_T
deviceHandle (Device
device)
pInfo <- ((Ptr PipelineBinaryDataInfoKHR
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
(Ptr PipelineBinaryDataInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr PipelineBinaryDataInfoKHR
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
(Ptr PipelineBinaryDataInfoKHR))
-> ((Ptr PipelineBinaryDataInfoKHR
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
(Ptr PipelineBinaryDataInfoKHR)
forall a b. (a -> b) -> a -> b
$ PipelineBinaryDataInfoKHR
-> (Ptr PipelineBinaryDataInfoKHR
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
PipelineBinaryDataInfoKHR
-> (Ptr PipelineBinaryDataInfoKHR -> IO b) -> IO b
withCStruct (PipelineBinaryDataInfoKHR
info)
pPPipelineBinaryKey <- ContT (withZeroCStruct @PipelineBinaryKeyKHR)
pPPipelineBinaryDataSize <- ContT $ bracket (callocBytes @CSize 8) free
r <- lift $ traceAroundEvent "vkGetPipelineBinaryDataKHR" (vkGetPipelineBinaryDataKHR'
device'
pInfo
(pPPipelineBinaryKey)
(pPPipelineBinaryDataSize)
(nullPtr))
lift $ when (r < SUCCESS) (throwIO (VulkanException r))
pPipelineBinaryDataSize <- lift $ peek @CSize pPPipelineBinaryDataSize
pPPipelineBinaryData <- ContT $ bracket (callocBytes @(()) (fromIntegral ((coerce @CSize @Word64 pPipelineBinaryDataSize)))) free
r' <- lift $ traceAroundEvent "vkGetPipelineBinaryDataKHR" (vkGetPipelineBinaryDataKHR'
device'
pInfo
(pPPipelineBinaryKey)
(pPPipelineBinaryDataSize)
(pPPipelineBinaryData))
lift $ when (r' < SUCCESS) (throwIO (VulkanException r'))
pPipelineBinaryKey <- lift $ peekCStruct @PipelineBinaryKeyKHR pPPipelineBinaryKey
pPipelineBinaryDataSize'' <- lift $ peek @CSize pPPipelineBinaryDataSize
pPipelineBinaryData' <- lift $ packCStringLen ( castPtr @() @CChar pPPipelineBinaryData
, (fromIntegral ((coerce @CSize @Word64 pPipelineBinaryDataSize''))) )
pure $ (pPipelineBinaryKey, pPipelineBinaryData')
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkReleaseCapturedPipelineDataKHR
:: FunPtr (Ptr Device_T -> Ptr ReleaseCapturedPipelineDataInfoKHR -> Ptr AllocationCallbacks -> IO Result) -> Ptr Device_T -> Ptr ReleaseCapturedPipelineDataInfoKHR -> Ptr AllocationCallbacks -> IO Result
releaseCapturedPipelineDataKHR :: forall io
. (MonadIO io)
=>
Device
->
ReleaseCapturedPipelineDataInfoKHR
->
("allocator" ::: Maybe AllocationCallbacks)
-> io ()
releaseCapturedPipelineDataKHR :: forall (io :: * -> *).
MonadIO io =>
Device
-> ReleaseCapturedPipelineDataInfoKHR
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
releaseCapturedPipelineDataKHR Device
device ReleaseCapturedPipelineDataInfoKHR
info "allocator" ::: Maybe AllocationCallbacks
allocator = IO () -> io ()
forall a. IO a -> io a
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 vkReleaseCapturedPipelineDataKHRPtr :: FunPtr
(Ptr Device_T
-> Ptr ReleaseCapturedPipelineDataInfoKHR
-> Ptr AllocationCallbacks
-> IO Result)
vkReleaseCapturedPipelineDataKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> Ptr ReleaseCapturedPipelineDataInfoKHR
-> Ptr AllocationCallbacks
-> IO Result)
pVkReleaseCapturedPipelineDataKHR (case Device
device of Device{DeviceCmds
deviceCmds :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT () IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT () m a
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
-> Ptr ReleaseCapturedPipelineDataInfoKHR
-> Ptr AllocationCallbacks
-> IO Result)
vkReleaseCapturedPipelineDataKHRPtr FunPtr
(Ptr Device_T
-> Ptr ReleaseCapturedPipelineDataInfoKHR
-> Ptr AllocationCallbacks
-> IO Result)
-> FunPtr
(Ptr Device_T
-> Ptr ReleaseCapturedPipelineDataInfoKHR
-> Ptr AllocationCallbacks
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> Ptr ReleaseCapturedPipelineDataInfoKHR
-> Ptr AllocationCallbacks
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. (HasCallStack, 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 String
"" String
"The function pointer for vkReleaseCapturedPipelineDataKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkReleaseCapturedPipelineDataKHR' :: Ptr Device_T
-> Ptr ReleaseCapturedPipelineDataInfoKHR
-> Ptr AllocationCallbacks
-> IO Result
vkReleaseCapturedPipelineDataKHR' = FunPtr
(Ptr Device_T
-> Ptr ReleaseCapturedPipelineDataInfoKHR
-> Ptr AllocationCallbacks
-> IO Result)
-> Ptr Device_T
-> Ptr ReleaseCapturedPipelineDataInfoKHR
-> Ptr AllocationCallbacks
-> IO Result
mkVkReleaseCapturedPipelineDataKHR FunPtr
(Ptr Device_T
-> Ptr ReleaseCapturedPipelineDataInfoKHR
-> Ptr AllocationCallbacks
-> IO Result)
vkReleaseCapturedPipelineDataKHRPtr
pInfo <- ((Ptr ReleaseCapturedPipelineDataInfoKHR -> IO ()) -> IO ())
-> ContT () IO (Ptr ReleaseCapturedPipelineDataInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr ReleaseCapturedPipelineDataInfoKHR -> IO ()) -> IO ())
-> ContT () IO (Ptr ReleaseCapturedPipelineDataInfoKHR))
-> ((Ptr ReleaseCapturedPipelineDataInfoKHR -> IO ()) -> IO ())
-> ContT () IO (Ptr ReleaseCapturedPipelineDataInfoKHR)
forall a b. (a -> b) -> a -> b
$ ReleaseCapturedPipelineDataInfoKHR
-> (Ptr ReleaseCapturedPipelineDataInfoKHR -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
ReleaseCapturedPipelineDataInfoKHR
-> (Ptr ReleaseCapturedPipelineDataInfoKHR -> IO b) -> IO b
withCStruct (ReleaseCapturedPipelineDataInfoKHR
info)
pAllocator <- case (allocator) of
"allocator" ::: Maybe AllocationCallbacks
Nothing -> Ptr AllocationCallbacks -> ContT () IO (Ptr AllocationCallbacks)
forall a. a -> ContT () IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> ((Ptr AllocationCallbacks -> IO ()) -> IO ())
-> ContT () IO (Ptr AllocationCallbacks)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr AllocationCallbacks -> IO ()) -> IO ())
-> ContT () IO (Ptr AllocationCallbacks))
-> ((Ptr AllocationCallbacks -> IO ()) -> IO ())
-> ContT () IO (Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks -> (Ptr AllocationCallbacks -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
AllocationCallbacks -> (Ptr AllocationCallbacks -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
r <- lift $ traceAroundEvent "vkReleaseCapturedPipelineDataKHR" (vkReleaseCapturedPipelineDataKHR'
(deviceHandle (device))
pInfo
pAllocator)
lift $ when (r < SUCCESS) (throwIO (VulkanException r))
data PipelineBinaryCreateInfoKHR = PipelineBinaryCreateInfoKHR
{
PipelineBinaryCreateInfoKHR -> Maybe PipelineBinaryKeysAndDataKHR
keysAndDataInfo :: Maybe PipelineBinaryKeysAndDataKHR
,
PipelineBinaryCreateInfoKHR -> Pipeline
pipeline :: Pipeline
,
PipelineBinaryCreateInfoKHR
-> "pipelineCreateInfo" ::: Maybe PipelineCreateInfoKHR
pipelineCreateInfo :: Maybe PipelineCreateInfoKHR
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineBinaryCreateInfoKHR)
#endif
deriving instance Show PipelineBinaryCreateInfoKHR
instance ToCStruct PipelineBinaryCreateInfoKHR where
withCStruct :: forall b.
PipelineBinaryCreateInfoKHR
-> (Ptr PipelineBinaryCreateInfoKHR -> IO b) -> IO b
withCStruct PipelineBinaryCreateInfoKHR
x Ptr PipelineBinaryCreateInfoKHR -> IO b
f = Int -> (Ptr PipelineBinaryCreateInfoKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 ((Ptr PipelineBinaryCreateInfoKHR -> IO b) -> IO b)
-> (Ptr PipelineBinaryCreateInfoKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PipelineBinaryCreateInfoKHR
p -> Ptr PipelineBinaryCreateInfoKHR
-> PipelineBinaryCreateInfoKHR -> IO b -> IO b
forall b.
Ptr PipelineBinaryCreateInfoKHR
-> PipelineBinaryCreateInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineBinaryCreateInfoKHR
p PipelineBinaryCreateInfoKHR
x (Ptr PipelineBinaryCreateInfoKHR -> IO b
f Ptr PipelineBinaryCreateInfoKHR
p)
pokeCStruct :: forall b.
Ptr PipelineBinaryCreateInfoKHR
-> PipelineBinaryCreateInfoKHR -> IO b -> IO b
pokeCStruct Ptr PipelineBinaryCreateInfoKHR
p PipelineBinaryCreateInfoKHR{"pipelineCreateInfo" ::: Maybe PipelineCreateInfoKHR
Maybe PipelineBinaryKeysAndDataKHR
Pipeline
keysAndDataInfo :: PipelineBinaryCreateInfoKHR -> Maybe PipelineBinaryKeysAndDataKHR
pipeline :: PipelineBinaryCreateInfoKHR -> Pipeline
pipelineCreateInfo :: PipelineBinaryCreateInfoKHR
-> "pipelineCreateInfo" ::: Maybe PipelineCreateInfoKHR
keysAndDataInfo :: Maybe PipelineBinaryKeysAndDataKHR
pipeline :: Pipeline
pipelineCreateInfo :: "pipelineCreateInfo" ::: Maybe PipelineCreateInfoKHR
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryCreateInfoKHR
p Ptr PipelineBinaryCreateInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_BINARY_CREATE_INFO_KHR)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryCreateInfoKHR
p Ptr PipelineBinaryCreateInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
pKeysAndDataInfo'' <- case (Maybe PipelineBinaryKeysAndDataKHR
keysAndDataInfo) of
Maybe PipelineBinaryKeysAndDataKHR
Nothing -> Ptr PipelineBinaryKeysAndDataKHR
-> ContT b IO (Ptr PipelineBinaryKeysAndDataKHR)
forall a. a -> ContT b IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr PipelineBinaryKeysAndDataKHR
forall a. Ptr a
nullPtr
Just PipelineBinaryKeysAndDataKHR
j -> ((Ptr PipelineBinaryKeysAndDataKHR -> IO b) -> IO b)
-> ContT b IO (Ptr PipelineBinaryKeysAndDataKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr PipelineBinaryKeysAndDataKHR -> IO b) -> IO b)
-> ContT b IO (Ptr PipelineBinaryKeysAndDataKHR))
-> ((Ptr PipelineBinaryKeysAndDataKHR -> IO b) -> IO b)
-> ContT b IO (Ptr PipelineBinaryKeysAndDataKHR)
forall a b. (a -> b) -> a -> b
$ PipelineBinaryKeysAndDataKHR
-> (Ptr PipelineBinaryKeysAndDataKHR -> IO b) -> IO b
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
PipelineBinaryKeysAndDataKHR
-> (Ptr PipelineBinaryKeysAndDataKHR -> IO b) -> IO b
withCStruct (PipelineBinaryKeysAndDataKHR
j)
lift $ poke ((p `plusPtr` 16 :: Ptr (Ptr PipelineBinaryKeysAndDataKHR))) pKeysAndDataInfo''
lift $ poke ((p `plusPtr` 24 :: Ptr Pipeline)) (pipeline)
pPipelineCreateInfo'' <- case (pipelineCreateInfo) of
"pipelineCreateInfo" ::: Maybe PipelineCreateInfoKHR
Nothing -> Ptr PipelineCreateInfoKHR -> ContT b IO (Ptr PipelineCreateInfoKHR)
forall a. a -> ContT b IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr PipelineCreateInfoKHR
forall a. Ptr a
nullPtr
Just PipelineCreateInfoKHR
j -> ((Ptr PipelineCreateInfoKHR -> IO b) -> IO b)
-> ContT b IO (Ptr PipelineCreateInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr PipelineCreateInfoKHR -> IO b) -> IO b)
-> ContT b IO (Ptr PipelineCreateInfoKHR))
-> ((Ptr PipelineCreateInfoKHR -> IO b) -> IO b)
-> ContT b IO (Ptr PipelineCreateInfoKHR)
forall a b. (a -> b) -> a -> b
$ PipelineCreateInfoKHR
-> (Ptr PipelineCreateInfoKHR -> IO b) -> IO b
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
PipelineCreateInfoKHR
-> (Ptr PipelineCreateInfoKHR -> IO b) -> IO b
withCStruct (PipelineCreateInfoKHR
j)
lift $ poke ((p `plusPtr` 32 :: Ptr (Ptr PipelineCreateInfoKHR))) pPipelineCreateInfo''
lift $ f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr PipelineBinaryCreateInfoKHR -> IO b -> IO b
pokeZeroCStruct Ptr PipelineBinaryCreateInfoKHR
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryCreateInfoKHR
p Ptr PipelineBinaryCreateInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_BINARY_CREATE_INFO_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryCreateInfoKHR
p Ptr PipelineBinaryCreateInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
IO b
f
instance FromCStruct PipelineBinaryCreateInfoKHR where
peekCStruct :: Ptr PipelineBinaryCreateInfoKHR -> IO PipelineBinaryCreateInfoKHR
peekCStruct Ptr PipelineBinaryCreateInfoKHR
p = do
pKeysAndDataInfo <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr PipelineBinaryKeysAndDataKHR) ((Ptr PipelineBinaryCreateInfoKHR
p Ptr PipelineBinaryCreateInfoKHR
-> Int -> Ptr (Ptr PipelineBinaryKeysAndDataKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr PipelineBinaryKeysAndDataKHR)))
pKeysAndDataInfo' <- maybePeek (\Ptr PipelineBinaryKeysAndDataKHR
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PipelineBinaryKeysAndDataKHR (Ptr PipelineBinaryKeysAndDataKHR
j)) pKeysAndDataInfo
pipeline <- peek @Pipeline ((p `plusPtr` 24 :: Ptr Pipeline))
pPipelineCreateInfo <- peek @(Ptr PipelineCreateInfoKHR) ((p `plusPtr` 32 :: Ptr (Ptr PipelineCreateInfoKHR)))
pPipelineCreateInfo' <- maybePeek (\Ptr PipelineCreateInfoKHR
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PipelineCreateInfoKHR (Ptr PipelineCreateInfoKHR
j)) pPipelineCreateInfo
pure $ PipelineBinaryCreateInfoKHR
pKeysAndDataInfo' pipeline pPipelineCreateInfo'
instance Zero PipelineBinaryCreateInfoKHR where
zero :: PipelineBinaryCreateInfoKHR
zero = Maybe PipelineBinaryKeysAndDataKHR
-> Pipeline
-> ("pipelineCreateInfo" ::: Maybe PipelineCreateInfoKHR)
-> PipelineBinaryCreateInfoKHR
PipelineBinaryCreateInfoKHR
Maybe PipelineBinaryKeysAndDataKHR
forall a. Maybe a
Nothing
Pipeline
forall a. Zero a => a
zero
"pipelineCreateInfo" ::: Maybe PipelineCreateInfoKHR
forall a. Maybe a
Nothing
data PipelineBinaryHandlesInfoKHR = PipelineBinaryHandlesInfoKHR
{
("binaries" ::: PipelineBinaryHandlesInfoKHR) -> Word32
pipelineBinaryCount :: Word32
,
("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> Ptr PipelineBinaryKHR
pipelineBinaries :: Ptr PipelineBinaryKHR
}
deriving (Typeable, ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> Bool
(("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> Bool)
-> (("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> Bool)
-> Eq ("binaries" ::: PipelineBinaryHandlesInfoKHR)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> Bool
== :: ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> Bool
$c/= :: ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> Bool
/= :: ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineBinaryHandlesInfoKHR)
#endif
deriving instance Show PipelineBinaryHandlesInfoKHR
instance ToCStruct PipelineBinaryHandlesInfoKHR where
withCStruct :: forall b.
("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> (Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> IO b)
-> IO b
withCStruct "binaries" ::: PipelineBinaryHandlesInfoKHR
x Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> IO b
f = Int
-> (Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> IO b)
-> IO b)
-> (Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
p -> Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> IO b -> IO b
forall b.
Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
p "binaries" ::: PipelineBinaryHandlesInfoKHR
x (Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> IO b
f Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
p)
pokeCStruct :: forall b.
Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> IO b -> IO b
pokeCStruct Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
p PipelineBinaryHandlesInfoKHR{Word32
Ptr PipelineBinaryKHR
pipelineBinaryCount :: ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> Word32
pipelineBinaries :: ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> Ptr PipelineBinaryKHR
pipelineBinaryCount :: Word32
pipelineBinaries :: Ptr PipelineBinaryKHR
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
p Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_BINARY_HANDLES_INFO_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
p Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
p Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
pipelineBinaryCount)
Ptr (Ptr PipelineBinaryKHR) -> Ptr PipelineBinaryKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
p Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> Int -> Ptr (Ptr PipelineBinaryKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr PipelineBinaryKHR))) (Ptr PipelineBinaryKHR
pipelineBinaries)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> IO b -> IO b
pokeZeroCStruct Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
p Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_BINARY_HANDLES_INFO_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
p Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
p Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PipelineBinaryHandlesInfoKHR where
peekCStruct :: Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO ("binaries" ::: PipelineBinaryHandlesInfoKHR)
peekCStruct Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
p = do
pipelineBinaryCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
p Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
pPipelineBinaries <- peek @(Ptr PipelineBinaryKHR) ((p `plusPtr` 24 :: Ptr (Ptr PipelineBinaryKHR)))
pure $ PipelineBinaryHandlesInfoKHR
pipelineBinaryCount pPipelineBinaries
instance Storable PipelineBinaryHandlesInfoKHR where
sizeOf :: ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> Int
sizeOf ~"binaries" ::: PipelineBinaryHandlesInfoKHR
_ = Int
32
alignment :: ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> Int
alignment ~"binaries" ::: PipelineBinaryHandlesInfoKHR
_ = Int
8
peek :: Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO ("binaries" ::: PipelineBinaryHandlesInfoKHR)
peek = Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO ("binaries" ::: PipelineBinaryHandlesInfoKHR)
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> IO ()
poke Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
ptr "binaries" ::: PipelineBinaryHandlesInfoKHR
poked = Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> IO () -> IO ()
forall b.
Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
ptr "binaries" ::: PipelineBinaryHandlesInfoKHR
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PipelineBinaryHandlesInfoKHR where
zero :: "binaries" ::: PipelineBinaryHandlesInfoKHR
zero = Word32
-> Ptr PipelineBinaryKHR
-> "binaries" ::: PipelineBinaryHandlesInfoKHR
PipelineBinaryHandlesInfoKHR
Word32
forall a. Zero a => a
zero
Ptr PipelineBinaryKHR
forall a. Zero a => a
zero
data PipelineBinaryDataKHR = PipelineBinaryDataKHR
{
PipelineBinaryDataKHR -> Word64
dataSize :: Word64
,
PipelineBinaryDataKHR -> Ptr ()
data' :: Ptr ()
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineBinaryDataKHR)
#endif
deriving instance Show PipelineBinaryDataKHR
instance ToCStruct PipelineBinaryDataKHR where
withCStruct :: forall b.
PipelineBinaryDataKHR
-> (Ptr PipelineBinaryDataKHR -> IO b) -> IO b
withCStruct PipelineBinaryDataKHR
x Ptr PipelineBinaryDataKHR -> IO b
f = Int -> (Ptr PipelineBinaryDataKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
16 ((Ptr PipelineBinaryDataKHR -> IO b) -> IO b)
-> (Ptr PipelineBinaryDataKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PipelineBinaryDataKHR
p -> Ptr PipelineBinaryDataKHR -> PipelineBinaryDataKHR -> IO b -> IO b
forall b.
Ptr PipelineBinaryDataKHR -> PipelineBinaryDataKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineBinaryDataKHR
p PipelineBinaryDataKHR
x (Ptr PipelineBinaryDataKHR -> IO b
f Ptr PipelineBinaryDataKHR
p)
pokeCStruct :: forall b.
Ptr PipelineBinaryDataKHR -> PipelineBinaryDataKHR -> IO b -> IO b
pokeCStruct Ptr PipelineBinaryDataKHR
p PipelineBinaryDataKHR{Word64
Ptr ()
dataSize :: PipelineBinaryDataKHR -> Word64
data' :: PipelineBinaryDataKHR -> Ptr ()
dataSize :: Word64
data' :: Ptr ()
..} IO b
f = do
Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryDataKHR
p Ptr PipelineBinaryDataKHR -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr CSize)) (Word64 -> CSize
CSize (Word64
dataSize))
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryDataKHR
p Ptr PipelineBinaryDataKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
data')
IO b
f
cStructSize :: Int
cStructSize = Int
16
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr PipelineBinaryDataKHR -> IO b -> IO b
pokeZeroCStruct Ptr PipelineBinaryDataKHR
p IO b
f = do
Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryDataKHR
p Ptr PipelineBinaryDataKHR -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr CSize)) (Word64 -> CSize
CSize (Word64
forall a. Zero a => a
zero))
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryDataKHR
p Ptr PipelineBinaryDataKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PipelineBinaryDataKHR where
peekCStruct :: Ptr PipelineBinaryDataKHR -> IO PipelineBinaryDataKHR
peekCStruct Ptr PipelineBinaryDataKHR
p = do
dataSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PipelineBinaryDataKHR
p Ptr PipelineBinaryDataKHR -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr CSize))
pData <- peek @(Ptr ()) ((p `plusPtr` 8 :: Ptr (Ptr ())))
pure $ PipelineBinaryDataKHR
(coerce @CSize @Word64 dataSize) pData
instance Storable PipelineBinaryDataKHR where
sizeOf :: PipelineBinaryDataKHR -> Int
sizeOf ~PipelineBinaryDataKHR
_ = Int
16
alignment :: PipelineBinaryDataKHR -> Int
alignment ~PipelineBinaryDataKHR
_ = Int
8
peek :: Ptr PipelineBinaryDataKHR -> IO PipelineBinaryDataKHR
peek = Ptr PipelineBinaryDataKHR -> IO PipelineBinaryDataKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PipelineBinaryDataKHR -> PipelineBinaryDataKHR -> IO ()
poke Ptr PipelineBinaryDataKHR
ptr PipelineBinaryDataKHR
poked = Ptr PipelineBinaryDataKHR
-> PipelineBinaryDataKHR -> IO () -> IO ()
forall b.
Ptr PipelineBinaryDataKHR -> PipelineBinaryDataKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineBinaryDataKHR
ptr PipelineBinaryDataKHR
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PipelineBinaryDataKHR where
zero :: PipelineBinaryDataKHR
zero = Word64 -> Ptr () -> PipelineBinaryDataKHR
PipelineBinaryDataKHR
Word64
forall a. Zero a => a
zero
Ptr ()
forall a. Zero a => a
zero
data PipelineBinaryKeysAndDataKHR = PipelineBinaryKeysAndDataKHR
{
PipelineBinaryKeysAndDataKHR
-> Vector ("pipelineKey" ::: PipelineBinaryKeyKHR)
pipelineBinaryKeys :: Vector PipelineBinaryKeyKHR
,
PipelineBinaryKeysAndDataKHR -> Vector PipelineBinaryDataKHR
pipelineBinaryData :: Vector PipelineBinaryDataKHR
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineBinaryKeysAndDataKHR)
#endif
deriving instance Show PipelineBinaryKeysAndDataKHR
instance ToCStruct PipelineBinaryKeysAndDataKHR where
withCStruct :: forall b.
PipelineBinaryKeysAndDataKHR
-> (Ptr PipelineBinaryKeysAndDataKHR -> IO b) -> IO b
withCStruct PipelineBinaryKeysAndDataKHR
x Ptr PipelineBinaryKeysAndDataKHR -> IO b
f = Int -> (Ptr PipelineBinaryKeysAndDataKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PipelineBinaryKeysAndDataKHR -> IO b) -> IO b)
-> (Ptr PipelineBinaryKeysAndDataKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PipelineBinaryKeysAndDataKHR
p -> Ptr PipelineBinaryKeysAndDataKHR
-> PipelineBinaryKeysAndDataKHR -> IO b -> IO b
forall b.
Ptr PipelineBinaryKeysAndDataKHR
-> PipelineBinaryKeysAndDataKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineBinaryKeysAndDataKHR
p PipelineBinaryKeysAndDataKHR
x (Ptr PipelineBinaryKeysAndDataKHR -> IO b
f Ptr PipelineBinaryKeysAndDataKHR
p)
pokeCStruct :: forall b.
Ptr PipelineBinaryKeysAndDataKHR
-> PipelineBinaryKeysAndDataKHR -> IO b -> IO b
pokeCStruct Ptr PipelineBinaryKeysAndDataKHR
p PipelineBinaryKeysAndDataKHR{Vector ("pipelineKey" ::: PipelineBinaryKeyKHR)
Vector PipelineBinaryDataKHR
pipelineBinaryKeys :: PipelineBinaryKeysAndDataKHR
-> Vector ("pipelineKey" ::: PipelineBinaryKeyKHR)
pipelineBinaryData :: PipelineBinaryKeysAndDataKHR -> Vector PipelineBinaryDataKHR
pipelineBinaryKeys :: Vector ("pipelineKey" ::: PipelineBinaryKeyKHR)
pipelineBinaryData :: Vector PipelineBinaryDataKHR
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
let pPipelineBinaryKeysLength :: Int
pPipelineBinaryKeysLength = Vector ("pipelineKey" ::: PipelineBinaryKeyKHR) -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector ("pipelineKey" ::: PipelineBinaryKeyKHR) -> Int)
-> Vector ("pipelineKey" ::: PipelineBinaryKeyKHR) -> Int
forall a b. (a -> b) -> a -> b
$ (Vector ("pipelineKey" ::: PipelineBinaryKeyKHR)
pipelineBinaryKeys)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless ((Vector PipelineBinaryDataKHR -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector PipelineBinaryDataKHR -> Int)
-> Vector PipelineBinaryDataKHR -> Int
forall a b. (a -> b) -> a -> b
$ (Vector PipelineBinaryDataKHR
pipelineBinaryData)) Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== Int
pPipelineBinaryKeysLength) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. (HasCallStack, 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 String
"" String
"pPipelineBinaryData and pPipelineBinaryKeys must have the same length" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryKeysAndDataKHR
p Ptr PipelineBinaryKeysAndDataKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) ((Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pPipelineBinaryKeysLength :: Word32))
pPPipelineBinaryKeys' <- ((Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO b) -> IO b)
-> ContT b IO (Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO b) -> IO b)
-> ContT b IO (Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)))
-> ((Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO b) -> IO b)
-> ContT b IO (Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR))
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @PipelineBinaryKeyKHR ((Vector ("pipelineKey" ::: PipelineBinaryKeyKHR) -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector ("pipelineKey" ::: PipelineBinaryKeyKHR)
pipelineBinaryKeys)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
56)
lift $ Data.Vector.imapM_ (\Int
i "pipelineKey" ::: PipelineBinaryKeyKHR
e -> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
pPPipelineBinaryKeys' Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Int -> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
56 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PipelineBinaryKeyKHR) ("pipelineKey" ::: PipelineBinaryKeyKHR
e)) (pipelineBinaryKeys)
lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr PipelineBinaryKeyKHR))) (pPPipelineBinaryKeys')
pPPipelineBinaryData' <- ContT $ allocaBytes @PipelineBinaryDataKHR ((Data.Vector.length (pipelineBinaryData)) * 16)
lift $ Data.Vector.imapM_ (\Int
i PipelineBinaryDataKHR
e -> Ptr PipelineBinaryDataKHR -> PipelineBinaryDataKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr PipelineBinaryDataKHR
pPPipelineBinaryData' Ptr PipelineBinaryDataKHR -> Int -> Ptr PipelineBinaryDataKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
16 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PipelineBinaryDataKHR) (PipelineBinaryDataKHR
e)) (pipelineBinaryData)
lift $ poke ((p `plusPtr` 16 :: Ptr (Ptr PipelineBinaryDataKHR))) (pPPipelineBinaryData')
lift $ f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr PipelineBinaryKeysAndDataKHR -> IO b -> IO b
pokeZeroCStruct Ptr PipelineBinaryKeysAndDataKHR
_ IO b
f = IO b
f
instance FromCStruct PipelineBinaryKeysAndDataKHR where
peekCStruct :: Ptr PipelineBinaryKeysAndDataKHR -> IO PipelineBinaryKeysAndDataKHR
peekCStruct Ptr PipelineBinaryKeysAndDataKHR
p = do
binaryCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PipelineBinaryKeysAndDataKHR
p Ptr PipelineBinaryKeysAndDataKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32))
pPipelineBinaryKeys <- peek @(Ptr PipelineBinaryKeyKHR) ((p `plusPtr` 8 :: Ptr (Ptr PipelineBinaryKeyKHR)))
pPipelineBinaryKeys' <- generateM (fromIntegral binaryCount) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PipelineBinaryKeyKHR ((Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
pPipelineBinaryKeys Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Int -> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
56 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PipelineBinaryKeyKHR)))
pPipelineBinaryData <- peek @(Ptr PipelineBinaryDataKHR) ((p `plusPtr` 16 :: Ptr (Ptr PipelineBinaryDataKHR)))
pPipelineBinaryData' <- generateM (fromIntegral binaryCount) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PipelineBinaryDataKHR ((Ptr PipelineBinaryDataKHR
pPipelineBinaryData Ptr PipelineBinaryDataKHR -> Int -> Ptr PipelineBinaryDataKHR
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
16 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PipelineBinaryDataKHR)))
pure $ PipelineBinaryKeysAndDataKHR
pPipelineBinaryKeys' pPipelineBinaryData'
instance Zero PipelineBinaryKeysAndDataKHR where
zero :: PipelineBinaryKeysAndDataKHR
zero = Vector ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Vector PipelineBinaryDataKHR -> PipelineBinaryKeysAndDataKHR
PipelineBinaryKeysAndDataKHR
Vector ("pipelineKey" ::: PipelineBinaryKeyKHR)
forall a. Monoid a => a
mempty
Vector PipelineBinaryDataKHR
forall a. Monoid a => a
mempty
data PipelineBinaryKeyKHR = PipelineBinaryKeyKHR
{
("pipelineKey" ::: PipelineBinaryKeyKHR) -> Word32
keySize :: Word32
,
("pipelineKey" ::: PipelineBinaryKeyKHR)
-> "pipelineBinaryData" ::: ByteString
key :: ByteString
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineBinaryKeyKHR)
#endif
deriving instance Show PipelineBinaryKeyKHR
instance ToCStruct PipelineBinaryKeyKHR where
withCStruct :: forall b.
("pipelineKey" ::: PipelineBinaryKeyKHR)
-> (Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO b) -> IO b
withCStruct "pipelineKey" ::: PipelineBinaryKeyKHR
x Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO b
f = Int
-> (Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
56 ((Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO b) -> IO b)
-> (Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
p -> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO b -> IO b
forall b.
Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
p "pipelineKey" ::: PipelineBinaryKeyKHR
x (Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO b
f Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
p)
pokeCStruct :: forall b.
Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO b -> IO b
pokeCStruct Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
p PipelineBinaryKeyKHR{Word32
"pipelineBinaryData" ::: ByteString
keySize :: ("pipelineKey" ::: PipelineBinaryKeyKHR) -> Word32
key :: ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> "pipelineBinaryData" ::: ByteString
keySize :: Word32
key :: "pipelineBinaryData" ::: ByteString
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
p Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_BINARY_KEY_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
p Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
p Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR) -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
keySize)
Ptr (FixedArray MAX_PIPELINE_BINARY_KEY_SIZE_KHR Word8)
-> ("pipelineBinaryData" ::: ByteString) -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8)
-> ("pipelineBinaryData" ::: ByteString) -> IO ()
pokeFixedLengthByteString ((Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
p Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Int -> Ptr (FixedArray MAX_PIPELINE_BINARY_KEY_SIZE_KHR Word8)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr (FixedArray MAX_PIPELINE_BINARY_KEY_SIZE_KHR Word8))) ("pipelineBinaryData" ::: ByteString
key)
IO b
f
cStructSize :: Int
cStructSize = Int
56
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO b -> IO b
pokeZeroCStruct Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
p Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_BINARY_KEY_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
p Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
p Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR) -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr (FixedArray MAX_PIPELINE_BINARY_KEY_SIZE_KHR Word8)
-> ("pipelineBinaryData" ::: ByteString) -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8)
-> ("pipelineBinaryData" ::: ByteString) -> IO ()
pokeFixedLengthByteString ((Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
p Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Int -> Ptr (FixedArray MAX_PIPELINE_BINARY_KEY_SIZE_KHR Word8)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr (FixedArray MAX_PIPELINE_BINARY_KEY_SIZE_KHR Word8))) ("pipelineBinaryData" ::: ByteString
forall a. Monoid a => a
mempty)
IO b
f
instance FromCStruct PipelineBinaryKeyKHR where
peekCStruct :: Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR)
peekCStruct Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
p = do
keySize <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
p Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR) -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
key <- peekByteStringFromSizedVectorPtr ((p `plusPtr` 20 :: Ptr (FixedArray MAX_PIPELINE_BINARY_KEY_SIZE_KHR Word8)))
pure $ PipelineBinaryKeyKHR
keySize key
instance Storable PipelineBinaryKeyKHR where
sizeOf :: ("pipelineKey" ::: PipelineBinaryKeyKHR) -> Int
sizeOf ~"pipelineKey" ::: PipelineBinaryKeyKHR
_ = Int
56
alignment :: ("pipelineKey" ::: PipelineBinaryKeyKHR) -> Int
alignment ~"pipelineKey" ::: PipelineBinaryKeyKHR
_ = Int
8
peek :: Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR)
peek = Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR)
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO ()
poke Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
ptr "pipelineKey" ::: PipelineBinaryKeyKHR
poked = Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO () -> IO ()
forall b.
Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
ptr "pipelineKey" ::: PipelineBinaryKeyKHR
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PipelineBinaryKeyKHR where
zero :: "pipelineKey" ::: PipelineBinaryKeyKHR
zero = Word32
-> ("pipelineBinaryData" ::: ByteString)
-> "pipelineKey" ::: PipelineBinaryKeyKHR
PipelineBinaryKeyKHR
Word32
forall a. Zero a => a
zero
"pipelineBinaryData" ::: ByteString
forall a. Monoid a => a
mempty
data PipelineBinaryInfoKHR = PipelineBinaryInfoKHR
{
PipelineBinaryInfoKHR -> Vector PipelineBinaryKHR
pipelineBinaries :: Vector PipelineBinaryKHR }
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineBinaryInfoKHR)
#endif
deriving instance Show PipelineBinaryInfoKHR
instance ToCStruct PipelineBinaryInfoKHR where
withCStruct :: forall b.
PipelineBinaryInfoKHR
-> (Ptr PipelineBinaryInfoKHR -> IO b) -> IO b
withCStruct PipelineBinaryInfoKHR
x Ptr PipelineBinaryInfoKHR -> IO b
f = Int -> (Ptr PipelineBinaryInfoKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr PipelineBinaryInfoKHR -> IO b) -> IO b)
-> (Ptr PipelineBinaryInfoKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PipelineBinaryInfoKHR
p -> Ptr PipelineBinaryInfoKHR -> PipelineBinaryInfoKHR -> IO b -> IO b
forall b.
Ptr PipelineBinaryInfoKHR -> PipelineBinaryInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineBinaryInfoKHR
p PipelineBinaryInfoKHR
x (Ptr PipelineBinaryInfoKHR -> IO b
f Ptr PipelineBinaryInfoKHR
p)
pokeCStruct :: forall b.
Ptr PipelineBinaryInfoKHR -> PipelineBinaryInfoKHR -> IO b -> IO b
pokeCStruct Ptr PipelineBinaryInfoKHR
p PipelineBinaryInfoKHR{Vector PipelineBinaryKHR
pipelineBinaries :: PipelineBinaryInfoKHR -> Vector PipelineBinaryKHR
pipelineBinaries :: Vector PipelineBinaryKHR
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryInfoKHR
p Ptr PipelineBinaryInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_BINARY_INFO_KHR)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryInfoKHR
p Ptr PipelineBinaryInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryInfoKHR
p Ptr PipelineBinaryInfoKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) ((Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector PipelineBinaryKHR -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector PipelineBinaryKHR -> Int)
-> Vector PipelineBinaryKHR -> Int
forall a b. (a -> b) -> a -> b
$ (Vector PipelineBinaryKHR
pipelineBinaries)) :: Word32))
pPPipelineBinaries' <- ((Ptr PipelineBinaryKHR -> IO b) -> IO b)
-> ContT b IO (Ptr PipelineBinaryKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr PipelineBinaryKHR -> IO b) -> IO b)
-> ContT b IO (Ptr PipelineBinaryKHR))
-> ((Ptr PipelineBinaryKHR -> IO b) -> IO b)
-> ContT b IO (Ptr PipelineBinaryKHR)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @PipelineBinaryKHR ((Vector PipelineBinaryKHR -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector PipelineBinaryKHR
pipelineBinaries)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
8)
lift $ Data.Vector.imapM_ (\Int
i PipelineBinaryKHR
e -> Ptr PipelineBinaryKHR -> PipelineBinaryKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr PipelineBinaryKHR
pPPipelineBinaries' Ptr PipelineBinaryKHR -> Int -> Ptr PipelineBinaryKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PipelineBinaryKHR) (PipelineBinaryKHR
e)) (pipelineBinaries)
lift $ poke ((p `plusPtr` 24 :: Ptr (Ptr PipelineBinaryKHR))) (pPPipelineBinaries')
lift $ f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr PipelineBinaryInfoKHR -> IO b -> IO b
pokeZeroCStruct Ptr PipelineBinaryInfoKHR
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryInfoKHR
p Ptr PipelineBinaryInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_BINARY_INFO_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryInfoKHR
p Ptr PipelineBinaryInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
IO b
f
instance FromCStruct PipelineBinaryInfoKHR where
peekCStruct :: Ptr PipelineBinaryInfoKHR -> IO PipelineBinaryInfoKHR
peekCStruct Ptr PipelineBinaryInfoKHR
p = do
binaryCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PipelineBinaryInfoKHR
p Ptr PipelineBinaryInfoKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
pPipelineBinaries <- peek @(Ptr PipelineBinaryKHR) ((p `plusPtr` 24 :: Ptr (Ptr PipelineBinaryKHR)))
pPipelineBinaries' <- generateM (fromIntegral binaryCount) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @PipelineBinaryKHR ((Ptr PipelineBinaryKHR
pPipelineBinaries Ptr PipelineBinaryKHR -> Int -> Ptr PipelineBinaryKHR
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PipelineBinaryKHR)))
pure $ PipelineBinaryInfoKHR
pPipelineBinaries'
instance Zero PipelineBinaryInfoKHR where
zero :: PipelineBinaryInfoKHR
zero = Vector PipelineBinaryKHR -> PipelineBinaryInfoKHR
PipelineBinaryInfoKHR
Vector PipelineBinaryKHR
forall a. Monoid a => a
mempty
data ReleaseCapturedPipelineDataInfoKHR = ReleaseCapturedPipelineDataInfoKHR
{
ReleaseCapturedPipelineDataInfoKHR -> Pipeline
pipeline :: Pipeline }
deriving (Typeable, ReleaseCapturedPipelineDataInfoKHR
-> ReleaseCapturedPipelineDataInfoKHR -> Bool
(ReleaseCapturedPipelineDataInfoKHR
-> ReleaseCapturedPipelineDataInfoKHR -> Bool)
-> (ReleaseCapturedPipelineDataInfoKHR
-> ReleaseCapturedPipelineDataInfoKHR -> Bool)
-> Eq ReleaseCapturedPipelineDataInfoKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReleaseCapturedPipelineDataInfoKHR
-> ReleaseCapturedPipelineDataInfoKHR -> Bool
== :: ReleaseCapturedPipelineDataInfoKHR
-> ReleaseCapturedPipelineDataInfoKHR -> Bool
$c/= :: ReleaseCapturedPipelineDataInfoKHR
-> ReleaseCapturedPipelineDataInfoKHR -> Bool
/= :: ReleaseCapturedPipelineDataInfoKHR
-> ReleaseCapturedPipelineDataInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ReleaseCapturedPipelineDataInfoKHR)
#endif
deriving instance Show ReleaseCapturedPipelineDataInfoKHR
instance ToCStruct ReleaseCapturedPipelineDataInfoKHR where
withCStruct :: forall b.
ReleaseCapturedPipelineDataInfoKHR
-> (Ptr ReleaseCapturedPipelineDataInfoKHR -> IO b) -> IO b
withCStruct ReleaseCapturedPipelineDataInfoKHR
x Ptr ReleaseCapturedPipelineDataInfoKHR -> IO b
f = Int -> (Ptr ReleaseCapturedPipelineDataInfoKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr ReleaseCapturedPipelineDataInfoKHR -> IO b) -> IO b)
-> (Ptr ReleaseCapturedPipelineDataInfoKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr ReleaseCapturedPipelineDataInfoKHR
p -> Ptr ReleaseCapturedPipelineDataInfoKHR
-> ReleaseCapturedPipelineDataInfoKHR -> IO b -> IO b
forall b.
Ptr ReleaseCapturedPipelineDataInfoKHR
-> ReleaseCapturedPipelineDataInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ReleaseCapturedPipelineDataInfoKHR
p ReleaseCapturedPipelineDataInfoKHR
x (Ptr ReleaseCapturedPipelineDataInfoKHR -> IO b
f Ptr ReleaseCapturedPipelineDataInfoKHR
p)
pokeCStruct :: forall b.
Ptr ReleaseCapturedPipelineDataInfoKHR
-> ReleaseCapturedPipelineDataInfoKHR -> IO b -> IO b
pokeCStruct Ptr ReleaseCapturedPipelineDataInfoKHR
p ReleaseCapturedPipelineDataInfoKHR{Pipeline
pipeline :: ReleaseCapturedPipelineDataInfoKHR -> Pipeline
pipeline :: Pipeline
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ReleaseCapturedPipelineDataInfoKHR
p Ptr ReleaseCapturedPipelineDataInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RELEASE_CAPTURED_PIPELINE_DATA_INFO_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ReleaseCapturedPipelineDataInfoKHR
p Ptr ReleaseCapturedPipelineDataInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Pipeline -> Pipeline -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ReleaseCapturedPipelineDataInfoKHR
p Ptr ReleaseCapturedPipelineDataInfoKHR -> Int -> Ptr Pipeline
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Pipeline)) (Pipeline
pipeline)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr ReleaseCapturedPipelineDataInfoKHR -> IO b -> IO b
pokeZeroCStruct Ptr ReleaseCapturedPipelineDataInfoKHR
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ReleaseCapturedPipelineDataInfoKHR
p Ptr ReleaseCapturedPipelineDataInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RELEASE_CAPTURED_PIPELINE_DATA_INFO_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ReleaseCapturedPipelineDataInfoKHR
p Ptr ReleaseCapturedPipelineDataInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Pipeline -> Pipeline -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ReleaseCapturedPipelineDataInfoKHR
p Ptr ReleaseCapturedPipelineDataInfoKHR -> Int -> Ptr Pipeline
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Pipeline)) (Pipeline
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct ReleaseCapturedPipelineDataInfoKHR where
peekCStruct :: Ptr ReleaseCapturedPipelineDataInfoKHR
-> IO ReleaseCapturedPipelineDataInfoKHR
peekCStruct Ptr ReleaseCapturedPipelineDataInfoKHR
p = do
pipeline <- forall a. Storable a => Ptr a -> IO a
peek @Pipeline ((Ptr ReleaseCapturedPipelineDataInfoKHR
p Ptr ReleaseCapturedPipelineDataInfoKHR -> Int -> Ptr Pipeline
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Pipeline))
pure $ ReleaseCapturedPipelineDataInfoKHR
pipeline
instance Storable ReleaseCapturedPipelineDataInfoKHR where
sizeOf :: ReleaseCapturedPipelineDataInfoKHR -> Int
sizeOf ~ReleaseCapturedPipelineDataInfoKHR
_ = Int
24
alignment :: ReleaseCapturedPipelineDataInfoKHR -> Int
alignment ~ReleaseCapturedPipelineDataInfoKHR
_ = Int
8
peek :: Ptr ReleaseCapturedPipelineDataInfoKHR
-> IO ReleaseCapturedPipelineDataInfoKHR
peek = Ptr ReleaseCapturedPipelineDataInfoKHR
-> IO ReleaseCapturedPipelineDataInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr ReleaseCapturedPipelineDataInfoKHR
-> ReleaseCapturedPipelineDataInfoKHR -> IO ()
poke Ptr ReleaseCapturedPipelineDataInfoKHR
ptr ReleaseCapturedPipelineDataInfoKHR
poked = Ptr ReleaseCapturedPipelineDataInfoKHR
-> ReleaseCapturedPipelineDataInfoKHR -> IO () -> IO ()
forall b.
Ptr ReleaseCapturedPipelineDataInfoKHR
-> ReleaseCapturedPipelineDataInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ReleaseCapturedPipelineDataInfoKHR
ptr ReleaseCapturedPipelineDataInfoKHR
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero ReleaseCapturedPipelineDataInfoKHR where
zero :: ReleaseCapturedPipelineDataInfoKHR
zero = Pipeline -> ReleaseCapturedPipelineDataInfoKHR
ReleaseCapturedPipelineDataInfoKHR
Pipeline
forall a. Zero a => a
zero
data PipelineBinaryDataInfoKHR = PipelineBinaryDataInfoKHR
{
PipelineBinaryDataInfoKHR -> PipelineBinaryKHR
pipelineBinary :: PipelineBinaryKHR }
deriving (Typeable, PipelineBinaryDataInfoKHR -> PipelineBinaryDataInfoKHR -> Bool
(PipelineBinaryDataInfoKHR -> PipelineBinaryDataInfoKHR -> Bool)
-> (PipelineBinaryDataInfoKHR -> PipelineBinaryDataInfoKHR -> Bool)
-> Eq PipelineBinaryDataInfoKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PipelineBinaryDataInfoKHR -> PipelineBinaryDataInfoKHR -> Bool
== :: PipelineBinaryDataInfoKHR -> PipelineBinaryDataInfoKHR -> Bool
$c/= :: PipelineBinaryDataInfoKHR -> PipelineBinaryDataInfoKHR -> Bool
/= :: PipelineBinaryDataInfoKHR -> PipelineBinaryDataInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineBinaryDataInfoKHR)
#endif
deriving instance Show PipelineBinaryDataInfoKHR
instance ToCStruct PipelineBinaryDataInfoKHR where
withCStruct :: forall b.
PipelineBinaryDataInfoKHR
-> (Ptr PipelineBinaryDataInfoKHR -> IO b) -> IO b
withCStruct PipelineBinaryDataInfoKHR
x Ptr PipelineBinaryDataInfoKHR -> IO b
f = Int -> (Ptr PipelineBinaryDataInfoKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PipelineBinaryDataInfoKHR -> IO b) -> IO b)
-> (Ptr PipelineBinaryDataInfoKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PipelineBinaryDataInfoKHR
p -> Ptr PipelineBinaryDataInfoKHR
-> PipelineBinaryDataInfoKHR -> IO b -> IO b
forall b.
Ptr PipelineBinaryDataInfoKHR
-> PipelineBinaryDataInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineBinaryDataInfoKHR
p PipelineBinaryDataInfoKHR
x (Ptr PipelineBinaryDataInfoKHR -> IO b
f Ptr PipelineBinaryDataInfoKHR
p)
pokeCStruct :: forall b.
Ptr PipelineBinaryDataInfoKHR
-> PipelineBinaryDataInfoKHR -> IO b -> IO b
pokeCStruct Ptr PipelineBinaryDataInfoKHR
p PipelineBinaryDataInfoKHR{PipelineBinaryKHR
pipelineBinary :: PipelineBinaryDataInfoKHR -> PipelineBinaryKHR
pipelineBinary :: PipelineBinaryKHR
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryDataInfoKHR
p Ptr PipelineBinaryDataInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_BINARY_DATA_INFO_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryDataInfoKHR
p Ptr PipelineBinaryDataInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr PipelineBinaryKHR -> PipelineBinaryKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryDataInfoKHR
p Ptr PipelineBinaryDataInfoKHR -> Int -> Ptr PipelineBinaryKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineBinaryKHR)) (PipelineBinaryKHR
pipelineBinary)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr PipelineBinaryDataInfoKHR -> IO b -> IO b
pokeZeroCStruct Ptr PipelineBinaryDataInfoKHR
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryDataInfoKHR
p Ptr PipelineBinaryDataInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_BINARY_DATA_INFO_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryDataInfoKHR
p Ptr PipelineBinaryDataInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr PipelineBinaryKHR -> PipelineBinaryKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryDataInfoKHR
p Ptr PipelineBinaryDataInfoKHR -> Int -> Ptr PipelineBinaryKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineBinaryKHR)) (PipelineBinaryKHR
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PipelineBinaryDataInfoKHR where
peekCStruct :: Ptr PipelineBinaryDataInfoKHR -> IO PipelineBinaryDataInfoKHR
peekCStruct Ptr PipelineBinaryDataInfoKHR
p = do
pipelineBinary <- forall a. Storable a => Ptr a -> IO a
peek @PipelineBinaryKHR ((Ptr PipelineBinaryDataInfoKHR
p Ptr PipelineBinaryDataInfoKHR -> Int -> Ptr PipelineBinaryKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineBinaryKHR))
pure $ PipelineBinaryDataInfoKHR
pipelineBinary
instance Storable PipelineBinaryDataInfoKHR where
sizeOf :: PipelineBinaryDataInfoKHR -> Int
sizeOf ~PipelineBinaryDataInfoKHR
_ = Int
24
alignment :: PipelineBinaryDataInfoKHR -> Int
alignment ~PipelineBinaryDataInfoKHR
_ = Int
8
peek :: Ptr PipelineBinaryDataInfoKHR -> IO PipelineBinaryDataInfoKHR
peek = Ptr PipelineBinaryDataInfoKHR -> IO PipelineBinaryDataInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PipelineBinaryDataInfoKHR -> PipelineBinaryDataInfoKHR -> IO ()
poke Ptr PipelineBinaryDataInfoKHR
ptr PipelineBinaryDataInfoKHR
poked = Ptr PipelineBinaryDataInfoKHR
-> PipelineBinaryDataInfoKHR -> IO () -> IO ()
forall b.
Ptr PipelineBinaryDataInfoKHR
-> PipelineBinaryDataInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineBinaryDataInfoKHR
ptr PipelineBinaryDataInfoKHR
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PipelineBinaryDataInfoKHR where
zero :: PipelineBinaryDataInfoKHR
zero = PipelineBinaryKHR -> PipelineBinaryDataInfoKHR
PipelineBinaryDataInfoKHR
PipelineBinaryKHR
forall a. Zero a => a
zero
data PipelineCreateInfoKHR = PipelineCreateInfoKHR
{}
deriving (Typeable, PipelineCreateInfoKHR -> PipelineCreateInfoKHR -> Bool
(PipelineCreateInfoKHR -> PipelineCreateInfoKHR -> Bool)
-> (PipelineCreateInfoKHR -> PipelineCreateInfoKHR -> Bool)
-> Eq PipelineCreateInfoKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PipelineCreateInfoKHR -> PipelineCreateInfoKHR -> Bool
== :: PipelineCreateInfoKHR -> PipelineCreateInfoKHR -> Bool
$c/= :: PipelineCreateInfoKHR -> PipelineCreateInfoKHR -> Bool
/= :: PipelineCreateInfoKHR -> PipelineCreateInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineCreateInfoKHR)
#endif
deriving instance Show PipelineCreateInfoKHR
instance ToCStruct PipelineCreateInfoKHR where
withCStruct :: forall b.
PipelineCreateInfoKHR
-> (Ptr PipelineCreateInfoKHR -> IO b) -> IO b
withCStruct PipelineCreateInfoKHR
x Ptr PipelineCreateInfoKHR -> IO b
f = Int -> (Ptr PipelineCreateInfoKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
16 ((Ptr PipelineCreateInfoKHR -> IO b) -> IO b)
-> (Ptr PipelineCreateInfoKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PipelineCreateInfoKHR
p -> Ptr PipelineCreateInfoKHR -> PipelineCreateInfoKHR -> IO b -> IO b
forall b.
Ptr PipelineCreateInfoKHR -> PipelineCreateInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineCreateInfoKHR
p PipelineCreateInfoKHR
x (Ptr PipelineCreateInfoKHR -> IO b
f Ptr PipelineCreateInfoKHR
p)
pokeCStruct :: forall b.
Ptr PipelineCreateInfoKHR -> PipelineCreateInfoKHR -> IO b -> IO b
pokeCStruct Ptr PipelineCreateInfoKHR
p PipelineCreateInfoKHR
PipelineCreateInfoKHR IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCreateInfoKHR
p Ptr PipelineCreateInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_CREATE_INFO_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCreateInfoKHR
p Ptr PipelineCreateInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
IO b
f
cStructSize :: Int
cStructSize = Int
16
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr PipelineCreateInfoKHR -> IO b -> IO b
pokeZeroCStruct Ptr PipelineCreateInfoKHR
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCreateInfoKHR
p Ptr PipelineCreateInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_CREATE_INFO_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineCreateInfoKHR
p Ptr PipelineCreateInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
IO b
f
instance FromCStruct PipelineCreateInfoKHR where
peekCStruct :: Ptr PipelineCreateInfoKHR -> IO PipelineCreateInfoKHR
peekCStruct Ptr PipelineCreateInfoKHR
_ = PipelineCreateInfoKHR -> IO PipelineCreateInfoKHR
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PipelineCreateInfoKHR -> IO PipelineCreateInfoKHR)
-> PipelineCreateInfoKHR -> IO PipelineCreateInfoKHR
forall a b. (a -> b) -> a -> b
$ PipelineCreateInfoKHR
PipelineCreateInfoKHR
instance Storable PipelineCreateInfoKHR where
sizeOf :: PipelineCreateInfoKHR -> Int
sizeOf ~PipelineCreateInfoKHR
_ = Int
16
alignment :: PipelineCreateInfoKHR -> Int
alignment ~PipelineCreateInfoKHR
_ = Int
8
peek :: Ptr PipelineCreateInfoKHR -> IO PipelineCreateInfoKHR
peek = Ptr PipelineCreateInfoKHR -> IO PipelineCreateInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PipelineCreateInfoKHR -> PipelineCreateInfoKHR -> IO ()
poke Ptr PipelineCreateInfoKHR
ptr PipelineCreateInfoKHR
poked = Ptr PipelineCreateInfoKHR
-> PipelineCreateInfoKHR -> IO () -> IO ()
forall b.
Ptr PipelineCreateInfoKHR -> PipelineCreateInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineCreateInfoKHR
ptr PipelineCreateInfoKHR
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PipelineCreateInfoKHR where
zero :: PipelineCreateInfoKHR
zero = PipelineCreateInfoKHR
PipelineCreateInfoKHR
data PhysicalDevicePipelineBinaryFeaturesKHR = PhysicalDevicePipelineBinaryFeaturesKHR
{
PhysicalDevicePipelineBinaryFeaturesKHR -> Bool
pipelineBinaries :: Bool }
deriving (Typeable, PhysicalDevicePipelineBinaryFeaturesKHR
-> PhysicalDevicePipelineBinaryFeaturesKHR -> Bool
(PhysicalDevicePipelineBinaryFeaturesKHR
-> PhysicalDevicePipelineBinaryFeaturesKHR -> Bool)
-> (PhysicalDevicePipelineBinaryFeaturesKHR
-> PhysicalDevicePipelineBinaryFeaturesKHR -> Bool)
-> Eq PhysicalDevicePipelineBinaryFeaturesKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDevicePipelineBinaryFeaturesKHR
-> PhysicalDevicePipelineBinaryFeaturesKHR -> Bool
== :: PhysicalDevicePipelineBinaryFeaturesKHR
-> PhysicalDevicePipelineBinaryFeaturesKHR -> Bool
$c/= :: PhysicalDevicePipelineBinaryFeaturesKHR
-> PhysicalDevicePipelineBinaryFeaturesKHR -> Bool
/= :: PhysicalDevicePipelineBinaryFeaturesKHR
-> PhysicalDevicePipelineBinaryFeaturesKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDevicePipelineBinaryFeaturesKHR)
#endif
deriving instance Show PhysicalDevicePipelineBinaryFeaturesKHR
instance ToCStruct PhysicalDevicePipelineBinaryFeaturesKHR where
withCStruct :: forall b.
PhysicalDevicePipelineBinaryFeaturesKHR
-> (Ptr PhysicalDevicePipelineBinaryFeaturesKHR -> IO b) -> IO b
withCStruct PhysicalDevicePipelineBinaryFeaturesKHR
x Ptr PhysicalDevicePipelineBinaryFeaturesKHR -> IO b
f = Int
-> (Ptr PhysicalDevicePipelineBinaryFeaturesKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PhysicalDevicePipelineBinaryFeaturesKHR -> IO b) -> IO b)
-> (Ptr PhysicalDevicePipelineBinaryFeaturesKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDevicePipelineBinaryFeaturesKHR
p -> Ptr PhysicalDevicePipelineBinaryFeaturesKHR
-> PhysicalDevicePipelineBinaryFeaturesKHR -> IO b -> IO b
forall b.
Ptr PhysicalDevicePipelineBinaryFeaturesKHR
-> PhysicalDevicePipelineBinaryFeaturesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePipelineBinaryFeaturesKHR
p PhysicalDevicePipelineBinaryFeaturesKHR
x (Ptr PhysicalDevicePipelineBinaryFeaturesKHR -> IO b
f Ptr PhysicalDevicePipelineBinaryFeaturesKHR
p)
pokeCStruct :: forall b.
Ptr PhysicalDevicePipelineBinaryFeaturesKHR
-> PhysicalDevicePipelineBinaryFeaturesKHR -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePipelineBinaryFeaturesKHR
p PhysicalDevicePipelineBinaryFeaturesKHR{Bool
pipelineBinaries :: PhysicalDevicePipelineBinaryFeaturesKHR -> Bool
pipelineBinaries :: Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryFeaturesKHR
p Ptr PhysicalDevicePipelineBinaryFeaturesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_BINARY_FEATURES_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryFeaturesKHR
p Ptr PhysicalDevicePipelineBinaryFeaturesKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryFeaturesKHR
p Ptr PhysicalDevicePipelineBinaryFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
pipelineBinaries))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDevicePipelineBinaryFeaturesKHR -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDevicePipelineBinaryFeaturesKHR
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryFeaturesKHR
p Ptr PhysicalDevicePipelineBinaryFeaturesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_BINARY_FEATURES_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryFeaturesKHR
p Ptr PhysicalDevicePipelineBinaryFeaturesKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryFeaturesKHR
p Ptr PhysicalDevicePipelineBinaryFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDevicePipelineBinaryFeaturesKHR where
peekCStruct :: Ptr PhysicalDevicePipelineBinaryFeaturesKHR
-> IO PhysicalDevicePipelineBinaryFeaturesKHR
peekCStruct Ptr PhysicalDevicePipelineBinaryFeaturesKHR
p = do
pipelineBinaries <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDevicePipelineBinaryFeaturesKHR
p Ptr PhysicalDevicePipelineBinaryFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
pure $ PhysicalDevicePipelineBinaryFeaturesKHR
(bool32ToBool pipelineBinaries)
instance Storable PhysicalDevicePipelineBinaryFeaturesKHR where
sizeOf :: PhysicalDevicePipelineBinaryFeaturesKHR -> Int
sizeOf ~PhysicalDevicePipelineBinaryFeaturesKHR
_ = Int
24
alignment :: PhysicalDevicePipelineBinaryFeaturesKHR -> Int
alignment ~PhysicalDevicePipelineBinaryFeaturesKHR
_ = Int
8
peek :: Ptr PhysicalDevicePipelineBinaryFeaturesKHR
-> IO PhysicalDevicePipelineBinaryFeaturesKHR
peek = Ptr PhysicalDevicePipelineBinaryFeaturesKHR
-> IO PhysicalDevicePipelineBinaryFeaturesKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDevicePipelineBinaryFeaturesKHR
-> PhysicalDevicePipelineBinaryFeaturesKHR -> IO ()
poke Ptr PhysicalDevicePipelineBinaryFeaturesKHR
ptr PhysicalDevicePipelineBinaryFeaturesKHR
poked = Ptr PhysicalDevicePipelineBinaryFeaturesKHR
-> PhysicalDevicePipelineBinaryFeaturesKHR -> IO () -> IO ()
forall b.
Ptr PhysicalDevicePipelineBinaryFeaturesKHR
-> PhysicalDevicePipelineBinaryFeaturesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePipelineBinaryFeaturesKHR
ptr PhysicalDevicePipelineBinaryFeaturesKHR
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDevicePipelineBinaryFeaturesKHR where
zero :: PhysicalDevicePipelineBinaryFeaturesKHR
zero = Bool -> PhysicalDevicePipelineBinaryFeaturesKHR
PhysicalDevicePipelineBinaryFeaturesKHR
Bool
forall a. Zero a => a
zero
data DevicePipelineBinaryInternalCacheControlKHR = DevicePipelineBinaryInternalCacheControlKHR
{
DevicePipelineBinaryInternalCacheControlKHR -> Bool
disableInternalCache :: Bool }
deriving (Typeable, DevicePipelineBinaryInternalCacheControlKHR
-> DevicePipelineBinaryInternalCacheControlKHR -> Bool
(DevicePipelineBinaryInternalCacheControlKHR
-> DevicePipelineBinaryInternalCacheControlKHR -> Bool)
-> (DevicePipelineBinaryInternalCacheControlKHR
-> DevicePipelineBinaryInternalCacheControlKHR -> Bool)
-> Eq DevicePipelineBinaryInternalCacheControlKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DevicePipelineBinaryInternalCacheControlKHR
-> DevicePipelineBinaryInternalCacheControlKHR -> Bool
== :: DevicePipelineBinaryInternalCacheControlKHR
-> DevicePipelineBinaryInternalCacheControlKHR -> Bool
$c/= :: DevicePipelineBinaryInternalCacheControlKHR
-> DevicePipelineBinaryInternalCacheControlKHR -> Bool
/= :: DevicePipelineBinaryInternalCacheControlKHR
-> DevicePipelineBinaryInternalCacheControlKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DevicePipelineBinaryInternalCacheControlKHR)
#endif
deriving instance Show DevicePipelineBinaryInternalCacheControlKHR
instance ToCStruct DevicePipelineBinaryInternalCacheControlKHR where
withCStruct :: forall b.
DevicePipelineBinaryInternalCacheControlKHR
-> (Ptr DevicePipelineBinaryInternalCacheControlKHR -> IO b)
-> IO b
withCStruct DevicePipelineBinaryInternalCacheControlKHR
x Ptr DevicePipelineBinaryInternalCacheControlKHR -> IO b
f = Int
-> (Ptr DevicePipelineBinaryInternalCacheControlKHR -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr DevicePipelineBinaryInternalCacheControlKHR -> IO b) -> IO b)
-> (Ptr DevicePipelineBinaryInternalCacheControlKHR -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr DevicePipelineBinaryInternalCacheControlKHR
p -> Ptr DevicePipelineBinaryInternalCacheControlKHR
-> DevicePipelineBinaryInternalCacheControlKHR -> IO b -> IO b
forall b.
Ptr DevicePipelineBinaryInternalCacheControlKHR
-> DevicePipelineBinaryInternalCacheControlKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DevicePipelineBinaryInternalCacheControlKHR
p DevicePipelineBinaryInternalCacheControlKHR
x (Ptr DevicePipelineBinaryInternalCacheControlKHR -> IO b
f Ptr DevicePipelineBinaryInternalCacheControlKHR
p)
pokeCStruct :: forall b.
Ptr DevicePipelineBinaryInternalCacheControlKHR
-> DevicePipelineBinaryInternalCacheControlKHR -> IO b -> IO b
pokeCStruct Ptr DevicePipelineBinaryInternalCacheControlKHR
p DevicePipelineBinaryInternalCacheControlKHR{Bool
disableInternalCache :: DevicePipelineBinaryInternalCacheControlKHR -> Bool
disableInternalCache :: Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DevicePipelineBinaryInternalCacheControlKHR
p Ptr DevicePipelineBinaryInternalCacheControlKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_PIPELINE_BINARY_INTERNAL_CACHE_CONTROL_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DevicePipelineBinaryInternalCacheControlKHR
p Ptr DevicePipelineBinaryInternalCacheControlKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DevicePipelineBinaryInternalCacheControlKHR
p Ptr DevicePipelineBinaryInternalCacheControlKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
disableInternalCache))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr DevicePipelineBinaryInternalCacheControlKHR -> IO b -> IO b
pokeZeroCStruct Ptr DevicePipelineBinaryInternalCacheControlKHR
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DevicePipelineBinaryInternalCacheControlKHR
p Ptr DevicePipelineBinaryInternalCacheControlKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_PIPELINE_BINARY_INTERNAL_CACHE_CONTROL_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DevicePipelineBinaryInternalCacheControlKHR
p Ptr DevicePipelineBinaryInternalCacheControlKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DevicePipelineBinaryInternalCacheControlKHR
p Ptr DevicePipelineBinaryInternalCacheControlKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct DevicePipelineBinaryInternalCacheControlKHR where
peekCStruct :: Ptr DevicePipelineBinaryInternalCacheControlKHR
-> IO DevicePipelineBinaryInternalCacheControlKHR
peekCStruct Ptr DevicePipelineBinaryInternalCacheControlKHR
p = do
disableInternalCache <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr DevicePipelineBinaryInternalCacheControlKHR
p Ptr DevicePipelineBinaryInternalCacheControlKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
pure $ DevicePipelineBinaryInternalCacheControlKHR
(bool32ToBool disableInternalCache)
instance Storable DevicePipelineBinaryInternalCacheControlKHR where
sizeOf :: DevicePipelineBinaryInternalCacheControlKHR -> Int
sizeOf ~DevicePipelineBinaryInternalCacheControlKHR
_ = Int
24
alignment :: DevicePipelineBinaryInternalCacheControlKHR -> Int
alignment ~DevicePipelineBinaryInternalCacheControlKHR
_ = Int
8
peek :: Ptr DevicePipelineBinaryInternalCacheControlKHR
-> IO DevicePipelineBinaryInternalCacheControlKHR
peek = Ptr DevicePipelineBinaryInternalCacheControlKHR
-> IO DevicePipelineBinaryInternalCacheControlKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr DevicePipelineBinaryInternalCacheControlKHR
-> DevicePipelineBinaryInternalCacheControlKHR -> IO ()
poke Ptr DevicePipelineBinaryInternalCacheControlKHR
ptr DevicePipelineBinaryInternalCacheControlKHR
poked = Ptr DevicePipelineBinaryInternalCacheControlKHR
-> DevicePipelineBinaryInternalCacheControlKHR -> IO () -> IO ()
forall b.
Ptr DevicePipelineBinaryInternalCacheControlKHR
-> DevicePipelineBinaryInternalCacheControlKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DevicePipelineBinaryInternalCacheControlKHR
ptr DevicePipelineBinaryInternalCacheControlKHR
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero DevicePipelineBinaryInternalCacheControlKHR where
zero :: DevicePipelineBinaryInternalCacheControlKHR
zero = Bool -> DevicePipelineBinaryInternalCacheControlKHR
DevicePipelineBinaryInternalCacheControlKHR
Bool
forall a. Zero a => a
zero
data PhysicalDevicePipelineBinaryPropertiesKHR = PhysicalDevicePipelineBinaryPropertiesKHR
{
PhysicalDevicePipelineBinaryPropertiesKHR -> Bool
pipelineBinaryInternalCache :: Bool
,
PhysicalDevicePipelineBinaryPropertiesKHR -> Bool
pipelineBinaryInternalCacheControl :: Bool
,
PhysicalDevicePipelineBinaryPropertiesKHR -> Bool
pipelineBinaryPrefersInternalCache :: Bool
,
PhysicalDevicePipelineBinaryPropertiesKHR -> Bool
pipelineBinaryPrecompiledInternalCache :: Bool
,
PhysicalDevicePipelineBinaryPropertiesKHR -> Bool
pipelineBinaryCompressedData :: Bool
}
deriving (Typeable, PhysicalDevicePipelineBinaryPropertiesKHR
-> PhysicalDevicePipelineBinaryPropertiesKHR -> Bool
(PhysicalDevicePipelineBinaryPropertiesKHR
-> PhysicalDevicePipelineBinaryPropertiesKHR -> Bool)
-> (PhysicalDevicePipelineBinaryPropertiesKHR
-> PhysicalDevicePipelineBinaryPropertiesKHR -> Bool)
-> Eq PhysicalDevicePipelineBinaryPropertiesKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDevicePipelineBinaryPropertiesKHR
-> PhysicalDevicePipelineBinaryPropertiesKHR -> Bool
== :: PhysicalDevicePipelineBinaryPropertiesKHR
-> PhysicalDevicePipelineBinaryPropertiesKHR -> Bool
$c/= :: PhysicalDevicePipelineBinaryPropertiesKHR
-> PhysicalDevicePipelineBinaryPropertiesKHR -> Bool
/= :: PhysicalDevicePipelineBinaryPropertiesKHR
-> PhysicalDevicePipelineBinaryPropertiesKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDevicePipelineBinaryPropertiesKHR)
#endif
deriving instance Show PhysicalDevicePipelineBinaryPropertiesKHR
instance ToCStruct PhysicalDevicePipelineBinaryPropertiesKHR where
withCStruct :: forall b.
PhysicalDevicePipelineBinaryPropertiesKHR
-> (Ptr PhysicalDevicePipelineBinaryPropertiesKHR -> IO b) -> IO b
withCStruct PhysicalDevicePipelineBinaryPropertiesKHR
x Ptr PhysicalDevicePipelineBinaryPropertiesKHR -> IO b
f = Int
-> (Ptr PhysicalDevicePipelineBinaryPropertiesKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 ((Ptr PhysicalDevicePipelineBinaryPropertiesKHR -> IO b) -> IO b)
-> (Ptr PhysicalDevicePipelineBinaryPropertiesKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p -> Ptr PhysicalDevicePipelineBinaryPropertiesKHR
-> PhysicalDevicePipelineBinaryPropertiesKHR -> IO b -> IO b
forall b.
Ptr PhysicalDevicePipelineBinaryPropertiesKHR
-> PhysicalDevicePipelineBinaryPropertiesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p PhysicalDevicePipelineBinaryPropertiesKHR
x (Ptr PhysicalDevicePipelineBinaryPropertiesKHR -> IO b
f Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p)
pokeCStruct :: forall b.
Ptr PhysicalDevicePipelineBinaryPropertiesKHR
-> PhysicalDevicePipelineBinaryPropertiesKHR -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p PhysicalDevicePipelineBinaryPropertiesKHR{Bool
pipelineBinaryInternalCache :: PhysicalDevicePipelineBinaryPropertiesKHR -> Bool
pipelineBinaryInternalCacheControl :: PhysicalDevicePipelineBinaryPropertiesKHR -> Bool
pipelineBinaryPrefersInternalCache :: PhysicalDevicePipelineBinaryPropertiesKHR -> Bool
pipelineBinaryPrecompiledInternalCache :: PhysicalDevicePipelineBinaryPropertiesKHR -> Bool
pipelineBinaryCompressedData :: PhysicalDevicePipelineBinaryPropertiesKHR -> Bool
pipelineBinaryInternalCache :: Bool
pipelineBinaryInternalCacheControl :: Bool
pipelineBinaryPrefersInternalCache :: Bool
pipelineBinaryPrecompiledInternalCache :: Bool
pipelineBinaryCompressedData :: Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p Ptr PhysicalDevicePipelineBinaryPropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_BINARY_PROPERTIES_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p Ptr PhysicalDevicePipelineBinaryPropertiesKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p Ptr PhysicalDevicePipelineBinaryPropertiesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
pipelineBinaryInternalCache))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p Ptr PhysicalDevicePipelineBinaryPropertiesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
pipelineBinaryInternalCacheControl))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p Ptr PhysicalDevicePipelineBinaryPropertiesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
pipelineBinaryPrefersInternalCache))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p Ptr PhysicalDevicePipelineBinaryPropertiesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
pipelineBinaryPrecompiledInternalCache))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p Ptr PhysicalDevicePipelineBinaryPropertiesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
pipelineBinaryCompressedData))
IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDevicePipelineBinaryPropertiesKHR -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p Ptr PhysicalDevicePipelineBinaryPropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_BINARY_PROPERTIES_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p Ptr PhysicalDevicePipelineBinaryPropertiesKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p Ptr PhysicalDevicePipelineBinaryPropertiesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p Ptr PhysicalDevicePipelineBinaryPropertiesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p Ptr PhysicalDevicePipelineBinaryPropertiesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p Ptr PhysicalDevicePipelineBinaryPropertiesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p Ptr PhysicalDevicePipelineBinaryPropertiesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDevicePipelineBinaryPropertiesKHR where
peekCStruct :: Ptr PhysicalDevicePipelineBinaryPropertiesKHR
-> IO PhysicalDevicePipelineBinaryPropertiesKHR
peekCStruct Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p = do
pipelineBinaryInternalCache <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDevicePipelineBinaryPropertiesKHR
p Ptr PhysicalDevicePipelineBinaryPropertiesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
pipelineBinaryInternalCacheControl <- peek @Bool32 ((p `plusPtr` 20 :: Ptr Bool32))
pipelineBinaryPrefersInternalCache <- peek @Bool32 ((p `plusPtr` 24 :: Ptr Bool32))
pipelineBinaryPrecompiledInternalCache <- peek @Bool32 ((p `plusPtr` 28 :: Ptr Bool32))
pipelineBinaryCompressedData <- peek @Bool32 ((p `plusPtr` 32 :: Ptr Bool32))
pure $ PhysicalDevicePipelineBinaryPropertiesKHR
(bool32ToBool pipelineBinaryInternalCache)
(bool32ToBool pipelineBinaryInternalCacheControl)
(bool32ToBool pipelineBinaryPrefersInternalCache)
(bool32ToBool pipelineBinaryPrecompiledInternalCache)
(bool32ToBool pipelineBinaryCompressedData)
instance Storable PhysicalDevicePipelineBinaryPropertiesKHR where
sizeOf :: PhysicalDevicePipelineBinaryPropertiesKHR -> Int
sizeOf ~PhysicalDevicePipelineBinaryPropertiesKHR
_ = Int
40
alignment :: PhysicalDevicePipelineBinaryPropertiesKHR -> Int
alignment ~PhysicalDevicePipelineBinaryPropertiesKHR
_ = Int
8
peek :: Ptr PhysicalDevicePipelineBinaryPropertiesKHR
-> IO PhysicalDevicePipelineBinaryPropertiesKHR
peek = Ptr PhysicalDevicePipelineBinaryPropertiesKHR
-> IO PhysicalDevicePipelineBinaryPropertiesKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDevicePipelineBinaryPropertiesKHR
-> PhysicalDevicePipelineBinaryPropertiesKHR -> IO ()
poke Ptr PhysicalDevicePipelineBinaryPropertiesKHR
ptr PhysicalDevicePipelineBinaryPropertiesKHR
poked = Ptr PhysicalDevicePipelineBinaryPropertiesKHR
-> PhysicalDevicePipelineBinaryPropertiesKHR -> IO () -> IO ()
forall b.
Ptr PhysicalDevicePipelineBinaryPropertiesKHR
-> PhysicalDevicePipelineBinaryPropertiesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePipelineBinaryPropertiesKHR
ptr PhysicalDevicePipelineBinaryPropertiesKHR
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDevicePipelineBinaryPropertiesKHR where
zero :: PhysicalDevicePipelineBinaryPropertiesKHR
zero = Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDevicePipelineBinaryPropertiesKHR
PhysicalDevicePipelineBinaryPropertiesKHR
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
type KHR_PIPELINE_BINARY_SPEC_VERSION = 1
pattern KHR_PIPELINE_BINARY_SPEC_VERSION :: forall a . Integral a => a
pattern $mKHR_PIPELINE_BINARY_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bKHR_PIPELINE_BINARY_SPEC_VERSION :: forall a. Integral a => a
KHR_PIPELINE_BINARY_SPEC_VERSION = 1
type KHR_PIPELINE_BINARY_EXTENSION_NAME = "VK_KHR_pipeline_binary"
pattern KHR_PIPELINE_BINARY_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $mKHR_PIPELINE_BINARY_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bKHR_PIPELINE_BINARY_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
KHR_PIPELINE_BINARY_EXTENSION_NAME = "VK_KHR_pipeline_binary"