{-# language CPP #-}
module Vulkan.Extensions.VK_KHR_external_semaphore_fd ( getSemaphoreFdKHR
, importSemaphoreFdKHR
, ImportSemaphoreFdInfoKHR(..)
, SemaphoreGetFdInfoKHR(..)
, KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION
, pattern KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION
, KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME
, pattern KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME
) where
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytesAligned)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Foreign.C.Types (CInt(..))
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.C.Types (CInt)
import Foreign.C.Types (CInt(CInt))
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 Data.Int (Int32)
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Vulkan.NamedType ((:::))
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Dynamic (DeviceCmds(pVkGetSemaphoreFdKHR))
import Vulkan.Dynamic (DeviceCmds(pVkImportSemaphoreFdKHR))
import Vulkan.Core10.Handles (Device_T)
import Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits (ExternalSemaphoreHandleTypeFlagBits)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Core10.Handles (Semaphore)
import Vulkan.Core11.Enums.SemaphoreImportFlagBits (SemaphoreImportFlags)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Exception (VulkanException(..))
import Vulkan.Zero (Zero(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetSemaphoreFdKHR
:: FunPtr (Ptr Device_T -> Ptr SemaphoreGetFdInfoKHR -> Ptr CInt -> IO Result) -> Ptr Device_T -> Ptr SemaphoreGetFdInfoKHR -> Ptr CInt -> IO Result
getSemaphoreFdKHR :: forall io
. (MonadIO io)
=>
Device
->
SemaphoreGetFdInfoKHR
-> io (("fd" ::: Int32))
getSemaphoreFdKHR :: Device -> SemaphoreGetFdInfoKHR -> io ("fd" ::: Int32)
getSemaphoreFdKHR device :: Device
device getFdInfo :: SemaphoreGetFdInfoKHR
getFdInfo = IO ("fd" ::: Int32) -> io ("fd" ::: Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ("fd" ::: Int32) -> io ("fd" ::: Int32))
-> (ContT ("fd" ::: Int32) IO ("fd" ::: Int32)
-> IO ("fd" ::: Int32))
-> ContT ("fd" ::: Int32) IO ("fd" ::: Int32)
-> io ("fd" ::: Int32)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT ("fd" ::: Int32) IO ("fd" ::: Int32) -> IO ("fd" ::: Int32)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT ("fd" ::: Int32) IO ("fd" ::: Int32) -> io ("fd" ::: Int32))
-> ContT ("fd" ::: Int32) IO ("fd" ::: Int32)
-> io ("fd" ::: Int32)
forall a b. (a -> b) -> a -> b
$ do
let vkGetSemaphoreFdKHRPtr :: FunPtr
(Ptr Device_T
-> ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> ("pFd" ::: Ptr CInt)
-> IO Result)
vkGetSemaphoreFdKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> ("pFd" ::: Ptr CInt)
-> IO Result)
pVkGetSemaphoreFdKHR (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
IO () -> ContT ("fd" ::: Int32) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT ("fd" ::: Int32) IO ())
-> IO () -> ContT ("fd" ::: Int32) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> ("pFd" ::: Ptr CInt)
-> IO Result)
vkGetSemaphoreFdKHRPtr FunPtr
(Ptr Device_T
-> ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> ("pFd" ::: Ptr CInt)
-> IO Result)
-> FunPtr
(Ptr Device_T
-> ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> ("pFd" ::: Ptr CInt)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> ("pFd" ::: Ptr CInt)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkGetSemaphoreFdKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetSemaphoreFdKHR' :: Ptr Device_T
-> ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> ("pFd" ::: Ptr CInt)
-> IO Result
vkGetSemaphoreFdKHR' = FunPtr
(Ptr Device_T
-> ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> ("pFd" ::: Ptr CInt)
-> IO Result)
-> Ptr Device_T
-> ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> ("pFd" ::: Ptr CInt)
-> IO Result
mkVkGetSemaphoreFdKHR FunPtr
(Ptr Device_T
-> ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> ("pFd" ::: Ptr CInt)
-> IO Result)
vkGetSemaphoreFdKHRPtr
"pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
pGetFdInfo <- ((("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> IO ("fd" ::: Int32))
-> IO ("fd" ::: Int32))
-> ContT
("fd" ::: Int32) IO ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> IO ("fd" ::: Int32))
-> IO ("fd" ::: Int32))
-> ContT
("fd" ::: Int32) IO ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR))
-> ((("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> IO ("fd" ::: Int32))
-> IO ("fd" ::: Int32))
-> ContT
("fd" ::: Int32) IO ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
forall a b. (a -> b) -> a -> b
$ SemaphoreGetFdInfoKHR
-> (("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> IO ("fd" ::: Int32))
-> IO ("fd" ::: Int32)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (SemaphoreGetFdInfoKHR
getFdInfo)
"pFd" ::: Ptr CInt
pPFd <- ((("pFd" ::: Ptr CInt) -> IO ("fd" ::: Int32))
-> IO ("fd" ::: Int32))
-> ContT ("fd" ::: Int32) IO ("pFd" ::: Ptr CInt)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pFd" ::: Ptr CInt) -> IO ("fd" ::: Int32))
-> IO ("fd" ::: Int32))
-> ContT ("fd" ::: Int32) IO ("pFd" ::: Ptr CInt))
-> ((("pFd" ::: Ptr CInt) -> IO ("fd" ::: Int32))
-> IO ("fd" ::: Int32))
-> ContT ("fd" ::: Int32) IO ("pFd" ::: Ptr CInt)
forall a b. (a -> b) -> a -> b
$ IO ("pFd" ::: Ptr CInt)
-> (("pFd" ::: Ptr CInt) -> IO ())
-> (("pFd" ::: Ptr CInt) -> IO ("fd" ::: Int32))
-> IO ("fd" ::: Int32)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("pFd" ::: Ptr CInt)
forall a. Int -> IO (Ptr a)
callocBytes @CInt 4) ("pFd" ::: Ptr CInt) -> IO ()
forall a. Ptr a -> IO ()
free
Result
r <- IO Result -> ContT ("fd" ::: Int32) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT ("fd" ::: Int32) IO Result)
-> IO Result -> ContT ("fd" ::: Int32) IO Result
forall a b. (a -> b) -> a -> b
$ Ptr Device_T
-> ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> ("pFd" ::: Ptr CInt)
-> IO Result
vkGetSemaphoreFdKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) "pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
pGetFdInfo ("pFd" ::: Ptr CInt
pPFd)
IO () -> ContT ("fd" ::: Int32) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT ("fd" ::: Int32) IO ())
-> IO () -> ContT ("fd" ::: Int32) 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))
CInt
pFd <- IO CInt -> ContT ("fd" ::: Int32) IO CInt
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO CInt -> ContT ("fd" ::: Int32) IO CInt)
-> IO CInt -> ContT ("fd" ::: Int32) IO CInt
forall a b. (a -> b) -> a -> b
$ ("pFd" ::: Ptr CInt) -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek @CInt "pFd" ::: Ptr CInt
pPFd
("fd" ::: Int32) -> ContT ("fd" ::: Int32) IO ("fd" ::: Int32)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("fd" ::: Int32) -> ContT ("fd" ::: Int32) IO ("fd" ::: Int32))
-> ("fd" ::: Int32) -> ContT ("fd" ::: Int32) IO ("fd" ::: Int32)
forall a b. (a -> b) -> a -> b
$ (((\(CInt a :: "fd" ::: Int32
a) -> "fd" ::: Int32
a) CInt
pFd))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkImportSemaphoreFdKHR
:: FunPtr (Ptr Device_T -> Ptr ImportSemaphoreFdInfoKHR -> IO Result) -> Ptr Device_T -> Ptr ImportSemaphoreFdInfoKHR -> IO Result
importSemaphoreFdKHR :: forall io
. (MonadIO io)
=>
Device
->
ImportSemaphoreFdInfoKHR
-> io ()
importSemaphoreFdKHR :: Device -> ImportSemaphoreFdInfoKHR -> io ()
importSemaphoreFdKHR device :: Device
device importSemaphoreFdInfo :: ImportSemaphoreFdInfoKHR
importSemaphoreFdInfo = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkImportSemaphoreFdKHRPtr :: FunPtr
(Ptr Device_T
-> ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO Result)
vkImportSemaphoreFdKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO Result)
pVkImportSemaphoreFdKHR (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO Result)
vkImportSemaphoreFdKHRPtr FunPtr
(Ptr Device_T
-> ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO Result)
-> FunPtr
(Ptr Device_T
-> ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkImportSemaphoreFdKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkImportSemaphoreFdKHR' :: Ptr Device_T
-> ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO Result
vkImportSemaphoreFdKHR' = FunPtr
(Ptr Device_T
-> ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO Result)
-> Ptr Device_T
-> ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO Result
mkVkImportSemaphoreFdKHR FunPtr
(Ptr Device_T
-> ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO Result)
vkImportSemaphoreFdKHRPtr
"pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
pImportSemaphoreFdInfo <- ((("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR))
-> ((("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
forall a b. (a -> b) -> a -> b
$ ImportSemaphoreFdInfoKHR
-> (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (ImportSemaphoreFdInfoKHR
importSemaphoreFdInfo)
Result
r <- IO Result -> ContT () IO Result
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
$ Ptr Device_T
-> ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO Result
vkImportSemaphoreFdKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) "pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
pImportSemaphoreFdInfo
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
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))
data ImportSemaphoreFdInfoKHR = ImportSemaphoreFdInfoKHR
{
ImportSemaphoreFdInfoKHR -> Semaphore
semaphore :: Semaphore
,
ImportSemaphoreFdInfoKHR -> SemaphoreImportFlags
flags :: SemaphoreImportFlags
,
ImportSemaphoreFdInfoKHR -> ExternalSemaphoreHandleTypeFlagBits
handleType :: ExternalSemaphoreHandleTypeFlagBits
,
ImportSemaphoreFdInfoKHR -> "fd" ::: Int32
fd :: Int32
}
deriving (Typeable, ImportSemaphoreFdInfoKHR -> ImportSemaphoreFdInfoKHR -> Bool
(ImportSemaphoreFdInfoKHR -> ImportSemaphoreFdInfoKHR -> Bool)
-> (ImportSemaphoreFdInfoKHR -> ImportSemaphoreFdInfoKHR -> Bool)
-> Eq ImportSemaphoreFdInfoKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportSemaphoreFdInfoKHR -> ImportSemaphoreFdInfoKHR -> Bool
$c/= :: ImportSemaphoreFdInfoKHR -> ImportSemaphoreFdInfoKHR -> Bool
== :: ImportSemaphoreFdInfoKHR -> ImportSemaphoreFdInfoKHR -> Bool
$c== :: ImportSemaphoreFdInfoKHR -> ImportSemaphoreFdInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ImportSemaphoreFdInfoKHR)
#endif
deriving instance Show ImportSemaphoreFdInfoKHR
instance ToCStruct ImportSemaphoreFdInfoKHR where
withCStruct :: ImportSemaphoreFdInfoKHR
-> (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO b)
-> IO b
withCStruct x :: ImportSemaphoreFdInfoKHR
x f :: ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR) -> IO b
f = Int
-> Int
-> (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 40 8 ((("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO b)
-> IO b)
-> (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p -> ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> ImportSemaphoreFdInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p ImportSemaphoreFdInfoKHR
x (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR) -> IO b
f "pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p)
pokeCStruct :: ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> ImportSemaphoreFdInfoKHR -> IO b -> IO b
pokeCStruct p :: "pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p ImportSemaphoreFdInfoKHR{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Semaphore -> Semaphore -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> Int -> Ptr Semaphore
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Semaphore)) (Semaphore
semaphore)
Ptr SemaphoreImportFlags -> SemaphoreImportFlags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> Int -> Ptr SemaphoreImportFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr SemaphoreImportFlags)) (SemaphoreImportFlags
flags)
Ptr ExternalSemaphoreHandleTypeFlagBits
-> ExternalSemaphoreHandleTypeFlagBits -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> Int -> Ptr ExternalSemaphoreHandleTypeFlagBits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr ExternalSemaphoreHandleTypeFlagBits)) (ExternalSemaphoreHandleTypeFlagBits
handleType)
("pFd" ::: Ptr CInt) -> CInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> Int -> "pFd" ::: Ptr CInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr CInt)) (("fd" ::: Int32) -> CInt
CInt ("fd" ::: Int32
fd))
IO b
f
cStructSize :: Int
cStructSize = 40
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO b -> IO b
pokeZeroCStruct p :: "pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Semaphore -> Semaphore -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> Int -> Ptr Semaphore
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Semaphore)) (Semaphore
forall a. Zero a => a
zero)
Ptr ExternalSemaphoreHandleTypeFlagBits
-> ExternalSemaphoreHandleTypeFlagBits -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> Int -> Ptr ExternalSemaphoreHandleTypeFlagBits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr ExternalSemaphoreHandleTypeFlagBits)) (ExternalSemaphoreHandleTypeFlagBits
forall a. Zero a => a
zero)
("pFd" ::: Ptr CInt) -> CInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> Int -> "pFd" ::: Ptr CInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr CInt)) (("fd" ::: Int32) -> CInt
CInt ("fd" ::: Int32
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct ImportSemaphoreFdInfoKHR where
peekCStruct :: ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO ImportSemaphoreFdInfoKHR
peekCStruct p :: "pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p = do
Semaphore
semaphore <- Ptr Semaphore -> IO Semaphore
forall a. Storable a => Ptr a -> IO a
peek @Semaphore (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> Int -> Ptr Semaphore
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Semaphore))
SemaphoreImportFlags
flags <- Ptr SemaphoreImportFlags -> IO SemaphoreImportFlags
forall a. Storable a => Ptr a -> IO a
peek @SemaphoreImportFlags (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> Int -> Ptr SemaphoreImportFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr SemaphoreImportFlags))
ExternalSemaphoreHandleTypeFlagBits
handleType <- Ptr ExternalSemaphoreHandleTypeFlagBits
-> IO ExternalSemaphoreHandleTypeFlagBits
forall a. Storable a => Ptr a -> IO a
peek @ExternalSemaphoreHandleTypeFlagBits (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> Int -> Ptr ExternalSemaphoreHandleTypeFlagBits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr ExternalSemaphoreHandleTypeFlagBits))
CInt
fd <- ("pFd" ::: Ptr CInt) -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek @CInt (("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
p ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> Int -> "pFd" ::: Ptr CInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr CInt))
ImportSemaphoreFdInfoKHR -> IO ImportSemaphoreFdInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (ImportSemaphoreFdInfoKHR -> IO ImportSemaphoreFdInfoKHR)
-> ImportSemaphoreFdInfoKHR -> IO ImportSemaphoreFdInfoKHR
forall a b. (a -> b) -> a -> b
$ Semaphore
-> SemaphoreImportFlags
-> ExternalSemaphoreHandleTypeFlagBits
-> ("fd" ::: Int32)
-> ImportSemaphoreFdInfoKHR
ImportSemaphoreFdInfoKHR
Semaphore
semaphore SemaphoreImportFlags
flags ExternalSemaphoreHandleTypeFlagBits
handleType ((\(CInt a :: "fd" ::: Int32
a) -> "fd" ::: Int32
a) CInt
fd)
instance Storable ImportSemaphoreFdInfoKHR where
sizeOf :: ImportSemaphoreFdInfoKHR -> Int
sizeOf ~ImportSemaphoreFdInfoKHR
_ = 40
alignment :: ImportSemaphoreFdInfoKHR -> Int
alignment ~ImportSemaphoreFdInfoKHR
_ = 8
peek :: ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO ImportSemaphoreFdInfoKHR
peek = ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> IO ImportSemaphoreFdInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> ImportSemaphoreFdInfoKHR -> IO ()
poke ptr :: "pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
ptr poked :: ImportSemaphoreFdInfoKHR
poked = ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR)
-> ImportSemaphoreFdInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR
ptr ImportSemaphoreFdInfoKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero ImportSemaphoreFdInfoKHR where
zero :: ImportSemaphoreFdInfoKHR
zero = Semaphore
-> SemaphoreImportFlags
-> ExternalSemaphoreHandleTypeFlagBits
-> ("fd" ::: Int32)
-> ImportSemaphoreFdInfoKHR
ImportSemaphoreFdInfoKHR
Semaphore
forall a. Zero a => a
zero
SemaphoreImportFlags
forall a. Zero a => a
zero
ExternalSemaphoreHandleTypeFlagBits
forall a. Zero a => a
zero
"fd" ::: Int32
forall a. Zero a => a
zero
data SemaphoreGetFdInfoKHR = SemaphoreGetFdInfoKHR
{
SemaphoreGetFdInfoKHR -> Semaphore
semaphore :: Semaphore
,
SemaphoreGetFdInfoKHR -> ExternalSemaphoreHandleTypeFlagBits
handleType :: ExternalSemaphoreHandleTypeFlagBits
}
deriving (Typeable, SemaphoreGetFdInfoKHR -> SemaphoreGetFdInfoKHR -> Bool
(SemaphoreGetFdInfoKHR -> SemaphoreGetFdInfoKHR -> Bool)
-> (SemaphoreGetFdInfoKHR -> SemaphoreGetFdInfoKHR -> Bool)
-> Eq SemaphoreGetFdInfoKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SemaphoreGetFdInfoKHR -> SemaphoreGetFdInfoKHR -> Bool
$c/= :: SemaphoreGetFdInfoKHR -> SemaphoreGetFdInfoKHR -> Bool
== :: SemaphoreGetFdInfoKHR -> SemaphoreGetFdInfoKHR -> Bool
$c== :: SemaphoreGetFdInfoKHR -> SemaphoreGetFdInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SemaphoreGetFdInfoKHR)
#endif
deriving instance Show SemaphoreGetFdInfoKHR
instance ToCStruct SemaphoreGetFdInfoKHR where
withCStruct :: SemaphoreGetFdInfoKHR
-> (("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR) -> IO b) -> IO b
withCStruct x :: SemaphoreGetFdInfoKHR
x f :: ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR) -> IO b
f = Int
-> Int
-> (("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR) -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR) -> IO b) -> IO b)
-> (("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
p -> ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> SemaphoreGetFdInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
p SemaphoreGetFdInfoKHR
x (("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR) -> IO b
f "pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
p)
pokeCStruct :: ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> SemaphoreGetFdInfoKHR -> IO b -> IO b
pokeCStruct p :: "pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
p SemaphoreGetFdInfoKHR{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
p ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
p ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Semaphore -> Semaphore -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
p ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> Int -> Ptr Semaphore
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Semaphore)) (Semaphore
semaphore)
Ptr ExternalSemaphoreHandleTypeFlagBits
-> ExternalSemaphoreHandleTypeFlagBits -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
p ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> Int -> Ptr ExternalSemaphoreHandleTypeFlagBits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr ExternalSemaphoreHandleTypeFlagBits)) (ExternalSemaphoreHandleTypeFlagBits
handleType)
IO b
f
cStructSize :: Int
cStructSize = 32
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR) -> IO b -> IO b
pokeZeroCStruct p :: "pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
p ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
p ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Semaphore -> Semaphore -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
p ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> Int -> Ptr Semaphore
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Semaphore)) (Semaphore
forall a. Zero a => a
zero)
Ptr ExternalSemaphoreHandleTypeFlagBits
-> ExternalSemaphoreHandleTypeFlagBits -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
p ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> Int -> Ptr ExternalSemaphoreHandleTypeFlagBits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr ExternalSemaphoreHandleTypeFlagBits)) (ExternalSemaphoreHandleTypeFlagBits
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct SemaphoreGetFdInfoKHR where
peekCStruct :: ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> IO SemaphoreGetFdInfoKHR
peekCStruct p :: "pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
p = do
Semaphore
semaphore <- Ptr Semaphore -> IO Semaphore
forall a. Storable a => Ptr a -> IO a
peek @Semaphore (("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
p ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> Int -> Ptr Semaphore
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Semaphore))
ExternalSemaphoreHandleTypeFlagBits
handleType <- Ptr ExternalSemaphoreHandleTypeFlagBits
-> IO ExternalSemaphoreHandleTypeFlagBits
forall a. Storable a => Ptr a -> IO a
peek @ExternalSemaphoreHandleTypeFlagBits (("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
p ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> Int -> Ptr ExternalSemaphoreHandleTypeFlagBits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr ExternalSemaphoreHandleTypeFlagBits))
SemaphoreGetFdInfoKHR -> IO SemaphoreGetFdInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SemaphoreGetFdInfoKHR -> IO SemaphoreGetFdInfoKHR)
-> SemaphoreGetFdInfoKHR -> IO SemaphoreGetFdInfoKHR
forall a b. (a -> b) -> a -> b
$ Semaphore
-> ExternalSemaphoreHandleTypeFlagBits -> SemaphoreGetFdInfoKHR
SemaphoreGetFdInfoKHR
Semaphore
semaphore ExternalSemaphoreHandleTypeFlagBits
handleType
instance Storable SemaphoreGetFdInfoKHR where
sizeOf :: SemaphoreGetFdInfoKHR -> Int
sizeOf ~SemaphoreGetFdInfoKHR
_ = 32
alignment :: SemaphoreGetFdInfoKHR -> Int
alignment ~SemaphoreGetFdInfoKHR
_ = 8
peek :: ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> IO SemaphoreGetFdInfoKHR
peek = ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> IO SemaphoreGetFdInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> SemaphoreGetFdInfoKHR -> IO ()
poke ptr :: "pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
ptr poked :: SemaphoreGetFdInfoKHR
poked = ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR)
-> SemaphoreGetFdInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR
ptr SemaphoreGetFdInfoKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero SemaphoreGetFdInfoKHR where
zero :: SemaphoreGetFdInfoKHR
zero = Semaphore
-> ExternalSemaphoreHandleTypeFlagBits -> SemaphoreGetFdInfoKHR
SemaphoreGetFdInfoKHR
Semaphore
forall a. Zero a => a
zero
ExternalSemaphoreHandleTypeFlagBits
forall a. Zero a => a
zero
type KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION = 1
pattern KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION :: forall a . Integral a => a
pattern $bKHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION :: a
$mKHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION = 1
type KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME = "VK_KHR_external_semaphore_fd"
pattern KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bKHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME :: a
$mKHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME = "VK_KHR_external_semaphore_fd"