{-# 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(..)
, PipelineCreateFlagBits2KHR(..)
, PipelineCreateFlags2KHR
, 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.Extensions.VK_KHR_maintenance5 (PipelineCreateFlagBits2KHR(..))
import Vulkan.Extensions.VK_KHR_maintenance5 (PipelineCreateFlags2KHR)
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
$sel:deviceCmds:Device :: 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. 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
Ptr PipelineBinaryCreateInfoKHR
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)
Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
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)
Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
pPBinaries <- ((Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> IO (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
IO
(Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @PipelineBinaryHandlesInfoKHR)
Result
r <- IO Result
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR) IO Result
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 Result
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR) IO Result)
-> IO Result
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCreatePipelineBinariesKHR" (Ptr Device_T
-> Ptr PipelineBinaryCreateInfoKHR
-> Ptr AllocationCallbacks
-> Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO Result
vkCreatePipelineBinariesKHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
Ptr PipelineBinaryCreateInfoKHR
pCreateInfo
Ptr AllocationCallbacks
pAllocator
(Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
pPBinaries))
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 ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
"binaries" ::: PipelineBinaryHandlesInfoKHR
pBinaries <- IO ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
IO
("binaries" ::: PipelineBinaryHandlesInfoKHR)
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 ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
IO
("binaries" ::: PipelineBinaryHandlesInfoKHR))
-> IO ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
IO
("binaries" ::: PipelineBinaryHandlesInfoKHR)
forall a b. (a -> b) -> a -> b
$ forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PipelineBinaryHandlesInfoKHR Ptr ("binaries" ::: PipelineBinaryHandlesInfoKHR)
pPBinaries
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
IO
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
forall a.
a
-> ContT (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR) IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ((Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
IO
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR))
-> (Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
-> ContT
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
IO
(Result, "binaries" ::: PipelineBinaryHandlesInfoKHR)
forall a b. (a -> b) -> a -> b
$ (Result
r, "binaries" ::: PipelineBinaryHandlesInfoKHR
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
$sel:deviceCmds:Device :: 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. 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
Ptr AllocationCallbacks
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)
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
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkDestroyPipelineBinaryKHR" (Ptr Device_T
-> PipelineBinaryKHR -> Ptr AllocationCallbacks -> IO ()
vkDestroyPipelineBinaryKHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(PipelineBinaryKHR
pipelineBinary)
Ptr AllocationCallbacks
pAllocator)
() -> ContT () IO ()
forall a. a -> ContT () IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" 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
$sel:deviceCmds:Device :: 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. 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
Ptr PipelineCreateInfoKHR
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)
Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
pPPipelineKey <- ((Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR))
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR))
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR)
IO
(Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @PipelineBinaryKeyKHR)
Result
r <- IO Result
-> ContT ("pipelineKey" ::: PipelineBinaryKeyKHR) IO Result
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 Result
-> ContT ("pipelineKey" ::: PipelineBinaryKeyKHR) IO Result)
-> IO Result
-> ContT ("pipelineKey" ::: PipelineBinaryKeyKHR) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPipelineKeyKHR" (Ptr Device_T
-> Ptr PipelineCreateInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO Result
vkGetPipelineKeyKHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
Ptr PipelineCreateInfoKHR
pPipelineCreateInfo
(Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
pPPipelineKey))
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 ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
"pipelineKey" ::: PipelineBinaryKeyKHR
pPipelineKey <- IO ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR)
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 ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR))
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR)
forall a b. (a -> b) -> a -> b
$ forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PipelineBinaryKeyKHR Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
pPPipelineKey
("pipelineKey" ::: PipelineBinaryKeyKHR)
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR)
forall a. a -> ContT ("pipelineKey" ::: PipelineBinaryKeyKHR) IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("pipelineKey" ::: PipelineBinaryKeyKHR)
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR))
-> ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR)
forall a b. (a -> b) -> a -> b
$ ("pipelineKey" ::: PipelineBinaryKeyKHR
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
$sel:deviceCmds:Device :: 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. 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)
Ptr PipelineBinaryDataInfoKHR
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)
Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
pPPipelineBinaryKey <- ((Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
(Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @PipelineBinaryKeyKHR)
Ptr CSize
pPPipelineBinaryDataSize <- ((Ptr CSize
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
(Ptr CSize)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr CSize
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
(Ptr CSize))
-> ((Ptr CSize
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
(Ptr CSize)
forall a b. (a -> b) -> a -> b
$ IO (Ptr CSize)
-> (Ptr CSize -> IO ())
-> (Ptr CSize
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @CSize Int
8) Ptr CSize -> IO ()
forall a. Ptr a -> IO ()
free
Result
r <- IO Result
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
Result
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 Result
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
Result)
-> IO Result
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPipelineBinaryDataKHR" (Ptr Device_T
-> Ptr PipelineBinaryDataInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Ptr CSize
-> Ptr ()
-> IO Result
vkGetPipelineBinaryDataKHR'
Ptr Device_T
device'
Ptr PipelineBinaryDataInfoKHR
pInfo
(Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
pPPipelineBinaryKey)
(Ptr CSize
pPPipelineBinaryDataSize)
(Ptr ()
forall a. Ptr a
nullPtr))
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 ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
CSize
pPipelineBinaryDataSize <- IO CSize
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
CSize
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 CSize
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
CSize)
-> IO CSize
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
CSize
forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @CSize Ptr CSize
pPPipelineBinaryDataSize
Ptr ()
pPPipelineBinaryData <- ((Ptr ()
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
(Ptr ())
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr ()
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
(Ptr ()))
-> ((Ptr ()
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
(Ptr ())
forall a b. (a -> b) -> a -> b
$ IO (Ptr ())
-> (Ptr () -> IO ())
-> (Ptr ()
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @(()) (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ((forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @CSize @Word64 CSize
pPipelineBinaryDataSize)))) Ptr () -> IO ()
forall a. Ptr a -> IO ()
free
Result
r' <- IO Result
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
Result
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 Result
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
Result)
-> IO Result
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPipelineBinaryDataKHR" (Ptr Device_T
-> Ptr PipelineBinaryDataInfoKHR
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Ptr CSize
-> Ptr ()
-> IO Result
vkGetPipelineBinaryDataKHR'
Ptr Device_T
device'
Ptr PipelineBinaryDataInfoKHR
pInfo
(Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
pPPipelineBinaryKey)
(Ptr CSize
pPPipelineBinaryDataSize)
(Ptr ()
pPPipelineBinaryData))
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 ()
when (Result
r' Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r'))
"pipelineKey" ::: PipelineBinaryKeyKHR
pPipelineBinaryKey <- IO ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR)
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 ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR))
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR)
forall a b. (a -> b) -> a -> b
$ forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PipelineBinaryKeyKHR Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
pPPipelineBinaryKey
CSize
pPipelineBinaryDataSize'' <- IO CSize
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
CSize
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 CSize
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
CSize)
-> IO CSize
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
CSize
forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @CSize Ptr CSize
pPPipelineBinaryDataSize
"pipelineBinaryData" ::: ByteString
pPipelineBinaryData' <- IO ("pipelineBinaryData" ::: ByteString)
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
("pipelineBinaryData" ::: ByteString)
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 ("pipelineBinaryData" ::: ByteString)
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
("pipelineBinaryData" ::: ByteString))
-> IO ("pipelineBinaryData" ::: ByteString)
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
("pipelineBinaryData" ::: ByteString)
forall a b. (a -> b) -> a -> b
$ CStringLen -> IO ("pipelineBinaryData" ::: ByteString)
packCStringLen ( forall a b. Ptr a -> Ptr b
castPtr @() @CChar Ptr ()
pPPipelineBinaryData
, (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ((forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @CSize @Word64 CSize
pPipelineBinaryDataSize''))) )
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
forall a.
a
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString))
-> ("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
-> ContT
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
IO
("pipelineKey" ::: PipelineBinaryKeyKHR,
"pipelineBinaryData" ::: ByteString)
forall a b. (a -> b) -> a -> b
$ ("pipelineKey" ::: PipelineBinaryKeyKHR
pPipelineBinaryKey, "pipelineBinaryData" ::: ByteString
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
$sel:deviceCmds:Device :: 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. 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
Ptr ReleaseCapturedPipelineDataInfoKHR
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)
Ptr AllocationCallbacks
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)
Result
_ <- IO Result -> ContT () IO Result
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 Result -> ContT () IO Result)
-> IO Result -> ContT () IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkReleaseCapturedPipelineDataKHR" (Ptr Device_T
-> Ptr ReleaseCapturedPipelineDataInfoKHR
-> Ptr AllocationCallbacks
-> IO Result
vkReleaseCapturedPipelineDataKHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
Ptr ReleaseCapturedPipelineDataInfoKHR
pInfo
Ptr AllocationCallbacks
pAllocator)
() -> ContT () IO ()
forall a. a -> ContT () IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ()
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
$sel:keysAndDataInfo:PipelineBinaryCreateInfoKHR :: PipelineBinaryCreateInfoKHR -> Maybe PipelineBinaryKeysAndDataKHR
$sel:pipeline:PipelineBinaryCreateInfoKHR :: PipelineBinaryCreateInfoKHR -> Pipeline
$sel:pipelineCreateInfo:PipelineBinaryCreateInfoKHR :: 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)
Ptr PipelineBinaryKeysAndDataKHR
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)
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 PipelineBinaryKeysAndDataKHR)
-> Ptr PipelineBinaryKeysAndDataKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryCreateInfoKHR
p Ptr PipelineBinaryCreateInfoKHR
-> Int -> Ptr (Ptr PipelineBinaryKeysAndDataKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr PipelineBinaryKeysAndDataKHR))) Ptr PipelineBinaryKeysAndDataKHR
pKeysAndDataInfo''
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 Pipeline -> Pipeline -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryCreateInfoKHR
p Ptr PipelineBinaryCreateInfoKHR -> Int -> Ptr Pipeline
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Pipeline)) (Pipeline
pipeline)
Ptr PipelineCreateInfoKHR
pPipelineCreateInfo'' <- case ("pipelineCreateInfo" ::: Maybe PipelineCreateInfoKHR
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)
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 PipelineCreateInfoKHR)
-> Ptr PipelineCreateInfoKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryCreateInfoKHR
p Ptr PipelineBinaryCreateInfoKHR
-> Int -> Ptr (Ptr PipelineCreateInfoKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr PipelineCreateInfoKHR))) Ptr PipelineCreateInfoKHR
pPipelineCreateInfo''
IO b -> ContT b IO b
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 b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
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
Ptr PipelineBinaryKeysAndDataKHR
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)))
Maybe PipelineBinaryKeysAndDataKHR
pKeysAndDataInfo' <- (Ptr PipelineBinaryKeysAndDataKHR
-> IO PipelineBinaryKeysAndDataKHR)
-> Ptr PipelineBinaryKeysAndDataKHR
-> IO (Maybe PipelineBinaryKeysAndDataKHR)
forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr PipelineBinaryKeysAndDataKHR
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PipelineBinaryKeysAndDataKHR (Ptr PipelineBinaryKeysAndDataKHR
j)) Ptr PipelineBinaryKeysAndDataKHR
pKeysAndDataInfo
Pipeline
pipeline <- forall a. Storable a => Ptr a -> IO a
peek @Pipeline ((Ptr PipelineBinaryCreateInfoKHR
p Ptr PipelineBinaryCreateInfoKHR -> Int -> Ptr Pipeline
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Pipeline))
Ptr PipelineCreateInfoKHR
pPipelineCreateInfo <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr PipelineCreateInfoKHR) ((Ptr PipelineBinaryCreateInfoKHR
p Ptr PipelineBinaryCreateInfoKHR
-> Int -> Ptr (Ptr PipelineCreateInfoKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr PipelineCreateInfoKHR)))
"pipelineCreateInfo" ::: Maybe PipelineCreateInfoKHR
pPipelineCreateInfo' <- (Ptr PipelineCreateInfoKHR -> IO PipelineCreateInfoKHR)
-> Ptr PipelineCreateInfoKHR
-> IO ("pipelineCreateInfo" ::: Maybe PipelineCreateInfoKHR)
forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr PipelineCreateInfoKHR
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PipelineCreateInfoKHR (Ptr PipelineCreateInfoKHR
j)) Ptr PipelineCreateInfoKHR
pPipelineCreateInfo
PipelineBinaryCreateInfoKHR -> IO PipelineBinaryCreateInfoKHR
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PipelineBinaryCreateInfoKHR -> IO PipelineBinaryCreateInfoKHR)
-> PipelineBinaryCreateInfoKHR -> IO PipelineBinaryCreateInfoKHR
forall a b. (a -> b) -> a -> b
$ Maybe PipelineBinaryKeysAndDataKHR
-> Pipeline
-> ("pipelineCreateInfo" ::: Maybe PipelineCreateInfoKHR)
-> PipelineBinaryCreateInfoKHR
PipelineBinaryCreateInfoKHR
Maybe PipelineBinaryKeysAndDataKHR
pKeysAndDataInfo' Pipeline
pipeline "pipelineCreateInfo" ::: Maybe PipelineCreateInfoKHR
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
$sel:pipelineBinaryCount:PipelineBinaryHandlesInfoKHR :: ("binaries" ::: PipelineBinaryHandlesInfoKHR) -> Word32
$sel:pipelineBinaries:PipelineBinaryHandlesInfoKHR :: ("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
Word32
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))
Ptr PipelineBinaryKHR
pPipelineBinaries <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr PipelineBinaryKHR) ((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)))
("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO ("binaries" ::: PipelineBinaryHandlesInfoKHR)
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO ("binaries" ::: PipelineBinaryHandlesInfoKHR))
-> ("binaries" ::: PipelineBinaryHandlesInfoKHR)
-> IO ("binaries" ::: PipelineBinaryHandlesInfoKHR)
forall a b. (a -> b) -> a -> b
$ Word32
-> Ptr PipelineBinaryKHR
-> "binaries" ::: PipelineBinaryHandlesInfoKHR
PipelineBinaryHandlesInfoKHR
Word32
pipelineBinaryCount Ptr PipelineBinaryKHR
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 ()
$sel:dataSize:PipelineBinaryDataKHR :: PipelineBinaryDataKHR -> Word64
$sel:data':PipelineBinaryDataKHR :: 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
CSize
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))
Ptr ()
pData <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr PipelineBinaryDataKHR
p Ptr PipelineBinaryDataKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ())))
PipelineBinaryDataKHR -> IO PipelineBinaryDataKHR
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PipelineBinaryDataKHR -> IO PipelineBinaryDataKHR)
-> PipelineBinaryDataKHR -> IO PipelineBinaryDataKHR
forall a b. (a -> b) -> a -> b
$ Word64 -> Ptr () -> PipelineBinaryDataKHR
PipelineBinaryDataKHR
(forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @CSize @Word64 CSize
dataSize) Ptr ()
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
$sel:pipelineBinaryKeys:PipelineBinaryKeysAndDataKHR :: PipelineBinaryKeysAndDataKHR
-> Vector ("pipelineKey" ::: PipelineBinaryKeyKHR)
$sel:pipelineBinaryData:PipelineBinaryKeysAndDataKHR :: 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. 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))
Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
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)
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
$ (Int -> ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO ())
-> Vector ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
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)) (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
$ Ptr (Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR))
-> Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryKeysAndDataKHR
p Ptr PipelineBinaryKeysAndDataKHR
-> Int -> Ptr (Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr PipelineBinaryKeyKHR))) (Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
pPPipelineBinaryKeys')
Ptr PipelineBinaryDataKHR
pPPipelineBinaryData' <- ((Ptr PipelineBinaryDataKHR -> IO b) -> IO b)
-> ContT b IO (Ptr PipelineBinaryDataKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr PipelineBinaryDataKHR -> IO b) -> IO b)
-> ContT b IO (Ptr PipelineBinaryDataKHR))
-> ((Ptr PipelineBinaryDataKHR -> IO b) -> IO b)
-> ContT b IO (Ptr PipelineBinaryDataKHR)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @PipelineBinaryDataKHR ((Vector PipelineBinaryDataKHR -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector PipelineBinaryDataKHR
pipelineBinaryData)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
16)
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
$ (Int -> PipelineBinaryDataKHR -> IO ())
-> Vector PipelineBinaryDataKHR -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
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)) (Vector PipelineBinaryDataKHR
pipelineBinaryData)
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 PipelineBinaryDataKHR)
-> Ptr PipelineBinaryDataKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryKeysAndDataKHR
p Ptr PipelineBinaryKeysAndDataKHR
-> Int -> Ptr (Ptr PipelineBinaryDataKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr PipelineBinaryDataKHR))) (Ptr PipelineBinaryDataKHR
pPPipelineBinaryData')
IO b -> ContT b IO b
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 b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
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
Word32
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))
Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR)
pPipelineBinaryKeys <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr PipelineBinaryKeyKHR) ((Ptr PipelineBinaryKeysAndDataKHR
p Ptr PipelineBinaryKeysAndDataKHR
-> Int -> Ptr (Ptr ("pipelineKey" ::: PipelineBinaryKeyKHR))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr PipelineBinaryKeyKHR)))
Vector ("pipelineKey" ::: PipelineBinaryKeyKHR)
pPipelineBinaryKeys' <- Int
-> (Int -> IO ("pipelineKey" ::: PipelineBinaryKeyKHR))
-> IO (Vector ("pipelineKey" ::: PipelineBinaryKeyKHR))
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
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)))
Ptr PipelineBinaryDataKHR
pPipelineBinaryData <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr PipelineBinaryDataKHR) ((Ptr PipelineBinaryKeysAndDataKHR
p Ptr PipelineBinaryKeysAndDataKHR
-> Int -> Ptr (Ptr PipelineBinaryDataKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr PipelineBinaryDataKHR)))
Vector PipelineBinaryDataKHR
pPipelineBinaryData' <- Int
-> (Int -> IO PipelineBinaryDataKHR)
-> IO (Vector PipelineBinaryDataKHR)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
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)))
PipelineBinaryKeysAndDataKHR -> IO PipelineBinaryKeysAndDataKHR
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PipelineBinaryKeysAndDataKHR -> IO PipelineBinaryKeysAndDataKHR)
-> PipelineBinaryKeysAndDataKHR -> IO PipelineBinaryKeysAndDataKHR
forall a b. (a -> b) -> a -> b
$ Vector ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> Vector PipelineBinaryDataKHR -> PipelineBinaryKeysAndDataKHR
PipelineBinaryKeysAndDataKHR
Vector ("pipelineKey" ::: PipelineBinaryKeyKHR)
pPipelineBinaryKeys' Vector PipelineBinaryDataKHR
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
$sel:keySize:PipelineBinaryKeyKHR :: ("pipelineKey" ::: PipelineBinaryKeyKHR) -> Word32
$sel:key:PipelineBinaryKeyKHR :: ("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
Word32
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))
"pipelineBinaryData" ::: ByteString
key <- Ptr (FixedArray MAX_PIPELINE_BINARY_KEY_SIZE_KHR Word8)
-> IO ("pipelineBinaryData" ::: ByteString)
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8)
-> IO ("pipelineBinaryData" ::: ByteString)
peekByteStringFromSizedVectorPtr ((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)))
("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR)
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR))
-> ("pipelineKey" ::: PipelineBinaryKeyKHR)
-> IO ("pipelineKey" ::: PipelineBinaryKeyKHR)
forall a b. (a -> b) -> a -> b
$ Word32
-> ("pipelineBinaryData" ::: ByteString)
-> "pipelineKey" ::: PipelineBinaryKeyKHR
PipelineBinaryKeyKHR
Word32
keySize "pipelineBinaryData" ::: ByteString
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
$sel:pipelineBinaries:PipelineBinaryInfoKHR :: 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))
Ptr PipelineBinaryKHR
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)
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
$ (Int -> PipelineBinaryKHR -> IO ())
-> Vector PipelineBinaryKHR -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
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)) (Vector PipelineBinaryKHR
pipelineBinaries)
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 PipelineBinaryKHR) -> Ptr PipelineBinaryKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineBinaryInfoKHR
p Ptr PipelineBinaryInfoKHR -> Int -> Ptr (Ptr PipelineBinaryKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr PipelineBinaryKHR))) (Ptr PipelineBinaryKHR
pPPipelineBinaries')
IO b -> ContT b IO b
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 b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
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
Word32
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))
Ptr PipelineBinaryKHR
pPipelineBinaries <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr PipelineBinaryKHR) ((Ptr PipelineBinaryInfoKHR
p Ptr PipelineBinaryInfoKHR -> Int -> Ptr (Ptr PipelineBinaryKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr PipelineBinaryKHR)))
Vector PipelineBinaryKHR
pPipelineBinaries' <- Int
-> (Int -> IO PipelineBinaryKHR) -> IO (Vector PipelineBinaryKHR)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
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)))
PipelineBinaryInfoKHR -> IO PipelineBinaryInfoKHR
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PipelineBinaryInfoKHR -> IO PipelineBinaryInfoKHR)
-> PipelineBinaryInfoKHR -> IO PipelineBinaryInfoKHR
forall a b. (a -> b) -> a -> b
$ Vector PipelineBinaryKHR -> PipelineBinaryInfoKHR
PipelineBinaryInfoKHR
Vector PipelineBinaryKHR
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
$sel:pipeline:ReleaseCapturedPipelineDataInfoKHR :: 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
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))
ReleaseCapturedPipelineDataInfoKHR
-> IO ReleaseCapturedPipelineDataInfoKHR
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (ReleaseCapturedPipelineDataInfoKHR
-> IO ReleaseCapturedPipelineDataInfoKHR)
-> ReleaseCapturedPipelineDataInfoKHR
-> IO ReleaseCapturedPipelineDataInfoKHR
forall a b. (a -> b) -> a -> b
$ Pipeline -> ReleaseCapturedPipelineDataInfoKHR
ReleaseCapturedPipelineDataInfoKHR
Pipeline
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
$sel:pipelineBinary:PipelineBinaryDataInfoKHR :: 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
PipelineBinaryKHR
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))
PipelineBinaryDataInfoKHR -> IO PipelineBinaryDataInfoKHR
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PipelineBinaryDataInfoKHR -> IO PipelineBinaryDataInfoKHR)
-> PipelineBinaryDataInfoKHR -> IO PipelineBinaryDataInfoKHR
forall a b. (a -> b) -> a -> b
$ PipelineBinaryKHR -> PipelineBinaryDataInfoKHR
PipelineBinaryDataInfoKHR
PipelineBinaryKHR
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
$sel:pipelineBinaries:PhysicalDevicePipelineBinaryFeaturesKHR :: 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
Bool32
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))
PhysicalDevicePipelineBinaryFeaturesKHR
-> IO PhysicalDevicePipelineBinaryFeaturesKHR
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDevicePipelineBinaryFeaturesKHR
-> IO PhysicalDevicePipelineBinaryFeaturesKHR)
-> PhysicalDevicePipelineBinaryFeaturesKHR
-> IO PhysicalDevicePipelineBinaryFeaturesKHR
forall a b. (a -> b) -> a -> b
$ Bool -> PhysicalDevicePipelineBinaryFeaturesKHR
PhysicalDevicePipelineBinaryFeaturesKHR
(Bool32 -> Bool
bool32ToBool Bool32
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
$sel:disableInternalCache:DevicePipelineBinaryInternalCacheControlKHR :: 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
Bool32
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))
DevicePipelineBinaryInternalCacheControlKHR
-> IO DevicePipelineBinaryInternalCacheControlKHR
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (DevicePipelineBinaryInternalCacheControlKHR
-> IO DevicePipelineBinaryInternalCacheControlKHR)
-> DevicePipelineBinaryInternalCacheControlKHR
-> IO DevicePipelineBinaryInternalCacheControlKHR
forall a b. (a -> b) -> a -> b
$ Bool -> DevicePipelineBinaryInternalCacheControlKHR
DevicePipelineBinaryInternalCacheControlKHR
(Bool32 -> Bool
bool32ToBool Bool32
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
$sel:pipelineBinaryInternalCache:PhysicalDevicePipelineBinaryPropertiesKHR :: PhysicalDevicePipelineBinaryPropertiesKHR -> Bool
$sel:pipelineBinaryInternalCacheControl:PhysicalDevicePipelineBinaryPropertiesKHR :: PhysicalDevicePipelineBinaryPropertiesKHR -> Bool
$sel:pipelineBinaryPrefersInternalCache:PhysicalDevicePipelineBinaryPropertiesKHR :: PhysicalDevicePipelineBinaryPropertiesKHR -> Bool
$sel:pipelineBinaryPrecompiledInternalCache:PhysicalDevicePipelineBinaryPropertiesKHR :: PhysicalDevicePipelineBinaryPropertiesKHR -> Bool
$sel:pipelineBinaryCompressedData:PhysicalDevicePipelineBinaryPropertiesKHR :: 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
Bool32
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))
Bool32
pipelineBinaryInternalCacheControl <- 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
20 :: Ptr Bool32))
Bool32
pipelineBinaryPrefersInternalCache <- 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
24 :: Ptr Bool32))
Bool32
pipelineBinaryPrecompiledInternalCache <- 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
28 :: Ptr Bool32))
Bool32
pipelineBinaryCompressedData <- 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
32 :: Ptr Bool32))
PhysicalDevicePipelineBinaryPropertiesKHR
-> IO PhysicalDevicePipelineBinaryPropertiesKHR
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDevicePipelineBinaryPropertiesKHR
-> IO PhysicalDevicePipelineBinaryPropertiesKHR)
-> PhysicalDevicePipelineBinaryPropertiesKHR
-> IO PhysicalDevicePipelineBinaryPropertiesKHR
forall a b. (a -> b) -> a -> b
$ Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDevicePipelineBinaryPropertiesKHR
PhysicalDevicePipelineBinaryPropertiesKHR
(Bool32 -> Bool
bool32ToBool Bool32
pipelineBinaryInternalCache)
(Bool32 -> Bool
bool32ToBool Bool32
pipelineBinaryInternalCacheControl)
(Bool32 -> Bool
bool32ToBool Bool32
pipelineBinaryPrefersInternalCache)
(Bool32 -> Bool
bool32ToBool Bool32
pipelineBinaryPrecompiledInternalCache)
(Bool32 -> Bool
bool32ToBool Bool32
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"