{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_metal_objects ( exportMetalObjectsEXT
, ExportMetalObjectCreateInfoEXT(..)
, ExportMetalObjectsInfoEXT(..)
, ExportMetalDeviceInfoEXT(..)
, ExportMetalCommandQueueInfoEXT(..)
, ExportMetalBufferInfoEXT(..)
, ImportMetalBufferInfoEXT(..)
, ExportMetalTextureInfoEXT(..)
, ImportMetalTextureInfoEXT(..)
, ExportMetalIOSurfaceInfoEXT(..)
, ImportMetalIOSurfaceInfoEXT(..)
, ExportMetalSharedEventInfoEXT(..)
, ImportMetalSharedEventInfoEXT(..)
, ExportMetalObjectTypeFlagsEXT
, ExportMetalObjectTypeFlagBitsEXT( EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT
, EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT
, EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT
, EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT
, EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT
, EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT
, ..
)
, EXT_METAL_OBJECTS_SPEC_VERSION
, pattern EXT_METAL_OBJECTS_SPEC_VERSION
, EXT_METAL_OBJECTS_EXTENSION_NAME
, pattern EXT_METAL_OBJECTS_EXTENSION_NAME
, MTLDevice_id
, MTLCommandQueue_id
, MTLBuffer_id
, MTLTexture_id
, IOSurfaceRef
, MTLSharedEvent_id
) where
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Data.Typeable (eqT)
import Foreign.Marshal.Alloc (allocaBytes)
import GHC.IO (throwIO)
import GHC.Ptr (castPtr)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showString)
import Numeric (showHex)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import Data.Type.Equality ((:~:)(Refl))
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Vulkan.CStruct.Extends (forgetExtensions)
import Vulkan.Core10.Handles (BufferView)
import Vulkan.CStruct.Extends (Chain)
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.Handles (Device(Device))
import Vulkan.Dynamic (DeviceCmds(pVkExportMetalObjectsEXT))
import Vulkan.Core10.Handles (DeviceMemory)
import Vulkan.Core10.Handles (Device_T)
import Vulkan.Core10.Handles (Event)
import Vulkan.CStruct.Extends (Extends)
import Vulkan.CStruct.Extends (Extendss)
import Vulkan.CStruct.Extends (Extensible(..))
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Core10.Handles (Image)
import Vulkan.Core10.Enums.ImageAspectFlagBits (ImageAspectFlagBits)
import Vulkan.Core10.Handles (ImageView)
import Vulkan.CStruct.Extends (PeekChain)
import Vulkan.CStruct.Extends (PeekChain(..))
import Vulkan.CStruct.Extends (PokeChain)
import Vulkan.CStruct.Extends (PokeChain(..))
import Vulkan.Core10.Handles (Queue_T)
import Vulkan.Core10.Handles (Semaphore)
import Vulkan.CStruct.Extends (SomeStruct)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_EXPORT_METAL_BUFFER_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_EXPORT_METAL_COMMAND_QUEUE_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_EXPORT_METAL_DEVICE_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_EXPORT_METAL_IO_SURFACE_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_EXPORT_METAL_OBJECTS_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_EXPORT_METAL_OBJECT_CREATE_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_EXPORT_METAL_SHARED_EVENT_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_EXPORT_METAL_TEXTURE_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_IMPORT_METAL_BUFFER_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_IMPORT_METAL_IO_SURFACE_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_IMPORT_METAL_SHARED_EVENT_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_IMPORT_METAL_TEXTURE_INFO_EXT))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkExportMetalObjectsEXT
:: FunPtr (Ptr Device_T -> Ptr (SomeStruct ExportMetalObjectsInfoEXT) -> IO ()) -> Ptr Device_T -> Ptr (SomeStruct ExportMetalObjectsInfoEXT) -> IO ()
exportMetalObjectsEXT :: forall a io
. ( Extendss ExportMetalObjectsInfoEXT a
, PokeChain a
, PeekChain a
, MonadIO io )
=>
Device
-> io (ExportMetalObjectsInfoEXT a)
exportMetalObjectsEXT :: forall (a :: [*]) (io :: * -> *).
(Extendss ExportMetalObjectsInfoEXT a, PokeChain a, PeekChain a,
MonadIO io) =>
Device -> io (ExportMetalObjectsInfoEXT a)
exportMetalObjectsEXT Device
device = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkExportMetalObjectsEXTPtr :: FunPtr
(Ptr Device_T
-> ("pMetalObjectsInfo"
::: Ptr (SomeStruct ExportMetalObjectsInfoEXT))
-> IO ())
vkExportMetalObjectsEXTPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pMetalObjectsInfo"
::: Ptr (SomeStruct ExportMetalObjectsInfoEXT))
-> IO ())
pVkExportMetalObjectsEXT (case Device
device of Device{DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pMetalObjectsInfo"
::: Ptr (SomeStruct ExportMetalObjectsInfoEXT))
-> IO ())
vkExportMetalObjectsEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkExportMetalObjectsEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkExportMetalObjectsEXT' :: Ptr Device_T
-> ("pMetalObjectsInfo"
::: Ptr (SomeStruct ExportMetalObjectsInfoEXT))
-> IO ()
vkExportMetalObjectsEXT' = FunPtr
(Ptr Device_T
-> ("pMetalObjectsInfo"
::: Ptr (SomeStruct ExportMetalObjectsInfoEXT))
-> IO ())
-> Ptr Device_T
-> ("pMetalObjectsInfo"
::: Ptr (SomeStruct ExportMetalObjectsInfoEXT))
-> IO ()
mkVkExportMetalObjectsEXT FunPtr
(Ptr Device_T
-> ("pMetalObjectsInfo"
::: Ptr (SomeStruct ExportMetalObjectsInfoEXT))
-> IO ())
vkExportMetalObjectsEXTPtr
Ptr (ExportMetalObjectsInfoEXT a)
pPMetalObjectsInfo <- 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 @(ExportMetalObjectsInfoEXT _))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkExportMetalObjectsEXT" (Ptr Device_T
-> ("pMetalObjectsInfo"
::: Ptr (SomeStruct ExportMetalObjectsInfoEXT))
-> IO ()
vkExportMetalObjectsEXT'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (ExportMetalObjectsInfoEXT a)
pPMetalObjectsInfo)))
ExportMetalObjectsInfoEXT a
pMetalObjectsInfo <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @(ExportMetalObjectsInfoEXT _) Ptr (ExportMetalObjectsInfoEXT a)
pPMetalObjectsInfo
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (ExportMetalObjectsInfoEXT a
pMetalObjectsInfo)
data ExportMetalObjectCreateInfoEXT = ExportMetalObjectCreateInfoEXT
{
ExportMetalObjectCreateInfoEXT -> ExportMetalObjectTypeFlagBitsEXT
exportObjectType :: ExportMetalObjectTypeFlagBitsEXT }
deriving (Typeable, ExportMetalObjectCreateInfoEXT
-> ExportMetalObjectCreateInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportMetalObjectCreateInfoEXT
-> ExportMetalObjectCreateInfoEXT -> Bool
$c/= :: ExportMetalObjectCreateInfoEXT
-> ExportMetalObjectCreateInfoEXT -> Bool
== :: ExportMetalObjectCreateInfoEXT
-> ExportMetalObjectCreateInfoEXT -> Bool
$c== :: ExportMetalObjectCreateInfoEXT
-> ExportMetalObjectCreateInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ExportMetalObjectCreateInfoEXT)
#endif
deriving instance Show ExportMetalObjectCreateInfoEXT
instance ToCStruct ExportMetalObjectCreateInfoEXT where
withCStruct :: forall b.
ExportMetalObjectCreateInfoEXT
-> (Ptr ExportMetalObjectCreateInfoEXT -> IO b) -> IO b
withCStruct ExportMetalObjectCreateInfoEXT
x Ptr ExportMetalObjectCreateInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr ExportMetalObjectCreateInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ExportMetalObjectCreateInfoEXT
p ExportMetalObjectCreateInfoEXT
x (Ptr ExportMetalObjectCreateInfoEXT -> IO b
f Ptr ExportMetalObjectCreateInfoEXT
p)
pokeCStruct :: forall b.
Ptr ExportMetalObjectCreateInfoEXT
-> ExportMetalObjectCreateInfoEXT -> IO b -> IO b
pokeCStruct Ptr ExportMetalObjectCreateInfoEXT
p ExportMetalObjectCreateInfoEXT{ExportMetalObjectTypeFlagBitsEXT
exportObjectType :: ExportMetalObjectTypeFlagBitsEXT
$sel:exportObjectType:ExportMetalObjectCreateInfoEXT :: ExportMetalObjectCreateInfoEXT -> ExportMetalObjectTypeFlagBitsEXT
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalObjectCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_EXPORT_METAL_OBJECT_CREATE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalObjectCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalObjectCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ExportMetalObjectTypeFlagBitsEXT)) (ExportMetalObjectTypeFlagBitsEXT
exportObjectType)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr ExportMetalObjectCreateInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr ExportMetalObjectCreateInfoEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalObjectCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_EXPORT_METAL_OBJECT_CREATE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalObjectCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
IO b
f
instance FromCStruct ExportMetalObjectCreateInfoEXT where
peekCStruct :: Ptr ExportMetalObjectCreateInfoEXT
-> IO ExportMetalObjectCreateInfoEXT
peekCStruct Ptr ExportMetalObjectCreateInfoEXT
p = do
ExportMetalObjectTypeFlagBitsEXT
exportObjectType <- forall a. Storable a => Ptr a -> IO a
peek @ExportMetalObjectTypeFlagBitsEXT ((Ptr ExportMetalObjectCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ExportMetalObjectTypeFlagBitsEXT))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ExportMetalObjectTypeFlagBitsEXT -> ExportMetalObjectCreateInfoEXT
ExportMetalObjectCreateInfoEXT
ExportMetalObjectTypeFlagBitsEXT
exportObjectType
instance Storable ExportMetalObjectCreateInfoEXT where
sizeOf :: ExportMetalObjectCreateInfoEXT -> Int
sizeOf ~ExportMetalObjectCreateInfoEXT
_ = Int
24
alignment :: ExportMetalObjectCreateInfoEXT -> Int
alignment ~ExportMetalObjectCreateInfoEXT
_ = Int
8
peek :: Ptr ExportMetalObjectCreateInfoEXT
-> IO ExportMetalObjectCreateInfoEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr ExportMetalObjectCreateInfoEXT
-> ExportMetalObjectCreateInfoEXT -> IO ()
poke Ptr ExportMetalObjectCreateInfoEXT
ptr ExportMetalObjectCreateInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ExportMetalObjectCreateInfoEXT
ptr ExportMetalObjectCreateInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero ExportMetalObjectCreateInfoEXT where
zero :: ExportMetalObjectCreateInfoEXT
zero = ExportMetalObjectTypeFlagBitsEXT -> ExportMetalObjectCreateInfoEXT
ExportMetalObjectCreateInfoEXT
forall a. Zero a => a
zero
data ExportMetalObjectsInfoEXT (es :: [Type]) = ExportMetalObjectsInfoEXT
{
forall (es :: [*]). ExportMetalObjectsInfoEXT es -> Chain es
next :: Chain es }
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ExportMetalObjectsInfoEXT (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (ExportMetalObjectsInfoEXT es)
instance Extensible ExportMetalObjectsInfoEXT where
extensibleTypeName :: String
extensibleTypeName = String
"ExportMetalObjectsInfoEXT"
setNext :: forall (ds :: [*]) (es :: [*]).
ExportMetalObjectsInfoEXT ds
-> Chain es -> ExportMetalObjectsInfoEXT es
setNext ExportMetalObjectsInfoEXT ds
_ Chain es
next' = ExportMetalObjectsInfoEXT{$sel:next:ExportMetalObjectsInfoEXT :: Chain es
next = Chain es
next'}
getNext :: forall (es :: [*]). ExportMetalObjectsInfoEXT es -> Chain es
getNext ExportMetalObjectsInfoEXT{Chain es
next :: Chain es
$sel:next:ExportMetalObjectsInfoEXT :: forall (es :: [*]). ExportMetalObjectsInfoEXT es -> Chain es
..} = Chain es
next
extends :: forall e b proxy. Typeable e => proxy e -> (Extends ExportMetalObjectsInfoEXT e => b) -> Maybe b
extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e -> (Extends ExportMetalObjectsInfoEXT e => b) -> Maybe b
extends proxy e
_ Extends ExportMetalObjectsInfoEXT e => b
f
| Just e :~: ExportMetalSharedEventInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @ExportMetalSharedEventInfoEXT = forall a. a -> Maybe a
Just Extends ExportMetalObjectsInfoEXT e => b
f
| Just e :~: ExportMetalIOSurfaceInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @ExportMetalIOSurfaceInfoEXT = forall a. a -> Maybe a
Just Extends ExportMetalObjectsInfoEXT e => b
f
| Just e :~: ExportMetalTextureInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @ExportMetalTextureInfoEXT = forall a. a -> Maybe a
Just Extends ExportMetalObjectsInfoEXT e => b
f
| Just e :~: ExportMetalBufferInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @ExportMetalBufferInfoEXT = forall a. a -> Maybe a
Just Extends ExportMetalObjectsInfoEXT e => b
f
| Just e :~: ExportMetalCommandQueueInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @ExportMetalCommandQueueInfoEXT = forall a. a -> Maybe a
Just Extends ExportMetalObjectsInfoEXT e => b
f
| Just e :~: ExportMetalDeviceInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @ExportMetalDeviceInfoEXT = forall a. a -> Maybe a
Just Extends ExportMetalObjectsInfoEXT e => b
f
| Bool
otherwise = forall a. Maybe a
Nothing
instance ( Extendss ExportMetalObjectsInfoEXT es
, PokeChain es ) => ToCStruct (ExportMetalObjectsInfoEXT es) where
withCStruct :: forall b.
ExportMetalObjectsInfoEXT es
-> (Ptr (ExportMetalObjectsInfoEXT es) -> IO b) -> IO b
withCStruct ExportMetalObjectsInfoEXT es
x Ptr (ExportMetalObjectsInfoEXT es) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
16 forall a b. (a -> b) -> a -> b
$ \Ptr (ExportMetalObjectsInfoEXT es)
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (ExportMetalObjectsInfoEXT es)
p ExportMetalObjectsInfoEXT es
x (Ptr (ExportMetalObjectsInfoEXT es) -> IO b
f Ptr (ExportMetalObjectsInfoEXT es)
p)
pokeCStruct :: forall b.
Ptr (ExportMetalObjectsInfoEXT es)
-> ExportMetalObjectsInfoEXT es -> IO b -> IO b
pokeCStruct Ptr (ExportMetalObjectsInfoEXT es)
p ExportMetalObjectsInfoEXT{Chain es
next :: Chain es
$sel:next:ExportMetalObjectsInfoEXT :: forall (es :: [*]). ExportMetalObjectsInfoEXT es -> Chain es
..} IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ExportMetalObjectsInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_EXPORT_METAL_OBJECTS_INFO_EXT)
Ptr ()
pNext'' <- forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a b. Ptr a -> Ptr b
castPtr forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ExportMetalObjectsInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) Ptr ()
pNext''
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
16
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr (ExportMetalObjectsInfoEXT es) -> IO b -> IO b
pokeZeroCStruct Ptr (ExportMetalObjectsInfoEXT es)
p IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ExportMetalObjectsInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_EXPORT_METAL_OBJECTS_INFO_EXT)
Ptr ()
pNext' <- forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a b. Ptr a -> Ptr b
castPtr forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ExportMetalObjectsInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) Ptr ()
pNext'
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
instance ( Extendss ExportMetalObjectsInfoEXT es
, PeekChain es ) => FromCStruct (ExportMetalObjectsInfoEXT es) where
peekCStruct :: Ptr (ExportMetalObjectsInfoEXT es)
-> IO (ExportMetalObjectsInfoEXT es)
peekCStruct Ptr (ExportMetalObjectsInfoEXT es)
p = do
Ptr ()
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (ExportMetalObjectsInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ())))
Chain es
next <- forall (es :: [*]). PeekChain es => Ptr (Chain es) -> IO (Chain es)
peekChain (forall a b. Ptr a -> Ptr b
castPtr Ptr ()
pNext)
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall (es :: [*]). Chain es -> ExportMetalObjectsInfoEXT es
ExportMetalObjectsInfoEXT
Chain es
next
instance es ~ '[] => Zero (ExportMetalObjectsInfoEXT es) where
zero :: ExportMetalObjectsInfoEXT es
zero = forall (es :: [*]). Chain es -> ExportMetalObjectsInfoEXT es
ExportMetalObjectsInfoEXT
()
data ExportMetalDeviceInfoEXT = ExportMetalDeviceInfoEXT
{
ExportMetalDeviceInfoEXT -> Ptr ()
mtlDevice :: MTLDevice_id }
deriving (Typeable, ExportMetalDeviceInfoEXT -> ExportMetalDeviceInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportMetalDeviceInfoEXT -> ExportMetalDeviceInfoEXT -> Bool
$c/= :: ExportMetalDeviceInfoEXT -> ExportMetalDeviceInfoEXT -> Bool
== :: ExportMetalDeviceInfoEXT -> ExportMetalDeviceInfoEXT -> Bool
$c== :: ExportMetalDeviceInfoEXT -> ExportMetalDeviceInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ExportMetalDeviceInfoEXT)
#endif
deriving instance Show ExportMetalDeviceInfoEXT
instance ToCStruct ExportMetalDeviceInfoEXT where
withCStruct :: forall b.
ExportMetalDeviceInfoEXT
-> (Ptr ExportMetalDeviceInfoEXT -> IO b) -> IO b
withCStruct ExportMetalDeviceInfoEXT
x Ptr ExportMetalDeviceInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr ExportMetalDeviceInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ExportMetalDeviceInfoEXT
p ExportMetalDeviceInfoEXT
x (Ptr ExportMetalDeviceInfoEXT -> IO b
f Ptr ExportMetalDeviceInfoEXT
p)
pokeCStruct :: forall b.
Ptr ExportMetalDeviceInfoEXT
-> ExportMetalDeviceInfoEXT -> IO b -> IO b
pokeCStruct Ptr ExportMetalDeviceInfoEXT
p ExportMetalDeviceInfoEXT{Ptr ()
mtlDevice :: Ptr ()
$sel:mtlDevice:ExportMetalDeviceInfoEXT :: ExportMetalDeviceInfoEXT -> Ptr ()
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalDeviceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_EXPORT_METAL_DEVICE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalDeviceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalDeviceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr MTLDevice_id)) (Ptr ()
mtlDevice)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr ExportMetalDeviceInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr ExportMetalDeviceInfoEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalDeviceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_EXPORT_METAL_DEVICE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalDeviceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalDeviceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr MTLDevice_id)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct ExportMetalDeviceInfoEXT where
peekCStruct :: Ptr ExportMetalDeviceInfoEXT -> IO ExportMetalDeviceInfoEXT
peekCStruct Ptr ExportMetalDeviceInfoEXT
p = do
Ptr ()
mtlDevice <- forall a. Storable a => Ptr a -> IO a
peek @MTLDevice_id ((Ptr ExportMetalDeviceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr MTLDevice_id))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Ptr () -> ExportMetalDeviceInfoEXT
ExportMetalDeviceInfoEXT
Ptr ()
mtlDevice
instance Storable ExportMetalDeviceInfoEXT where
sizeOf :: ExportMetalDeviceInfoEXT -> Int
sizeOf ~ExportMetalDeviceInfoEXT
_ = Int
24
alignment :: ExportMetalDeviceInfoEXT -> Int
alignment ~ExportMetalDeviceInfoEXT
_ = Int
8
peek :: Ptr ExportMetalDeviceInfoEXT -> IO ExportMetalDeviceInfoEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr ExportMetalDeviceInfoEXT -> ExportMetalDeviceInfoEXT -> IO ()
poke Ptr ExportMetalDeviceInfoEXT
ptr ExportMetalDeviceInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ExportMetalDeviceInfoEXT
ptr ExportMetalDeviceInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero ExportMetalDeviceInfoEXT where
zero :: ExportMetalDeviceInfoEXT
zero = Ptr () -> ExportMetalDeviceInfoEXT
ExportMetalDeviceInfoEXT
forall a. Zero a => a
zero
data ExportMetalCommandQueueInfoEXT = ExportMetalCommandQueueInfoEXT
{
ExportMetalCommandQueueInfoEXT -> Ptr Queue_T
queue :: Ptr Queue_T
,
ExportMetalCommandQueueInfoEXT -> Ptr ()
mtlCommandQueue :: MTLCommandQueue_id
}
deriving (Typeable, ExportMetalCommandQueueInfoEXT
-> ExportMetalCommandQueueInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportMetalCommandQueueInfoEXT
-> ExportMetalCommandQueueInfoEXT -> Bool
$c/= :: ExportMetalCommandQueueInfoEXT
-> ExportMetalCommandQueueInfoEXT -> Bool
== :: ExportMetalCommandQueueInfoEXT
-> ExportMetalCommandQueueInfoEXT -> Bool
$c== :: ExportMetalCommandQueueInfoEXT
-> ExportMetalCommandQueueInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ExportMetalCommandQueueInfoEXT)
#endif
deriving instance Show ExportMetalCommandQueueInfoEXT
instance ToCStruct ExportMetalCommandQueueInfoEXT where
withCStruct :: forall b.
ExportMetalCommandQueueInfoEXT
-> (Ptr ExportMetalCommandQueueInfoEXT -> IO b) -> IO b
withCStruct ExportMetalCommandQueueInfoEXT
x Ptr ExportMetalCommandQueueInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr ExportMetalCommandQueueInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ExportMetalCommandQueueInfoEXT
p ExportMetalCommandQueueInfoEXT
x (Ptr ExportMetalCommandQueueInfoEXT -> IO b
f Ptr ExportMetalCommandQueueInfoEXT
p)
pokeCStruct :: forall b.
Ptr ExportMetalCommandQueueInfoEXT
-> ExportMetalCommandQueueInfoEXT -> IO b -> IO b
pokeCStruct Ptr ExportMetalCommandQueueInfoEXT
p ExportMetalCommandQueueInfoEXT{Ptr ()
Ptr Queue_T
mtlCommandQueue :: Ptr ()
queue :: Ptr Queue_T
$sel:mtlCommandQueue:ExportMetalCommandQueueInfoEXT :: ExportMetalCommandQueueInfoEXT -> Ptr ()
$sel:queue:ExportMetalCommandQueueInfoEXT :: ExportMetalCommandQueueInfoEXT -> Ptr Queue_T
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalCommandQueueInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_EXPORT_METAL_COMMAND_QUEUE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalCommandQueueInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalCommandQueueInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr Queue_T))) (Ptr Queue_T
queue)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalCommandQueueInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr MTLCommandQueue_id)) (Ptr ()
mtlCommandQueue)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr ExportMetalCommandQueueInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr ExportMetalCommandQueueInfoEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalCommandQueueInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_EXPORT_METAL_COMMAND_QUEUE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalCommandQueueInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalCommandQueueInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr Queue_T))) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalCommandQueueInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr MTLCommandQueue_id)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct ExportMetalCommandQueueInfoEXT where
peekCStruct :: Ptr ExportMetalCommandQueueInfoEXT
-> IO ExportMetalCommandQueueInfoEXT
peekCStruct Ptr ExportMetalCommandQueueInfoEXT
p = do
Ptr Queue_T
queue <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Queue_T) ((Ptr ExportMetalCommandQueueInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr Queue_T)))
Ptr ()
mtlCommandQueue <- forall a. Storable a => Ptr a -> IO a
peek @MTLCommandQueue_id ((Ptr ExportMetalCommandQueueInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr MTLCommandQueue_id))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Ptr Queue_T -> Ptr () -> ExportMetalCommandQueueInfoEXT
ExportMetalCommandQueueInfoEXT
Ptr Queue_T
queue Ptr ()
mtlCommandQueue
instance Storable ExportMetalCommandQueueInfoEXT where
sizeOf :: ExportMetalCommandQueueInfoEXT -> Int
sizeOf ~ExportMetalCommandQueueInfoEXT
_ = Int
32
alignment :: ExportMetalCommandQueueInfoEXT -> Int
alignment ~ExportMetalCommandQueueInfoEXT
_ = Int
8
peek :: Ptr ExportMetalCommandQueueInfoEXT
-> IO ExportMetalCommandQueueInfoEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr ExportMetalCommandQueueInfoEXT
-> ExportMetalCommandQueueInfoEXT -> IO ()
poke Ptr ExportMetalCommandQueueInfoEXT
ptr ExportMetalCommandQueueInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ExportMetalCommandQueueInfoEXT
ptr ExportMetalCommandQueueInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero ExportMetalCommandQueueInfoEXT where
zero :: ExportMetalCommandQueueInfoEXT
zero = Ptr Queue_T -> Ptr () -> ExportMetalCommandQueueInfoEXT
ExportMetalCommandQueueInfoEXT
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data ExportMetalBufferInfoEXT = ExportMetalBufferInfoEXT
{
ExportMetalBufferInfoEXT -> DeviceMemory
memory :: DeviceMemory
,
ExportMetalBufferInfoEXT -> Ptr ()
mtlBuffer :: MTLBuffer_id
}
deriving (Typeable, ExportMetalBufferInfoEXT -> ExportMetalBufferInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportMetalBufferInfoEXT -> ExportMetalBufferInfoEXT -> Bool
$c/= :: ExportMetalBufferInfoEXT -> ExportMetalBufferInfoEXT -> Bool
== :: ExportMetalBufferInfoEXT -> ExportMetalBufferInfoEXT -> Bool
$c== :: ExportMetalBufferInfoEXT -> ExportMetalBufferInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ExportMetalBufferInfoEXT)
#endif
deriving instance Show ExportMetalBufferInfoEXT
instance ToCStruct ExportMetalBufferInfoEXT where
withCStruct :: forall b.
ExportMetalBufferInfoEXT
-> (Ptr ExportMetalBufferInfoEXT -> IO b) -> IO b
withCStruct ExportMetalBufferInfoEXT
x Ptr ExportMetalBufferInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr ExportMetalBufferInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ExportMetalBufferInfoEXT
p ExportMetalBufferInfoEXT
x (Ptr ExportMetalBufferInfoEXT -> IO b
f Ptr ExportMetalBufferInfoEXT
p)
pokeCStruct :: forall b.
Ptr ExportMetalBufferInfoEXT
-> ExportMetalBufferInfoEXT -> IO b -> IO b
pokeCStruct Ptr ExportMetalBufferInfoEXT
p ExportMetalBufferInfoEXT{Ptr ()
DeviceMemory
mtlBuffer :: Ptr ()
memory :: DeviceMemory
$sel:mtlBuffer:ExportMetalBufferInfoEXT :: ExportMetalBufferInfoEXT -> Ptr ()
$sel:memory:ExportMetalBufferInfoEXT :: ExportMetalBufferInfoEXT -> DeviceMemory
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalBufferInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_EXPORT_METAL_BUFFER_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalBufferInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalBufferInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceMemory)) (DeviceMemory
memory)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalBufferInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr MTLBuffer_id)) (Ptr ()
mtlBuffer)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr ExportMetalBufferInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr ExportMetalBufferInfoEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalBufferInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_EXPORT_METAL_BUFFER_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalBufferInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalBufferInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceMemory)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalBufferInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr MTLBuffer_id)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct ExportMetalBufferInfoEXT where
peekCStruct :: Ptr ExportMetalBufferInfoEXT -> IO ExportMetalBufferInfoEXT
peekCStruct Ptr ExportMetalBufferInfoEXT
p = do
DeviceMemory
memory <- forall a. Storable a => Ptr a -> IO a
peek @DeviceMemory ((Ptr ExportMetalBufferInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceMemory))
Ptr ()
mtlBuffer <- forall a. Storable a => Ptr a -> IO a
peek @MTLBuffer_id ((Ptr ExportMetalBufferInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr MTLBuffer_id))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ DeviceMemory -> Ptr () -> ExportMetalBufferInfoEXT
ExportMetalBufferInfoEXT
DeviceMemory
memory Ptr ()
mtlBuffer
instance Storable ExportMetalBufferInfoEXT where
sizeOf :: ExportMetalBufferInfoEXT -> Int
sizeOf ~ExportMetalBufferInfoEXT
_ = Int
32
alignment :: ExportMetalBufferInfoEXT -> Int
alignment ~ExportMetalBufferInfoEXT
_ = Int
8
peek :: Ptr ExportMetalBufferInfoEXT -> IO ExportMetalBufferInfoEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr ExportMetalBufferInfoEXT -> ExportMetalBufferInfoEXT -> IO ()
poke Ptr ExportMetalBufferInfoEXT
ptr ExportMetalBufferInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ExportMetalBufferInfoEXT
ptr ExportMetalBufferInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero ExportMetalBufferInfoEXT where
zero :: ExportMetalBufferInfoEXT
zero = DeviceMemory -> Ptr () -> ExportMetalBufferInfoEXT
ExportMetalBufferInfoEXT
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data ImportMetalBufferInfoEXT = ImportMetalBufferInfoEXT
{
ImportMetalBufferInfoEXT -> Ptr ()
mtlBuffer :: MTLBuffer_id }
deriving (Typeable, ImportMetalBufferInfoEXT -> ImportMetalBufferInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportMetalBufferInfoEXT -> ImportMetalBufferInfoEXT -> Bool
$c/= :: ImportMetalBufferInfoEXT -> ImportMetalBufferInfoEXT -> Bool
== :: ImportMetalBufferInfoEXT -> ImportMetalBufferInfoEXT -> Bool
$c== :: ImportMetalBufferInfoEXT -> ImportMetalBufferInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ImportMetalBufferInfoEXT)
#endif
deriving instance Show ImportMetalBufferInfoEXT
instance ToCStruct ImportMetalBufferInfoEXT where
withCStruct :: forall b.
ImportMetalBufferInfoEXT
-> (Ptr ImportMetalBufferInfoEXT -> IO b) -> IO b
withCStruct ImportMetalBufferInfoEXT
x Ptr ImportMetalBufferInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr ImportMetalBufferInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ImportMetalBufferInfoEXT
p ImportMetalBufferInfoEXT
x (Ptr ImportMetalBufferInfoEXT -> IO b
f Ptr ImportMetalBufferInfoEXT
p)
pokeCStruct :: forall b.
Ptr ImportMetalBufferInfoEXT
-> ImportMetalBufferInfoEXT -> IO b -> IO b
pokeCStruct Ptr ImportMetalBufferInfoEXT
p ImportMetalBufferInfoEXT{Ptr ()
mtlBuffer :: Ptr ()
$sel:mtlBuffer:ImportMetalBufferInfoEXT :: ImportMetalBufferInfoEXT -> Ptr ()
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalBufferInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMPORT_METAL_BUFFER_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalBufferInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalBufferInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr MTLBuffer_id)) (Ptr ()
mtlBuffer)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr ImportMetalBufferInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr ImportMetalBufferInfoEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalBufferInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMPORT_METAL_BUFFER_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalBufferInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalBufferInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr MTLBuffer_id)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct ImportMetalBufferInfoEXT where
peekCStruct :: Ptr ImportMetalBufferInfoEXT -> IO ImportMetalBufferInfoEXT
peekCStruct Ptr ImportMetalBufferInfoEXT
p = do
Ptr ()
mtlBuffer <- forall a. Storable a => Ptr a -> IO a
peek @MTLBuffer_id ((Ptr ImportMetalBufferInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr MTLBuffer_id))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Ptr () -> ImportMetalBufferInfoEXT
ImportMetalBufferInfoEXT
Ptr ()
mtlBuffer
instance Storable ImportMetalBufferInfoEXT where
sizeOf :: ImportMetalBufferInfoEXT -> Int
sizeOf ~ImportMetalBufferInfoEXT
_ = Int
24
alignment :: ImportMetalBufferInfoEXT -> Int
alignment ~ImportMetalBufferInfoEXT
_ = Int
8
peek :: Ptr ImportMetalBufferInfoEXT -> IO ImportMetalBufferInfoEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr ImportMetalBufferInfoEXT -> ImportMetalBufferInfoEXT -> IO ()
poke Ptr ImportMetalBufferInfoEXT
ptr ImportMetalBufferInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ImportMetalBufferInfoEXT
ptr ImportMetalBufferInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero ImportMetalBufferInfoEXT where
zero :: ImportMetalBufferInfoEXT
zero = Ptr () -> ImportMetalBufferInfoEXT
ImportMetalBufferInfoEXT
forall a. Zero a => a
zero
data ExportMetalTextureInfoEXT = ExportMetalTextureInfoEXT
{
ExportMetalTextureInfoEXT -> Image
image :: Image
,
ExportMetalTextureInfoEXT -> ImageView
imageView :: ImageView
,
ExportMetalTextureInfoEXT -> BufferView
bufferView :: BufferView
,
ExportMetalTextureInfoEXT -> ImageAspectFlagBits
plane :: ImageAspectFlagBits
,
ExportMetalTextureInfoEXT -> Ptr ()
mtlTexture :: MTLTexture_id
}
deriving (Typeable, ExportMetalTextureInfoEXT -> ExportMetalTextureInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportMetalTextureInfoEXT -> ExportMetalTextureInfoEXT -> Bool
$c/= :: ExportMetalTextureInfoEXT -> ExportMetalTextureInfoEXT -> Bool
== :: ExportMetalTextureInfoEXT -> ExportMetalTextureInfoEXT -> Bool
$c== :: ExportMetalTextureInfoEXT -> ExportMetalTextureInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ExportMetalTextureInfoEXT)
#endif
deriving instance Show ExportMetalTextureInfoEXT
instance ToCStruct ExportMetalTextureInfoEXT where
withCStruct :: forall b.
ExportMetalTextureInfoEXT
-> (Ptr ExportMetalTextureInfoEXT -> IO b) -> IO b
withCStruct ExportMetalTextureInfoEXT
x Ptr ExportMetalTextureInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
56 forall a b. (a -> b) -> a -> b
$ \Ptr ExportMetalTextureInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ExportMetalTextureInfoEXT
p ExportMetalTextureInfoEXT
x (Ptr ExportMetalTextureInfoEXT -> IO b
f Ptr ExportMetalTextureInfoEXT
p)
pokeCStruct :: forall b.
Ptr ExportMetalTextureInfoEXT
-> ExportMetalTextureInfoEXT -> IO b -> IO b
pokeCStruct Ptr ExportMetalTextureInfoEXT
p ExportMetalTextureInfoEXT{Ptr ()
ImageAspectFlagBits
ImageView
Image
BufferView
mtlTexture :: Ptr ()
plane :: ImageAspectFlagBits
bufferView :: BufferView
imageView :: ImageView
image :: Image
$sel:mtlTexture:ExportMetalTextureInfoEXT :: ExportMetalTextureInfoEXT -> Ptr ()
$sel:plane:ExportMetalTextureInfoEXT :: ExportMetalTextureInfoEXT -> ImageAspectFlagBits
$sel:bufferView:ExportMetalTextureInfoEXT :: ExportMetalTextureInfoEXT -> BufferView
$sel:imageView:ExportMetalTextureInfoEXT :: ExportMetalTextureInfoEXT -> ImageView
$sel:image:ExportMetalTextureInfoEXT :: ExportMetalTextureInfoEXT -> Image
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_EXPORT_METAL_TEXTURE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Image)) (Image
image)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr ImageView)) (ImageView
imageView)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr BufferView)) (BufferView
bufferView)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr ImageAspectFlagBits)) (ImageAspectFlagBits
plane)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr MTLTexture_id)) (Ptr ()
mtlTexture)
IO b
f
cStructSize :: Int
cStructSize = Int
56
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr ExportMetalTextureInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr ExportMetalTextureInfoEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_EXPORT_METAL_TEXTURE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr ImageAspectFlagBits)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr MTLTexture_id)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct ExportMetalTextureInfoEXT where
peekCStruct :: Ptr ExportMetalTextureInfoEXT -> IO ExportMetalTextureInfoEXT
peekCStruct Ptr ExportMetalTextureInfoEXT
p = do
Image
image <- forall a. Storable a => Ptr a -> IO a
peek @Image ((Ptr ExportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Image))
ImageView
imageView <- forall a. Storable a => Ptr a -> IO a
peek @ImageView ((Ptr ExportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr ImageView))
BufferView
bufferView <- forall a. Storable a => Ptr a -> IO a
peek @BufferView ((Ptr ExportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr BufferView))
ImageAspectFlagBits
plane <- forall a. Storable a => Ptr a -> IO a
peek @ImageAspectFlagBits ((Ptr ExportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr ImageAspectFlagBits))
Ptr ()
mtlTexture <- forall a. Storable a => Ptr a -> IO a
peek @MTLTexture_id ((Ptr ExportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr MTLTexture_id))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Image
-> ImageView
-> BufferView
-> ImageAspectFlagBits
-> Ptr ()
-> ExportMetalTextureInfoEXT
ExportMetalTextureInfoEXT
Image
image ImageView
imageView BufferView
bufferView ImageAspectFlagBits
plane Ptr ()
mtlTexture
instance Storable ExportMetalTextureInfoEXT where
sizeOf :: ExportMetalTextureInfoEXT -> Int
sizeOf ~ExportMetalTextureInfoEXT
_ = Int
56
alignment :: ExportMetalTextureInfoEXT -> Int
alignment ~ExportMetalTextureInfoEXT
_ = Int
8
peek :: Ptr ExportMetalTextureInfoEXT -> IO ExportMetalTextureInfoEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr ExportMetalTextureInfoEXT -> ExportMetalTextureInfoEXT -> IO ()
poke Ptr ExportMetalTextureInfoEXT
ptr ExportMetalTextureInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ExportMetalTextureInfoEXT
ptr ExportMetalTextureInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero ExportMetalTextureInfoEXT where
zero :: ExportMetalTextureInfoEXT
zero = Image
-> ImageView
-> BufferView
-> ImageAspectFlagBits
-> Ptr ()
-> ExportMetalTextureInfoEXT
ExportMetalTextureInfoEXT
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data ImportMetalTextureInfoEXT = ImportMetalTextureInfoEXT
{
ImportMetalTextureInfoEXT -> ImageAspectFlagBits
plane :: ImageAspectFlagBits
,
ImportMetalTextureInfoEXT -> Ptr ()
mtlTexture :: MTLTexture_id
}
deriving (Typeable, ImportMetalTextureInfoEXT -> ImportMetalTextureInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportMetalTextureInfoEXT -> ImportMetalTextureInfoEXT -> Bool
$c/= :: ImportMetalTextureInfoEXT -> ImportMetalTextureInfoEXT -> Bool
== :: ImportMetalTextureInfoEXT -> ImportMetalTextureInfoEXT -> Bool
$c== :: ImportMetalTextureInfoEXT -> ImportMetalTextureInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ImportMetalTextureInfoEXT)
#endif
deriving instance Show ImportMetalTextureInfoEXT
instance ToCStruct ImportMetalTextureInfoEXT where
withCStruct :: forall b.
ImportMetalTextureInfoEXT
-> (Ptr ImportMetalTextureInfoEXT -> IO b) -> IO b
withCStruct ImportMetalTextureInfoEXT
x Ptr ImportMetalTextureInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr ImportMetalTextureInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ImportMetalTextureInfoEXT
p ImportMetalTextureInfoEXT
x (Ptr ImportMetalTextureInfoEXT -> IO b
f Ptr ImportMetalTextureInfoEXT
p)
pokeCStruct :: forall b.
Ptr ImportMetalTextureInfoEXT
-> ImportMetalTextureInfoEXT -> IO b -> IO b
pokeCStruct Ptr ImportMetalTextureInfoEXT
p ImportMetalTextureInfoEXT{Ptr ()
ImageAspectFlagBits
mtlTexture :: Ptr ()
plane :: ImageAspectFlagBits
$sel:mtlTexture:ImportMetalTextureInfoEXT :: ImportMetalTextureInfoEXT -> Ptr ()
$sel:plane:ImportMetalTextureInfoEXT :: ImportMetalTextureInfoEXT -> ImageAspectFlagBits
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMPORT_METAL_TEXTURE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ImageAspectFlagBits)) (ImageAspectFlagBits
plane)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr MTLTexture_id)) (Ptr ()
mtlTexture)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr ImportMetalTextureInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr ImportMetalTextureInfoEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMPORT_METAL_TEXTURE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ImageAspectFlagBits)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr MTLTexture_id)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct ImportMetalTextureInfoEXT where
peekCStruct :: Ptr ImportMetalTextureInfoEXT -> IO ImportMetalTextureInfoEXT
peekCStruct Ptr ImportMetalTextureInfoEXT
p = do
ImageAspectFlagBits
plane <- forall a. Storable a => Ptr a -> IO a
peek @ImageAspectFlagBits ((Ptr ImportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ImageAspectFlagBits))
Ptr ()
mtlTexture <- forall a. Storable a => Ptr a -> IO a
peek @MTLTexture_id ((Ptr ImportMetalTextureInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr MTLTexture_id))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ImageAspectFlagBits -> Ptr () -> ImportMetalTextureInfoEXT
ImportMetalTextureInfoEXT
ImageAspectFlagBits
plane Ptr ()
mtlTexture
instance Storable ImportMetalTextureInfoEXT where
sizeOf :: ImportMetalTextureInfoEXT -> Int
sizeOf ~ImportMetalTextureInfoEXT
_ = Int
32
alignment :: ImportMetalTextureInfoEXT -> Int
alignment ~ImportMetalTextureInfoEXT
_ = Int
8
peek :: Ptr ImportMetalTextureInfoEXT -> IO ImportMetalTextureInfoEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr ImportMetalTextureInfoEXT -> ImportMetalTextureInfoEXT -> IO ()
poke Ptr ImportMetalTextureInfoEXT
ptr ImportMetalTextureInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ImportMetalTextureInfoEXT
ptr ImportMetalTextureInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero ImportMetalTextureInfoEXT where
zero :: ImportMetalTextureInfoEXT
zero = ImageAspectFlagBits -> Ptr () -> ImportMetalTextureInfoEXT
ImportMetalTextureInfoEXT
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data ExportMetalIOSurfaceInfoEXT = ExportMetalIOSurfaceInfoEXT
{
ExportMetalIOSurfaceInfoEXT -> Image
image :: Image
,
ExportMetalIOSurfaceInfoEXT -> Ptr ()
ioSurface :: IOSurfaceRef
}
deriving (Typeable, ExportMetalIOSurfaceInfoEXT -> ExportMetalIOSurfaceInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportMetalIOSurfaceInfoEXT -> ExportMetalIOSurfaceInfoEXT -> Bool
$c/= :: ExportMetalIOSurfaceInfoEXT -> ExportMetalIOSurfaceInfoEXT -> Bool
== :: ExportMetalIOSurfaceInfoEXT -> ExportMetalIOSurfaceInfoEXT -> Bool
$c== :: ExportMetalIOSurfaceInfoEXT -> ExportMetalIOSurfaceInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ExportMetalIOSurfaceInfoEXT)
#endif
deriving instance Show ExportMetalIOSurfaceInfoEXT
instance ToCStruct ExportMetalIOSurfaceInfoEXT where
withCStruct :: forall b.
ExportMetalIOSurfaceInfoEXT
-> (Ptr ExportMetalIOSurfaceInfoEXT -> IO b) -> IO b
withCStruct ExportMetalIOSurfaceInfoEXT
x Ptr ExportMetalIOSurfaceInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr ExportMetalIOSurfaceInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ExportMetalIOSurfaceInfoEXT
p ExportMetalIOSurfaceInfoEXT
x (Ptr ExportMetalIOSurfaceInfoEXT -> IO b
f Ptr ExportMetalIOSurfaceInfoEXT
p)
pokeCStruct :: forall b.
Ptr ExportMetalIOSurfaceInfoEXT
-> ExportMetalIOSurfaceInfoEXT -> IO b -> IO b
pokeCStruct Ptr ExportMetalIOSurfaceInfoEXT
p ExportMetalIOSurfaceInfoEXT{Ptr ()
Image
ioSurface :: Ptr ()
image :: Image
$sel:ioSurface:ExportMetalIOSurfaceInfoEXT :: ExportMetalIOSurfaceInfoEXT -> Ptr ()
$sel:image:ExportMetalIOSurfaceInfoEXT :: ExportMetalIOSurfaceInfoEXT -> Image
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalIOSurfaceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_EXPORT_METAL_IO_SURFACE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalIOSurfaceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalIOSurfaceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Image)) (Image
image)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalIOSurfaceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr IOSurfaceRef)) (Ptr ()
ioSurface)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr ExportMetalIOSurfaceInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr ExportMetalIOSurfaceInfoEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalIOSurfaceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_EXPORT_METAL_IO_SURFACE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalIOSurfaceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalIOSurfaceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Image)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalIOSurfaceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr IOSurfaceRef)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct ExportMetalIOSurfaceInfoEXT where
peekCStruct :: Ptr ExportMetalIOSurfaceInfoEXT -> IO ExportMetalIOSurfaceInfoEXT
peekCStruct Ptr ExportMetalIOSurfaceInfoEXT
p = do
Image
image <- forall a. Storable a => Ptr a -> IO a
peek @Image ((Ptr ExportMetalIOSurfaceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Image))
Ptr ()
ioSurface <- forall a. Storable a => Ptr a -> IO a
peek @IOSurfaceRef ((Ptr ExportMetalIOSurfaceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr IOSurfaceRef))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Image -> Ptr () -> ExportMetalIOSurfaceInfoEXT
ExportMetalIOSurfaceInfoEXT
Image
image Ptr ()
ioSurface
instance Storable ExportMetalIOSurfaceInfoEXT where
sizeOf :: ExportMetalIOSurfaceInfoEXT -> Int
sizeOf ~ExportMetalIOSurfaceInfoEXT
_ = Int
32
alignment :: ExportMetalIOSurfaceInfoEXT -> Int
alignment ~ExportMetalIOSurfaceInfoEXT
_ = Int
8
peek :: Ptr ExportMetalIOSurfaceInfoEXT -> IO ExportMetalIOSurfaceInfoEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr ExportMetalIOSurfaceInfoEXT
-> ExportMetalIOSurfaceInfoEXT -> IO ()
poke Ptr ExportMetalIOSurfaceInfoEXT
ptr ExportMetalIOSurfaceInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ExportMetalIOSurfaceInfoEXT
ptr ExportMetalIOSurfaceInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero ExportMetalIOSurfaceInfoEXT where
zero :: ExportMetalIOSurfaceInfoEXT
zero = Image -> Ptr () -> ExportMetalIOSurfaceInfoEXT
ExportMetalIOSurfaceInfoEXT
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data ImportMetalIOSurfaceInfoEXT = ImportMetalIOSurfaceInfoEXT
{
ImportMetalIOSurfaceInfoEXT -> Ptr ()
ioSurface :: IOSurfaceRef }
deriving (Typeable, ImportMetalIOSurfaceInfoEXT -> ImportMetalIOSurfaceInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportMetalIOSurfaceInfoEXT -> ImportMetalIOSurfaceInfoEXT -> Bool
$c/= :: ImportMetalIOSurfaceInfoEXT -> ImportMetalIOSurfaceInfoEXT -> Bool
== :: ImportMetalIOSurfaceInfoEXT -> ImportMetalIOSurfaceInfoEXT -> Bool
$c== :: ImportMetalIOSurfaceInfoEXT -> ImportMetalIOSurfaceInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ImportMetalIOSurfaceInfoEXT)
#endif
deriving instance Show ImportMetalIOSurfaceInfoEXT
instance ToCStruct ImportMetalIOSurfaceInfoEXT where
withCStruct :: forall b.
ImportMetalIOSurfaceInfoEXT
-> (Ptr ImportMetalIOSurfaceInfoEXT -> IO b) -> IO b
withCStruct ImportMetalIOSurfaceInfoEXT
x Ptr ImportMetalIOSurfaceInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr ImportMetalIOSurfaceInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ImportMetalIOSurfaceInfoEXT
p ImportMetalIOSurfaceInfoEXT
x (Ptr ImportMetalIOSurfaceInfoEXT -> IO b
f Ptr ImportMetalIOSurfaceInfoEXT
p)
pokeCStruct :: forall b.
Ptr ImportMetalIOSurfaceInfoEXT
-> ImportMetalIOSurfaceInfoEXT -> IO b -> IO b
pokeCStruct Ptr ImportMetalIOSurfaceInfoEXT
p ImportMetalIOSurfaceInfoEXT{Ptr ()
ioSurface :: Ptr ()
$sel:ioSurface:ImportMetalIOSurfaceInfoEXT :: ImportMetalIOSurfaceInfoEXT -> Ptr ()
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalIOSurfaceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMPORT_METAL_IO_SURFACE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalIOSurfaceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalIOSurfaceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr IOSurfaceRef)) (Ptr ()
ioSurface)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr ImportMetalIOSurfaceInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr ImportMetalIOSurfaceInfoEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalIOSurfaceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMPORT_METAL_IO_SURFACE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalIOSurfaceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
IO b
f
instance FromCStruct ImportMetalIOSurfaceInfoEXT where
peekCStruct :: Ptr ImportMetalIOSurfaceInfoEXT -> IO ImportMetalIOSurfaceInfoEXT
peekCStruct Ptr ImportMetalIOSurfaceInfoEXT
p = do
Ptr ()
ioSurface <- forall a. Storable a => Ptr a -> IO a
peek @IOSurfaceRef ((Ptr ImportMetalIOSurfaceInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr IOSurfaceRef))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Ptr () -> ImportMetalIOSurfaceInfoEXT
ImportMetalIOSurfaceInfoEXT
Ptr ()
ioSurface
instance Storable ImportMetalIOSurfaceInfoEXT where
sizeOf :: ImportMetalIOSurfaceInfoEXT -> Int
sizeOf ~ImportMetalIOSurfaceInfoEXT
_ = Int
24
alignment :: ImportMetalIOSurfaceInfoEXT -> Int
alignment ~ImportMetalIOSurfaceInfoEXT
_ = Int
8
peek :: Ptr ImportMetalIOSurfaceInfoEXT -> IO ImportMetalIOSurfaceInfoEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr ImportMetalIOSurfaceInfoEXT
-> ImportMetalIOSurfaceInfoEXT -> IO ()
poke Ptr ImportMetalIOSurfaceInfoEXT
ptr ImportMetalIOSurfaceInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ImportMetalIOSurfaceInfoEXT
ptr ImportMetalIOSurfaceInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero ImportMetalIOSurfaceInfoEXT where
zero :: ImportMetalIOSurfaceInfoEXT
zero = Ptr () -> ImportMetalIOSurfaceInfoEXT
ImportMetalIOSurfaceInfoEXT
forall a. Zero a => a
zero
data ExportMetalSharedEventInfoEXT = ExportMetalSharedEventInfoEXT
{
ExportMetalSharedEventInfoEXT -> Semaphore
semaphore :: Semaphore
,
ExportMetalSharedEventInfoEXT -> Event
event :: Event
,
ExportMetalSharedEventInfoEXT -> Ptr ()
mtlSharedEvent :: MTLSharedEvent_id
}
deriving (Typeable, ExportMetalSharedEventInfoEXT
-> ExportMetalSharedEventInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportMetalSharedEventInfoEXT
-> ExportMetalSharedEventInfoEXT -> Bool
$c/= :: ExportMetalSharedEventInfoEXT
-> ExportMetalSharedEventInfoEXT -> Bool
== :: ExportMetalSharedEventInfoEXT
-> ExportMetalSharedEventInfoEXT -> Bool
$c== :: ExportMetalSharedEventInfoEXT
-> ExportMetalSharedEventInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ExportMetalSharedEventInfoEXT)
#endif
deriving instance Show ExportMetalSharedEventInfoEXT
instance ToCStruct ExportMetalSharedEventInfoEXT where
withCStruct :: forall b.
ExportMetalSharedEventInfoEXT
-> (Ptr ExportMetalSharedEventInfoEXT -> IO b) -> IO b
withCStruct ExportMetalSharedEventInfoEXT
x Ptr ExportMetalSharedEventInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 forall a b. (a -> b) -> a -> b
$ \Ptr ExportMetalSharedEventInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ExportMetalSharedEventInfoEXT
p ExportMetalSharedEventInfoEXT
x (Ptr ExportMetalSharedEventInfoEXT -> IO b
f Ptr ExportMetalSharedEventInfoEXT
p)
pokeCStruct :: forall b.
Ptr ExportMetalSharedEventInfoEXT
-> ExportMetalSharedEventInfoEXT -> IO b -> IO b
pokeCStruct Ptr ExportMetalSharedEventInfoEXT
p ExportMetalSharedEventInfoEXT{Ptr ()
Semaphore
Event
mtlSharedEvent :: Ptr ()
event :: Event
semaphore :: Semaphore
$sel:mtlSharedEvent:ExportMetalSharedEventInfoEXT :: ExportMetalSharedEventInfoEXT -> Ptr ()
$sel:event:ExportMetalSharedEventInfoEXT :: ExportMetalSharedEventInfoEXT -> Event
$sel:semaphore:ExportMetalSharedEventInfoEXT :: ExportMetalSharedEventInfoEXT -> Semaphore
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalSharedEventInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_EXPORT_METAL_SHARED_EVENT_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalSharedEventInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalSharedEventInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Semaphore)) (Semaphore
semaphore)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalSharedEventInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Event)) (Event
event)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalSharedEventInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr MTLSharedEvent_id)) (Ptr ()
mtlSharedEvent)
IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr ExportMetalSharedEventInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr ExportMetalSharedEventInfoEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalSharedEventInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_EXPORT_METAL_SHARED_EVENT_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalSharedEventInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ExportMetalSharedEventInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr MTLSharedEvent_id)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct ExportMetalSharedEventInfoEXT where
peekCStruct :: Ptr ExportMetalSharedEventInfoEXT
-> IO ExportMetalSharedEventInfoEXT
peekCStruct Ptr ExportMetalSharedEventInfoEXT
p = do
Semaphore
semaphore <- forall a. Storable a => Ptr a -> IO a
peek @Semaphore ((Ptr ExportMetalSharedEventInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Semaphore))
Event
event <- forall a. Storable a => Ptr a -> IO a
peek @Event ((Ptr ExportMetalSharedEventInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Event))
Ptr ()
mtlSharedEvent <- forall a. Storable a => Ptr a -> IO a
peek @MTLSharedEvent_id ((Ptr ExportMetalSharedEventInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr MTLSharedEvent_id))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Semaphore -> Event -> Ptr () -> ExportMetalSharedEventInfoEXT
ExportMetalSharedEventInfoEXT
Semaphore
semaphore Event
event Ptr ()
mtlSharedEvent
instance Storable ExportMetalSharedEventInfoEXT where
sizeOf :: ExportMetalSharedEventInfoEXT -> Int
sizeOf ~ExportMetalSharedEventInfoEXT
_ = Int
40
alignment :: ExportMetalSharedEventInfoEXT -> Int
alignment ~ExportMetalSharedEventInfoEXT
_ = Int
8
peek :: Ptr ExportMetalSharedEventInfoEXT
-> IO ExportMetalSharedEventInfoEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr ExportMetalSharedEventInfoEXT
-> ExportMetalSharedEventInfoEXT -> IO ()
poke Ptr ExportMetalSharedEventInfoEXT
ptr ExportMetalSharedEventInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ExportMetalSharedEventInfoEXT
ptr ExportMetalSharedEventInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero ExportMetalSharedEventInfoEXT where
zero :: ExportMetalSharedEventInfoEXT
zero = Semaphore -> Event -> Ptr () -> ExportMetalSharedEventInfoEXT
ExportMetalSharedEventInfoEXT
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data ImportMetalSharedEventInfoEXT = ImportMetalSharedEventInfoEXT
{
ImportMetalSharedEventInfoEXT -> Ptr ()
mtlSharedEvent :: MTLSharedEvent_id }
deriving (Typeable, ImportMetalSharedEventInfoEXT
-> ImportMetalSharedEventInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportMetalSharedEventInfoEXT
-> ImportMetalSharedEventInfoEXT -> Bool
$c/= :: ImportMetalSharedEventInfoEXT
-> ImportMetalSharedEventInfoEXT -> Bool
== :: ImportMetalSharedEventInfoEXT
-> ImportMetalSharedEventInfoEXT -> Bool
$c== :: ImportMetalSharedEventInfoEXT
-> ImportMetalSharedEventInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ImportMetalSharedEventInfoEXT)
#endif
deriving instance Show ImportMetalSharedEventInfoEXT
instance ToCStruct ImportMetalSharedEventInfoEXT where
withCStruct :: forall b.
ImportMetalSharedEventInfoEXT
-> (Ptr ImportMetalSharedEventInfoEXT -> IO b) -> IO b
withCStruct ImportMetalSharedEventInfoEXT
x Ptr ImportMetalSharedEventInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr ImportMetalSharedEventInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ImportMetalSharedEventInfoEXT
p ImportMetalSharedEventInfoEXT
x (Ptr ImportMetalSharedEventInfoEXT -> IO b
f Ptr ImportMetalSharedEventInfoEXT
p)
pokeCStruct :: forall b.
Ptr ImportMetalSharedEventInfoEXT
-> ImportMetalSharedEventInfoEXT -> IO b -> IO b
pokeCStruct Ptr ImportMetalSharedEventInfoEXT
p ImportMetalSharedEventInfoEXT{Ptr ()
mtlSharedEvent :: Ptr ()
$sel:mtlSharedEvent:ImportMetalSharedEventInfoEXT :: ImportMetalSharedEventInfoEXT -> Ptr ()
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalSharedEventInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMPORT_METAL_SHARED_EVENT_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalSharedEventInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalSharedEventInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr MTLSharedEvent_id)) (Ptr ()
mtlSharedEvent)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr ImportMetalSharedEventInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr ImportMetalSharedEventInfoEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalSharedEventInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMPORT_METAL_SHARED_EVENT_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalSharedEventInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImportMetalSharedEventInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr MTLSharedEvent_id)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct ImportMetalSharedEventInfoEXT where
peekCStruct :: Ptr ImportMetalSharedEventInfoEXT
-> IO ImportMetalSharedEventInfoEXT
peekCStruct Ptr ImportMetalSharedEventInfoEXT
p = do
Ptr ()
mtlSharedEvent <- forall a. Storable a => Ptr a -> IO a
peek @MTLSharedEvent_id ((Ptr ImportMetalSharedEventInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr MTLSharedEvent_id))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Ptr () -> ImportMetalSharedEventInfoEXT
ImportMetalSharedEventInfoEXT
Ptr ()
mtlSharedEvent
instance Storable ImportMetalSharedEventInfoEXT where
sizeOf :: ImportMetalSharedEventInfoEXT -> Int
sizeOf ~ImportMetalSharedEventInfoEXT
_ = Int
24
alignment :: ImportMetalSharedEventInfoEXT -> Int
alignment ~ImportMetalSharedEventInfoEXT
_ = Int
8
peek :: Ptr ImportMetalSharedEventInfoEXT
-> IO ImportMetalSharedEventInfoEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr ImportMetalSharedEventInfoEXT
-> ImportMetalSharedEventInfoEXT -> IO ()
poke Ptr ImportMetalSharedEventInfoEXT
ptr ImportMetalSharedEventInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ImportMetalSharedEventInfoEXT
ptr ImportMetalSharedEventInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero ImportMetalSharedEventInfoEXT where
zero :: ImportMetalSharedEventInfoEXT
zero = Ptr () -> ImportMetalSharedEventInfoEXT
ImportMetalSharedEventInfoEXT
forall a. Zero a => a
zero
type ExportMetalObjectTypeFlagsEXT = ExportMetalObjectTypeFlagBitsEXT
newtype ExportMetalObjectTypeFlagBitsEXT = ExportMetalObjectTypeFlagBitsEXT Flags
deriving newtype (ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> Bool
$c/= :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> Bool
== :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> Bool
$c== :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> Bool
Eq, Eq ExportMetalObjectTypeFlagBitsEXT
ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> Bool
ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> Ordering
ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
$cmin :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
max :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
$cmax :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
>= :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> Bool
$c>= :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> Bool
> :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> Bool
$c> :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> Bool
<= :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> Bool
$c<= :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> Bool
< :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> Bool
$c< :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> Bool
compare :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> Ordering
$ccompare :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> Ordering
Ord, Ptr ExportMetalObjectTypeFlagBitsEXT
-> IO ExportMetalObjectTypeFlagBitsEXT
Ptr ExportMetalObjectTypeFlagBitsEXT
-> Int -> IO ExportMetalObjectTypeFlagBitsEXT
Ptr ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT -> IO ()
Ptr ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> IO ()
ExportMetalObjectTypeFlagBitsEXT -> Int
forall b. Ptr b -> Int -> IO ExportMetalObjectTypeFlagBitsEXT
forall b. Ptr b -> Int -> ExportMetalObjectTypeFlagBitsEXT -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> IO ()
$cpoke :: Ptr ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT -> IO ()
peek :: Ptr ExportMetalObjectTypeFlagBitsEXT
-> IO ExportMetalObjectTypeFlagBitsEXT
$cpeek :: Ptr ExportMetalObjectTypeFlagBitsEXT
-> IO ExportMetalObjectTypeFlagBitsEXT
pokeByteOff :: forall b. Ptr b -> Int -> ExportMetalObjectTypeFlagBitsEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ExportMetalObjectTypeFlagBitsEXT -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO ExportMetalObjectTypeFlagBitsEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ExportMetalObjectTypeFlagBitsEXT
pokeElemOff :: Ptr ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT -> IO ()
$cpokeElemOff :: Ptr ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT -> IO ()
peekElemOff :: Ptr ExportMetalObjectTypeFlagBitsEXT
-> Int -> IO ExportMetalObjectTypeFlagBitsEXT
$cpeekElemOff :: Ptr ExportMetalObjectTypeFlagBitsEXT
-> Int -> IO ExportMetalObjectTypeFlagBitsEXT
alignment :: ExportMetalObjectTypeFlagBitsEXT -> Int
$calignment :: ExportMetalObjectTypeFlagBitsEXT -> Int
sizeOf :: ExportMetalObjectTypeFlagBitsEXT -> Int
$csizeOf :: ExportMetalObjectTypeFlagBitsEXT -> Int
Storable, ExportMetalObjectTypeFlagBitsEXT
forall a. a -> Zero a
zero :: ExportMetalObjectTypeFlagBitsEXT
$czero :: ExportMetalObjectTypeFlagBitsEXT
Zero, Eq ExportMetalObjectTypeFlagBitsEXT
ExportMetalObjectTypeFlagBitsEXT
Int -> ExportMetalObjectTypeFlagBitsEXT
ExportMetalObjectTypeFlagBitsEXT -> Bool
ExportMetalObjectTypeFlagBitsEXT -> Int
ExportMetalObjectTypeFlagBitsEXT -> Maybe Int
ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
ExportMetalObjectTypeFlagBitsEXT -> Int -> Bool
ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
forall a.
Eq a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: ExportMetalObjectTypeFlagBitsEXT -> Int
$cpopCount :: ExportMetalObjectTypeFlagBitsEXT -> Int
rotateR :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
$crotateR :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
rotateL :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
$crotateL :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
unsafeShiftR :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
$cunsafeShiftR :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
shiftR :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
$cshiftR :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
unsafeShiftL :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
$cunsafeShiftL :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
shiftL :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
$cshiftL :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
isSigned :: ExportMetalObjectTypeFlagBitsEXT -> Bool
$cisSigned :: ExportMetalObjectTypeFlagBitsEXT -> Bool
bitSize :: ExportMetalObjectTypeFlagBitsEXT -> Int
$cbitSize :: ExportMetalObjectTypeFlagBitsEXT -> Int
bitSizeMaybe :: ExportMetalObjectTypeFlagBitsEXT -> Maybe Int
$cbitSizeMaybe :: ExportMetalObjectTypeFlagBitsEXT -> Maybe Int
testBit :: ExportMetalObjectTypeFlagBitsEXT -> Int -> Bool
$ctestBit :: ExportMetalObjectTypeFlagBitsEXT -> Int -> Bool
complementBit :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
$ccomplementBit :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
clearBit :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
$cclearBit :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
setBit :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
$csetBit :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
bit :: Int -> ExportMetalObjectTypeFlagBitsEXT
$cbit :: Int -> ExportMetalObjectTypeFlagBitsEXT
zeroBits :: ExportMetalObjectTypeFlagBitsEXT
$czeroBits :: ExportMetalObjectTypeFlagBitsEXT
rotate :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
$crotate :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
shift :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
$cshift :: ExportMetalObjectTypeFlagBitsEXT
-> Int -> ExportMetalObjectTypeFlagBitsEXT
complement :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
$ccomplement :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
xor :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
$cxor :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
.|. :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
$c.|. :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
.&. :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
$c.&. :: ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
-> ExportMetalObjectTypeFlagBitsEXT
Bits, Bits ExportMetalObjectTypeFlagBitsEXT
ExportMetalObjectTypeFlagBitsEXT -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: ExportMetalObjectTypeFlagBitsEXT -> Int
$ccountTrailingZeros :: ExportMetalObjectTypeFlagBitsEXT -> Int
countLeadingZeros :: ExportMetalObjectTypeFlagBitsEXT -> Int
$ccountLeadingZeros :: ExportMetalObjectTypeFlagBitsEXT -> Int
finiteBitSize :: ExportMetalObjectTypeFlagBitsEXT -> Int
$cfiniteBitSize :: ExportMetalObjectTypeFlagBitsEXT -> Int
FiniteBits)
pattern $bEXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT :: ExportMetalObjectTypeFlagBitsEXT
$mEXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT :: forall {r}.
ExportMetalObjectTypeFlagBitsEXT
-> ((# #) -> r) -> ((# #) -> r) -> r
EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT = ExportMetalObjectTypeFlagBitsEXT 0x00000001
pattern $bEXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT :: ExportMetalObjectTypeFlagBitsEXT
$mEXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT :: forall {r}.
ExportMetalObjectTypeFlagBitsEXT
-> ((# #) -> r) -> ((# #) -> r) -> r
EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT = ExportMetalObjectTypeFlagBitsEXT 0x00000002
pattern $bEXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT :: ExportMetalObjectTypeFlagBitsEXT
$mEXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT :: forall {r}.
ExportMetalObjectTypeFlagBitsEXT
-> ((# #) -> r) -> ((# #) -> r) -> r
EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT = ExportMetalObjectTypeFlagBitsEXT 0x00000004
pattern $bEXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT :: ExportMetalObjectTypeFlagBitsEXT
$mEXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT :: forall {r}.
ExportMetalObjectTypeFlagBitsEXT
-> ((# #) -> r) -> ((# #) -> r) -> r
EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT = ExportMetalObjectTypeFlagBitsEXT 0x00000008
pattern $bEXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT :: ExportMetalObjectTypeFlagBitsEXT
$mEXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT :: forall {r}.
ExportMetalObjectTypeFlagBitsEXT
-> ((# #) -> r) -> ((# #) -> r) -> r
EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT = ExportMetalObjectTypeFlagBitsEXT 0x00000010
pattern $bEXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT :: ExportMetalObjectTypeFlagBitsEXT
$mEXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT :: forall {r}.
ExportMetalObjectTypeFlagBitsEXT
-> ((# #) -> r) -> ((# #) -> r) -> r
EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT = ExportMetalObjectTypeFlagBitsEXT 0x00000020
conNameExportMetalObjectTypeFlagBitsEXT :: String
conNameExportMetalObjectTypeFlagBitsEXT :: String
conNameExportMetalObjectTypeFlagBitsEXT = String
"ExportMetalObjectTypeFlagBitsEXT"
enumPrefixExportMetalObjectTypeFlagBitsEXT :: String
enumPrefixExportMetalObjectTypeFlagBitsEXT :: String
enumPrefixExportMetalObjectTypeFlagBitsEXT = String
"EXPORT_METAL_OBJECT_TYPE_METAL_"
showTableExportMetalObjectTypeFlagBitsEXT :: [(ExportMetalObjectTypeFlagBitsEXT, String)]
showTableExportMetalObjectTypeFlagBitsEXT :: [(ExportMetalObjectTypeFlagBitsEXT, String)]
showTableExportMetalObjectTypeFlagBitsEXT =
[
( ExportMetalObjectTypeFlagBitsEXT
EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT
, String
"DEVICE_BIT_EXT"
)
,
( ExportMetalObjectTypeFlagBitsEXT
EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT
, String
"COMMAND_QUEUE_BIT_EXT"
)
,
( ExportMetalObjectTypeFlagBitsEXT
EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT
, String
"BUFFER_BIT_EXT"
)
,
( ExportMetalObjectTypeFlagBitsEXT
EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT
, String
"TEXTURE_BIT_EXT"
)
,
( ExportMetalObjectTypeFlagBitsEXT
EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT
, String
"IOSURFACE_BIT_EXT"
)
,
( ExportMetalObjectTypeFlagBitsEXT
EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT
, String
"SHARED_EVENT_BIT_EXT"
)
]
instance Show ExportMetalObjectTypeFlagBitsEXT where
showsPrec :: Int -> ExportMetalObjectTypeFlagBitsEXT -> ShowS
showsPrec =
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixExportMetalObjectTypeFlagBitsEXT
[(ExportMetalObjectTypeFlagBitsEXT, String)]
showTableExportMetalObjectTypeFlagBitsEXT
String
conNameExportMetalObjectTypeFlagBitsEXT
(\(ExportMetalObjectTypeFlagBitsEXT Flags
x) -> Flags
x)
(\Flags
x -> String -> ShowS
showString String
"0x" forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)
instance Read ExportMetalObjectTypeFlagBitsEXT where
readPrec :: ReadPrec ExportMetalObjectTypeFlagBitsEXT
readPrec =
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixExportMetalObjectTypeFlagBitsEXT
[(ExportMetalObjectTypeFlagBitsEXT, String)]
showTableExportMetalObjectTypeFlagBitsEXT
String
conNameExportMetalObjectTypeFlagBitsEXT
Flags -> ExportMetalObjectTypeFlagBitsEXT
ExportMetalObjectTypeFlagBitsEXT
type EXT_METAL_OBJECTS_SPEC_VERSION = 1
pattern EXT_METAL_OBJECTS_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_METAL_OBJECTS_SPEC_VERSION :: forall a. Integral a => a
$mEXT_METAL_OBJECTS_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_METAL_OBJECTS_SPEC_VERSION = 1
type EXT_METAL_OBJECTS_EXTENSION_NAME = "VK_EXT_metal_objects"
pattern EXT_METAL_OBJECTS_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_METAL_OBJECTS_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_METAL_OBJECTS_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_METAL_OBJECTS_EXTENSION_NAME = "VK_EXT_metal_objects"
type MTLDevice_id = Ptr ()
type MTLCommandQueue_id = Ptr ()
type MTLBuffer_id = Ptr ()
type MTLTexture_id = Ptr ()
type IOSurfaceRef = Ptr ()
type MTLSharedEvent_id = Ptr ()