{-# language CPP #-}
module OpenXR.Extensions.XR_KHR_vulkan_enable ( getVulkanInstanceExtensionsKHR
, getVulkanDeviceExtensionsKHR
, getVulkanGraphicsDeviceKHR
, getVulkanGraphicsRequirementsKHR
, GraphicsBindingVulkanKHR(..)
, SwapchainImageVulkanKHR(..)
, GraphicsRequirementsVulkanKHR(..)
, KHR_vulkan_enable_SPEC_VERSION
, pattern KHR_vulkan_enable_SPEC_VERSION
, KHR_VULKAN_ENABLE_EXTENSION_NAME
, pattern KHR_VULKAN_ENABLE_EXTENSION_NAME
) where
import OpenXR.Internal.Utils (traceAroundEvent)
import qualified OpenXR.VulkanTypes (Device_T)
import qualified OpenXR.VulkanTypes (Image)
import qualified OpenXR.VulkanTypes (Instance_T)
import qualified OpenXR.VulkanTypes (PhysicalDevice_T)
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 Data.ByteString (packCString)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Foreign.C.Types (CChar(..))
import OpenXR.CStruct (FromCStruct)
import OpenXR.CStruct (FromCStruct(..))
import OpenXR.CStruct (ToCStruct)
import OpenXR.CStruct (ToCStruct(..))
import OpenXR.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.C.Types (CChar)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import Data.Word (Word32)
import Data.ByteString (ByteString)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import OpenXR.NamedType ((:::))
import OpenXR.Core10.Handles (Instance)
import OpenXR.Core10.Handles (Instance(..))
import OpenXR.Dynamic (InstanceCmds(pXrGetVulkanDeviceExtensionsKHR))
import OpenXR.Dynamic (InstanceCmds(pXrGetVulkanGraphicsDeviceKHR))
import OpenXR.Dynamic (InstanceCmds(pXrGetVulkanGraphicsRequirementsKHR))
import OpenXR.Dynamic (InstanceCmds(pXrGetVulkanInstanceExtensionsKHR))
import OpenXR.Core10.Handles (Instance_T)
import OpenXR.Core10.Image (IsSwapchainImage(..))
import OpenXR.Exception (OpenXrException(..))
import OpenXR.Core10.Enums.Result (Result)
import OpenXR.Core10.Enums.Result (Result(..))
import OpenXR.Core10.Enums.StructureType (StructureType)
import OpenXR.Core10.Image (SwapchainImageBaseHeader(..))
import OpenXR.Core10.Device (SystemId)
import OpenXR.Core10.Device (SystemId(..))
import OpenXR.Version (Version)
import OpenXR.Core10.Enums.Result (Result(SUCCESS))
import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_GRAPHICS_BINDING_VULKAN_KHR))
import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_GRAPHICS_REQUIREMENTS_VULKAN_KHR))
import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_SWAPCHAIN_IMAGE_VULKAN_KHR))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkXrGetVulkanInstanceExtensionsKHR
:: FunPtr (Ptr Instance_T -> SystemId -> Word32 -> Ptr Word32 -> Ptr CChar -> IO Result) -> Ptr Instance_T -> SystemId -> Word32 -> Ptr Word32 -> Ptr CChar -> IO Result
getVulkanInstanceExtensionsKHR :: forall io
. (MonadIO io)
=>
Instance
->
SystemId
-> io (("buffer" ::: ByteString))
getVulkanInstanceExtensionsKHR :: Instance -> SystemId -> io ("buffer" ::: ByteString)
getVulkanInstanceExtensionsKHR instance' :: Instance
instance' systemId :: SystemId
systemId = IO ("buffer" ::: ByteString) -> io ("buffer" ::: ByteString)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ("buffer" ::: ByteString) -> io ("buffer" ::: ByteString))
-> (ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString)
-> IO ("buffer" ::: ByteString))
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString)
-> io ("buffer" ::: ByteString)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString)
-> IO ("buffer" ::: ByteString)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString)
-> io ("buffer" ::: ByteString))
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString)
-> io ("buffer" ::: ByteString)
forall a b. (a -> b) -> a -> b
$ do
let xrGetVulkanInstanceExtensionsKHRPtr :: FunPtr
(Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result)
xrGetVulkanInstanceExtensionsKHRPtr = InstanceCmds
-> FunPtr
(Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result)
pXrGetVulkanInstanceExtensionsKHR (Instance -> InstanceCmds
instanceCmds (Instance
instance' :: Instance))
IO () -> ContT ("buffer" ::: ByteString) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT ("buffer" ::: ByteString) IO ())
-> IO () -> ContT ("buffer" ::: ByteString) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result)
xrGetVulkanInstanceExtensionsKHRPtr FunPtr
(Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result)
-> FunPtr
(Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> 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 xrGetVulkanInstanceExtensionsKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let xrGetVulkanInstanceExtensionsKHR' :: Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result
xrGetVulkanInstanceExtensionsKHR' = FunPtr
(Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result)
-> Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result
mkXrGetVulkanInstanceExtensionsKHR FunPtr
(Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result)
xrGetVulkanInstanceExtensionsKHRPtr
let instance'' :: Ptr Instance_T
instance'' = Instance -> Ptr Instance_T
instanceHandle (Instance
instance')
"bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32)
pBufferCountOutput <- ((("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> IO ("buffer" ::: ByteString))
-> IO ("buffer" ::: ByteString))
-> ContT
("buffer" ::: ByteString)
IO
("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> IO ("buffer" ::: ByteString))
-> IO ("buffer" ::: ByteString))
-> ContT
("buffer" ::: ByteString)
IO
("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32)))
-> ((("bufferCountOutput"
::: Ptr ("bufferCapacityInput" ::: Word32))
-> IO ("buffer" ::: ByteString))
-> IO ("buffer" ::: ByteString))
-> ContT
("buffer" ::: ByteString)
IO
("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
forall a b. (a -> b) -> a -> b
$ IO ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> (("bufferCountOutput"
::: Ptr ("bufferCapacityInput" ::: Word32))
-> IO ())
-> (("bufferCountOutput"
::: Ptr ("bufferCapacityInput" ::: Word32))
-> IO ("buffer" ::: ByteString))
-> IO ("buffer" ::: ByteString)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int
-> IO
("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
forall a. Int -> IO (Ptr a)
callocBytes @Word32 4) ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> IO ()
forall a. Ptr a -> IO ()
free
Result
r <- IO Result -> ContT ("buffer" ::: ByteString) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT ("buffer" ::: ByteString) IO Result)
-> IO Result -> ContT ("buffer" ::: ByteString) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrGetVulkanInstanceExtensionsKHR" (Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result
xrGetVulkanInstanceExtensionsKHR' Ptr Instance_T
instance'' (SystemId
systemId) (0) ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32)
pBufferCountOutput) ("buffer" ::: Ptr CChar
forall a. Ptr a
nullPtr))
IO () -> ContT ("buffer" ::: ByteString) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT ("buffer" ::: ByteString) IO ())
-> IO () -> ContT ("buffer" ::: ByteString) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (OpenXrException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> OpenXrException
OpenXrException Result
r))
"bufferCapacityInput" ::: Word32
bufferCountOutput <- IO ("bufferCapacityInput" ::: Word32)
-> ContT
("buffer" ::: ByteString) IO ("bufferCapacityInput" ::: Word32)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("bufferCapacityInput" ::: Word32)
-> ContT
("buffer" ::: ByteString) IO ("bufferCapacityInput" ::: Word32))
-> IO ("bufferCapacityInput" ::: Word32)
-> ContT
("buffer" ::: ByteString) IO ("bufferCapacityInput" ::: Word32)
forall a b. (a -> b) -> a -> b
$ ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> IO ("bufferCapacityInput" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 "bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32)
pBufferCountOutput
"buffer" ::: Ptr CChar
pBuffer <- ((("buffer" ::: Ptr CChar) -> IO ("buffer" ::: ByteString))
-> IO ("buffer" ::: ByteString))
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: Ptr CChar)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("buffer" ::: Ptr CChar) -> IO ("buffer" ::: ByteString))
-> IO ("buffer" ::: ByteString))
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: Ptr CChar))
-> ((("buffer" ::: Ptr CChar) -> IO ("buffer" ::: ByteString))
-> IO ("buffer" ::: ByteString))
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: Ptr CChar)
forall a b. (a -> b) -> a -> b
$ IO ("buffer" ::: Ptr CChar)
-> (("buffer" ::: Ptr CChar) -> IO ())
-> (("buffer" ::: Ptr CChar) -> IO ("buffer" ::: ByteString))
-> IO ("buffer" ::: ByteString)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("buffer" ::: Ptr CChar)
forall a. Int -> IO (Ptr a)
callocBytes @CChar (("bufferCapacityInput" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ("bufferCapacityInput" ::: Word32
bufferCountOutput))) ("buffer" ::: Ptr CChar) -> IO ()
forall a. Ptr a -> IO ()
free
Result
r' <- IO Result -> ContT ("buffer" ::: ByteString) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT ("buffer" ::: ByteString) IO Result)
-> IO Result -> ContT ("buffer" ::: ByteString) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrGetVulkanInstanceExtensionsKHR" (Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result
xrGetVulkanInstanceExtensionsKHR' Ptr Instance_T
instance'' (SystemId
systemId) (("bufferCapacityInput" ::: Word32
bufferCountOutput)) ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32)
pBufferCountOutput) ("buffer" ::: Ptr CChar
pBuffer))
IO () -> ContT ("buffer" ::: ByteString) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT ("buffer" ::: ByteString) IO ())
-> IO () -> ContT ("buffer" ::: ByteString) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r' Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (OpenXrException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> OpenXrException
OpenXrException Result
r'))
"buffer" ::: ByteString
buffer' <- IO ("buffer" ::: ByteString)
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("buffer" ::: ByteString)
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString))
-> IO ("buffer" ::: ByteString)
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString)
forall a b. (a -> b) -> a -> b
$ ("buffer" ::: Ptr CChar) -> IO ("buffer" ::: ByteString)
packCString "buffer" ::: Ptr CChar
pBuffer
("buffer" ::: ByteString)
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("buffer" ::: ByteString)
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString))
-> ("buffer" ::: ByteString)
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString)
forall a b. (a -> b) -> a -> b
$ ("buffer" ::: ByteString
buffer')
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkXrGetVulkanDeviceExtensionsKHR
:: FunPtr (Ptr Instance_T -> SystemId -> Word32 -> Ptr Word32 -> Ptr CChar -> IO Result) -> Ptr Instance_T -> SystemId -> Word32 -> Ptr Word32 -> Ptr CChar -> IO Result
getVulkanDeviceExtensionsKHR :: forall io
. (MonadIO io)
=>
Instance
->
SystemId
-> io (("buffer" ::: ByteString))
getVulkanDeviceExtensionsKHR :: Instance -> SystemId -> io ("buffer" ::: ByteString)
getVulkanDeviceExtensionsKHR instance' :: Instance
instance' systemId :: SystemId
systemId = IO ("buffer" ::: ByteString) -> io ("buffer" ::: ByteString)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ("buffer" ::: ByteString) -> io ("buffer" ::: ByteString))
-> (ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString)
-> IO ("buffer" ::: ByteString))
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString)
-> io ("buffer" ::: ByteString)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString)
-> IO ("buffer" ::: ByteString)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString)
-> io ("buffer" ::: ByteString))
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString)
-> io ("buffer" ::: ByteString)
forall a b. (a -> b) -> a -> b
$ do
let xrGetVulkanDeviceExtensionsKHRPtr :: FunPtr
(Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result)
xrGetVulkanDeviceExtensionsKHRPtr = InstanceCmds
-> FunPtr
(Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result)
pXrGetVulkanDeviceExtensionsKHR (Instance -> InstanceCmds
instanceCmds (Instance
instance' :: Instance))
IO () -> ContT ("buffer" ::: ByteString) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT ("buffer" ::: ByteString) IO ())
-> IO () -> ContT ("buffer" ::: ByteString) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result)
xrGetVulkanDeviceExtensionsKHRPtr FunPtr
(Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result)
-> FunPtr
(Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> 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 xrGetVulkanDeviceExtensionsKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let xrGetVulkanDeviceExtensionsKHR' :: Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result
xrGetVulkanDeviceExtensionsKHR' = FunPtr
(Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result)
-> Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result
mkXrGetVulkanDeviceExtensionsKHR FunPtr
(Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result)
xrGetVulkanDeviceExtensionsKHRPtr
let instance'' :: Ptr Instance_T
instance'' = Instance -> Ptr Instance_T
instanceHandle (Instance
instance')
"bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32)
pBufferCountOutput <- ((("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> IO ("buffer" ::: ByteString))
-> IO ("buffer" ::: ByteString))
-> ContT
("buffer" ::: ByteString)
IO
("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> IO ("buffer" ::: ByteString))
-> IO ("buffer" ::: ByteString))
-> ContT
("buffer" ::: ByteString)
IO
("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32)))
-> ((("bufferCountOutput"
::: Ptr ("bufferCapacityInput" ::: Word32))
-> IO ("buffer" ::: ByteString))
-> IO ("buffer" ::: ByteString))
-> ContT
("buffer" ::: ByteString)
IO
("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
forall a b. (a -> b) -> a -> b
$ IO ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> (("bufferCountOutput"
::: Ptr ("bufferCapacityInput" ::: Word32))
-> IO ())
-> (("bufferCountOutput"
::: Ptr ("bufferCapacityInput" ::: Word32))
-> IO ("buffer" ::: ByteString))
-> IO ("buffer" ::: ByteString)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int
-> IO
("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
forall a. Int -> IO (Ptr a)
callocBytes @Word32 4) ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> IO ()
forall a. Ptr a -> IO ()
free
Result
r <- IO Result -> ContT ("buffer" ::: ByteString) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT ("buffer" ::: ByteString) IO Result)
-> IO Result -> ContT ("buffer" ::: ByteString) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrGetVulkanDeviceExtensionsKHR" (Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result
xrGetVulkanDeviceExtensionsKHR' Ptr Instance_T
instance'' (SystemId
systemId) (0) ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32)
pBufferCountOutput) ("buffer" ::: Ptr CChar
forall a. Ptr a
nullPtr))
IO () -> ContT ("buffer" ::: ByteString) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT ("buffer" ::: ByteString) IO ())
-> IO () -> ContT ("buffer" ::: ByteString) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (OpenXrException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> OpenXrException
OpenXrException Result
r))
"bufferCapacityInput" ::: Word32
bufferCountOutput <- IO ("bufferCapacityInput" ::: Word32)
-> ContT
("buffer" ::: ByteString) IO ("bufferCapacityInput" ::: Word32)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("bufferCapacityInput" ::: Word32)
-> ContT
("buffer" ::: ByteString) IO ("bufferCapacityInput" ::: Word32))
-> IO ("bufferCapacityInput" ::: Word32)
-> ContT
("buffer" ::: ByteString) IO ("bufferCapacityInput" ::: Word32)
forall a b. (a -> b) -> a -> b
$ ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> IO ("bufferCapacityInput" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 "bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32)
pBufferCountOutput
"buffer" ::: Ptr CChar
pBuffer <- ((("buffer" ::: Ptr CChar) -> IO ("buffer" ::: ByteString))
-> IO ("buffer" ::: ByteString))
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: Ptr CChar)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("buffer" ::: Ptr CChar) -> IO ("buffer" ::: ByteString))
-> IO ("buffer" ::: ByteString))
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: Ptr CChar))
-> ((("buffer" ::: Ptr CChar) -> IO ("buffer" ::: ByteString))
-> IO ("buffer" ::: ByteString))
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: Ptr CChar)
forall a b. (a -> b) -> a -> b
$ IO ("buffer" ::: Ptr CChar)
-> (("buffer" ::: Ptr CChar) -> IO ())
-> (("buffer" ::: Ptr CChar) -> IO ("buffer" ::: ByteString))
-> IO ("buffer" ::: ByteString)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("buffer" ::: Ptr CChar)
forall a. Int -> IO (Ptr a)
callocBytes @CChar (("bufferCapacityInput" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ("bufferCapacityInput" ::: Word32
bufferCountOutput))) ("buffer" ::: Ptr CChar) -> IO ()
forall a. Ptr a -> IO ()
free
Result
r' <- IO Result -> ContT ("buffer" ::: ByteString) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT ("buffer" ::: ByteString) IO Result)
-> IO Result -> ContT ("buffer" ::: ByteString) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrGetVulkanDeviceExtensionsKHR" (Ptr Instance_T
-> SystemId
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("buffer" ::: Ptr CChar)
-> IO Result
xrGetVulkanDeviceExtensionsKHR' Ptr Instance_T
instance'' (SystemId
systemId) (("bufferCapacityInput" ::: Word32
bufferCountOutput)) ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32)
pBufferCountOutput) ("buffer" ::: Ptr CChar
pBuffer))
IO () -> ContT ("buffer" ::: ByteString) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT ("buffer" ::: ByteString) IO ())
-> IO () -> ContT ("buffer" ::: ByteString) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r' Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (OpenXrException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> OpenXrException
OpenXrException Result
r'))
"buffer" ::: ByteString
buffer' <- IO ("buffer" ::: ByteString)
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("buffer" ::: ByteString)
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString))
-> IO ("buffer" ::: ByteString)
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString)
forall a b. (a -> b) -> a -> b
$ ("buffer" ::: Ptr CChar) -> IO ("buffer" ::: ByteString)
packCString "buffer" ::: Ptr CChar
pBuffer
("buffer" ::: ByteString)
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("buffer" ::: ByteString)
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString))
-> ("buffer" ::: ByteString)
-> ContT ("buffer" ::: ByteString) IO ("buffer" ::: ByteString)
forall a b. (a -> b) -> a -> b
$ ("buffer" ::: ByteString
buffer')
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkXrGetVulkanGraphicsDeviceKHR
:: FunPtr (Ptr Instance_T -> SystemId -> Ptr OpenXR.VulkanTypes.Instance_T -> Ptr (Ptr OpenXR.VulkanTypes.PhysicalDevice_T) -> IO Result) -> Ptr Instance_T -> SystemId -> Ptr OpenXR.VulkanTypes.Instance_T -> Ptr (Ptr OpenXR.VulkanTypes.PhysicalDevice_T) -> IO Result
getVulkanGraphicsDeviceKHR :: forall io
. (MonadIO io)
=>
Instance
->
SystemId
->
("vkInstance" ::: Ptr OpenXR.VulkanTypes.Instance_T)
-> io (("vkPhysicalDevice" ::: Ptr OpenXR.VulkanTypes.PhysicalDevice_T))
getVulkanGraphicsDeviceKHR :: Instance
-> SystemId
-> ("vkInstance" ::: Ptr Instance_T)
-> io ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
getVulkanGraphicsDeviceKHR instance' :: Instance
instance' systemId :: SystemId
systemId vkInstance :: "vkInstance" ::: Ptr Instance_T
vkInstance = IO ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> io ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> io ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> (ContT
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
IO
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> IO ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> ContT
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
IO
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> io ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
IO
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> IO ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
IO
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> io ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> ContT
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
IO
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> io ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall a b. (a -> b) -> a -> b
$ do
let xrGetVulkanGraphicsDeviceKHRPtr :: FunPtr
(Ptr Instance_T
-> SystemId
-> ("vkInstance" ::: Ptr Instance_T)
-> ("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO Result)
xrGetVulkanGraphicsDeviceKHRPtr = InstanceCmds
-> FunPtr
(Ptr Instance_T
-> SystemId
-> ("vkInstance" ::: Ptr Instance_T)
-> ("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO Result)
pXrGetVulkanGraphicsDeviceKHR (Instance -> InstanceCmds
instanceCmds (Instance
instance' :: Instance))
IO () -> ContT ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T) IO ())
-> IO ()
-> ContT ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Instance_T
-> SystemId
-> ("vkInstance" ::: Ptr Instance_T)
-> ("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO Result)
xrGetVulkanGraphicsDeviceKHRPtr FunPtr
(Ptr Instance_T
-> SystemId
-> ("vkInstance" ::: Ptr Instance_T)
-> ("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO Result)
-> FunPtr
(Ptr Instance_T
-> SystemId
-> ("vkInstance" ::: Ptr Instance_T)
-> ("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Instance_T
-> SystemId
-> ("vkInstance" ::: Ptr Instance_T)
-> ("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> 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 xrGetVulkanGraphicsDeviceKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let xrGetVulkanGraphicsDeviceKHR' :: Ptr Instance_T
-> SystemId
-> ("vkInstance" ::: Ptr Instance_T)
-> ("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO Result
xrGetVulkanGraphicsDeviceKHR' = FunPtr
(Ptr Instance_T
-> SystemId
-> ("vkInstance" ::: Ptr Instance_T)
-> ("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO Result)
-> Ptr Instance_T
-> SystemId
-> ("vkInstance" ::: Ptr Instance_T)
-> ("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO Result
mkXrGetVulkanGraphicsDeviceKHR FunPtr
(Ptr Instance_T
-> SystemId
-> ("vkInstance" ::: Ptr Instance_T)
-> ("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO Result)
xrGetVulkanGraphicsDeviceKHRPtr
"vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
pVkPhysicalDevice <- ((("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> ContT
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
IO
("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> ContT
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
IO
("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)))
-> ((("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> ContT
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
IO
("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
forall a b. (a -> b) -> a -> b
$ IO
("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> (("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO ())
-> (("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int
-> IO
("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
forall a. Int -> IO (Ptr a)
callocBytes @(Ptr OpenXR.VulkanTypes.PhysicalDevice_T) 8) ("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO ()
forall a. Ptr a -> IO ()
free
Result
r <- IO Result
-> ContT ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
-> ContT ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T) IO Result)
-> IO Result
-> ContT ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrGetVulkanGraphicsDeviceKHR" (Ptr Instance_T
-> SystemId
-> ("vkInstance" ::: Ptr Instance_T)
-> ("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO Result
xrGetVulkanGraphicsDeviceKHR' (Instance -> Ptr Instance_T
instanceHandle (Instance
instance')) (SystemId
systemId) ("vkInstance" ::: Ptr Instance_T
vkInstance) ("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
pVkPhysicalDevice))
IO () -> ContT ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T) IO ())
-> IO ()
-> ContT ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T) 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) (OpenXrException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> OpenXrException
OpenXrException Result
r))
"vkPhysicalDevice" ::: Ptr PhysicalDevice_T
vkPhysicalDevice <- IO ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> ContT
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
IO
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> ContT
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
IO
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> ContT
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
IO
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall a b. (a -> b) -> a -> b
$ ("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr OpenXR.VulkanTypes.PhysicalDevice_T) "vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
pVkPhysicalDevice
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> ContT
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
IO
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> ContT
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
IO
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> ContT
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
IO
("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall a b. (a -> b) -> a -> b
$ ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T
vkPhysicalDevice)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkXrGetVulkanGraphicsRequirementsKHR
:: FunPtr (Ptr Instance_T -> SystemId -> Ptr GraphicsRequirementsVulkanKHR -> IO Result) -> Ptr Instance_T -> SystemId -> Ptr GraphicsRequirementsVulkanKHR -> IO Result
getVulkanGraphicsRequirementsKHR :: forall io
. (MonadIO io)
=>
Instance
->
SystemId
-> io (GraphicsRequirementsVulkanKHR)
getVulkanGraphicsRequirementsKHR :: Instance -> SystemId -> io GraphicsRequirementsVulkanKHR
getVulkanGraphicsRequirementsKHR instance' :: Instance
instance' systemId :: SystemId
systemId = IO GraphicsRequirementsVulkanKHR
-> io GraphicsRequirementsVulkanKHR
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GraphicsRequirementsVulkanKHR
-> io GraphicsRequirementsVulkanKHR)
-> (ContT
GraphicsRequirementsVulkanKHR IO GraphicsRequirementsVulkanKHR
-> IO GraphicsRequirementsVulkanKHR)
-> ContT
GraphicsRequirementsVulkanKHR IO GraphicsRequirementsVulkanKHR
-> io GraphicsRequirementsVulkanKHR
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
GraphicsRequirementsVulkanKHR IO GraphicsRequirementsVulkanKHR
-> IO GraphicsRequirementsVulkanKHR
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
GraphicsRequirementsVulkanKHR IO GraphicsRequirementsVulkanKHR
-> io GraphicsRequirementsVulkanKHR)
-> ContT
GraphicsRequirementsVulkanKHR IO GraphicsRequirementsVulkanKHR
-> io GraphicsRequirementsVulkanKHR
forall a b. (a -> b) -> a -> b
$ do
let xrGetVulkanGraphicsRequirementsKHRPtr :: FunPtr
(Ptr Instance_T
-> SystemId -> Ptr GraphicsRequirementsVulkanKHR -> IO Result)
xrGetVulkanGraphicsRequirementsKHRPtr = InstanceCmds
-> FunPtr
(Ptr Instance_T
-> SystemId -> Ptr GraphicsRequirementsVulkanKHR -> IO Result)
pXrGetVulkanGraphicsRequirementsKHR (Instance -> InstanceCmds
instanceCmds (Instance
instance' :: Instance))
IO () -> ContT GraphicsRequirementsVulkanKHR IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT GraphicsRequirementsVulkanKHR IO ())
-> IO () -> ContT GraphicsRequirementsVulkanKHR IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Instance_T
-> SystemId -> Ptr GraphicsRequirementsVulkanKHR -> IO Result)
xrGetVulkanGraphicsRequirementsKHRPtr FunPtr
(Ptr Instance_T
-> SystemId -> Ptr GraphicsRequirementsVulkanKHR -> IO Result)
-> FunPtr
(Ptr Instance_T
-> SystemId -> Ptr GraphicsRequirementsVulkanKHR -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Instance_T
-> SystemId -> Ptr GraphicsRequirementsVulkanKHR -> 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 xrGetVulkanGraphicsRequirementsKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let xrGetVulkanGraphicsRequirementsKHR' :: Ptr Instance_T
-> SystemId -> Ptr GraphicsRequirementsVulkanKHR -> IO Result
xrGetVulkanGraphicsRequirementsKHR' = FunPtr
(Ptr Instance_T
-> SystemId -> Ptr GraphicsRequirementsVulkanKHR -> IO Result)
-> Ptr Instance_T
-> SystemId
-> Ptr GraphicsRequirementsVulkanKHR
-> IO Result
mkXrGetVulkanGraphicsRequirementsKHR FunPtr
(Ptr Instance_T
-> SystemId -> Ptr GraphicsRequirementsVulkanKHR -> IO Result)
xrGetVulkanGraphicsRequirementsKHRPtr
Ptr GraphicsRequirementsVulkanKHR
pGraphicsRequirements <- ((Ptr GraphicsRequirementsVulkanKHR
-> IO GraphicsRequirementsVulkanKHR)
-> IO GraphicsRequirementsVulkanKHR)
-> ContT
GraphicsRequirementsVulkanKHR
IO
(Ptr GraphicsRequirementsVulkanKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall b.
ToCStruct GraphicsRequirementsVulkanKHR =>
(Ptr GraphicsRequirementsVulkanKHR -> IO b) -> IO b
forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @GraphicsRequirementsVulkanKHR)
Result
r <- IO Result -> ContT GraphicsRequirementsVulkanKHR IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT GraphicsRequirementsVulkanKHR IO Result)
-> IO Result -> ContT GraphicsRequirementsVulkanKHR IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrGetVulkanGraphicsRequirementsKHR" (Ptr Instance_T
-> SystemId -> Ptr GraphicsRequirementsVulkanKHR -> IO Result
xrGetVulkanGraphicsRequirementsKHR' (Instance -> Ptr Instance_T
instanceHandle (Instance
instance')) (SystemId
systemId) (Ptr GraphicsRequirementsVulkanKHR
pGraphicsRequirements))
IO () -> ContT GraphicsRequirementsVulkanKHR IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT GraphicsRequirementsVulkanKHR IO ())
-> IO () -> ContT GraphicsRequirementsVulkanKHR 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) (OpenXrException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> OpenXrException
OpenXrException Result
r))
GraphicsRequirementsVulkanKHR
graphicsRequirements <- IO GraphicsRequirementsVulkanKHR
-> ContT
GraphicsRequirementsVulkanKHR IO GraphicsRequirementsVulkanKHR
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO GraphicsRequirementsVulkanKHR
-> ContT
GraphicsRequirementsVulkanKHR IO GraphicsRequirementsVulkanKHR)
-> IO GraphicsRequirementsVulkanKHR
-> ContT
GraphicsRequirementsVulkanKHR IO GraphicsRequirementsVulkanKHR
forall a b. (a -> b) -> a -> b
$ Ptr GraphicsRequirementsVulkanKHR
-> IO GraphicsRequirementsVulkanKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @GraphicsRequirementsVulkanKHR Ptr GraphicsRequirementsVulkanKHR
pGraphicsRequirements
GraphicsRequirementsVulkanKHR
-> ContT
GraphicsRequirementsVulkanKHR IO GraphicsRequirementsVulkanKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (GraphicsRequirementsVulkanKHR
-> ContT
GraphicsRequirementsVulkanKHR IO GraphicsRequirementsVulkanKHR)
-> GraphicsRequirementsVulkanKHR
-> ContT
GraphicsRequirementsVulkanKHR IO GraphicsRequirementsVulkanKHR
forall a b. (a -> b) -> a -> b
$ (GraphicsRequirementsVulkanKHR
graphicsRequirements)
data GraphicsBindingVulkanKHR = GraphicsBindingVulkanKHR
{
GraphicsBindingVulkanKHR -> "vkInstance" ::: Ptr Instance_T
instance' :: Ptr OpenXR.VulkanTypes.Instance_T
,
GraphicsBindingVulkanKHR
-> "vkPhysicalDevice" ::: Ptr PhysicalDevice_T
physicalDevice :: Ptr OpenXR.VulkanTypes.PhysicalDevice_T
,
GraphicsBindingVulkanKHR -> Ptr Device_T
device :: Ptr OpenXR.VulkanTypes.Device_T
,
GraphicsBindingVulkanKHR -> "bufferCapacityInput" ::: Word32
queueFamilyIndex :: Word32
,
GraphicsBindingVulkanKHR -> "bufferCapacityInput" ::: Word32
queueIndex :: Word32
}
deriving (Typeable, GraphicsBindingVulkanKHR -> GraphicsBindingVulkanKHR -> Bool
(GraphicsBindingVulkanKHR -> GraphicsBindingVulkanKHR -> Bool)
-> (GraphicsBindingVulkanKHR -> GraphicsBindingVulkanKHR -> Bool)
-> Eq GraphicsBindingVulkanKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GraphicsBindingVulkanKHR -> GraphicsBindingVulkanKHR -> Bool
$c/= :: GraphicsBindingVulkanKHR -> GraphicsBindingVulkanKHR -> Bool
== :: GraphicsBindingVulkanKHR -> GraphicsBindingVulkanKHR -> Bool
$c== :: GraphicsBindingVulkanKHR -> GraphicsBindingVulkanKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (GraphicsBindingVulkanKHR)
#endif
deriving instance Show GraphicsBindingVulkanKHR
instance ToCStruct GraphicsBindingVulkanKHR where
withCStruct :: GraphicsBindingVulkanKHR
-> (Ptr GraphicsBindingVulkanKHR -> IO b) -> IO b
withCStruct x :: GraphicsBindingVulkanKHR
x f :: Ptr GraphicsBindingVulkanKHR -> IO b
f = Int -> Int -> (Ptr GraphicsBindingVulkanKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 48 8 ((Ptr GraphicsBindingVulkanKHR -> IO b) -> IO b)
-> (Ptr GraphicsBindingVulkanKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr GraphicsBindingVulkanKHR
p -> Ptr GraphicsBindingVulkanKHR
-> GraphicsBindingVulkanKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr GraphicsBindingVulkanKHR
p GraphicsBindingVulkanKHR
x (Ptr GraphicsBindingVulkanKHR -> IO b
f Ptr GraphicsBindingVulkanKHR
p)
pokeCStruct :: Ptr GraphicsBindingVulkanKHR
-> GraphicsBindingVulkanKHR -> IO b -> IO b
pokeCStruct p :: Ptr GraphicsBindingVulkanKHR
p GraphicsBindingVulkanKHR{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsBindingVulkanKHR
p Ptr GraphicsBindingVulkanKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_GRAPHICS_BINDING_VULKAN_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsBindingVulkanKHR
p Ptr GraphicsBindingVulkanKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("vkInstance" ::: Ptr Instance_T)
-> ("vkInstance" ::: Ptr Instance_T) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsBindingVulkanKHR
p Ptr GraphicsBindingVulkanKHR
-> Int -> Ptr ("vkInstance" ::: Ptr Instance_T)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (Ptr OpenXR.VulkanTypes.Instance_T))) ("vkInstance" ::: Ptr Instance_T
instance')
("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsBindingVulkanKHR
p Ptr GraphicsBindingVulkanKHR
-> Int
-> "vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr OpenXR.VulkanTypes.PhysicalDevice_T))) ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T
physicalDevice)
Ptr (Ptr Device_T) -> Ptr Device_T -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsBindingVulkanKHR
p Ptr GraphicsBindingVulkanKHR -> Int -> Ptr (Ptr Device_T)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (Ptr OpenXR.VulkanTypes.Device_T))) (Ptr Device_T
device)
("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("bufferCapacityInput" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsBindingVulkanKHR
p Ptr GraphicsBindingVulkanKHR
-> Int
-> "bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Word32)) ("bufferCapacityInput" ::: Word32
queueFamilyIndex)
("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("bufferCapacityInput" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsBindingVulkanKHR
p Ptr GraphicsBindingVulkanKHR
-> Int
-> "bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 44 :: Ptr Word32)) ("bufferCapacityInput" ::: Word32
queueIndex)
IO b
f
cStructSize :: Int
cStructSize = 48
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr GraphicsBindingVulkanKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr GraphicsBindingVulkanKHR
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsBindingVulkanKHR
p Ptr GraphicsBindingVulkanKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_GRAPHICS_BINDING_VULKAN_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsBindingVulkanKHR
p Ptr GraphicsBindingVulkanKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("vkInstance" ::: Ptr Instance_T)
-> ("vkInstance" ::: Ptr Instance_T) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsBindingVulkanKHR
p Ptr GraphicsBindingVulkanKHR
-> Int -> Ptr ("vkInstance" ::: Ptr Instance_T)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (Ptr OpenXR.VulkanTypes.Instance_T))) ("vkInstance" ::: Ptr Instance_T
forall a. Zero a => a
zero)
("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsBindingVulkanKHR
p Ptr GraphicsBindingVulkanKHR
-> Int
-> "vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr OpenXR.VulkanTypes.PhysicalDevice_T))) ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T
forall a. Zero a => a
zero)
Ptr (Ptr Device_T) -> Ptr Device_T -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsBindingVulkanKHR
p Ptr GraphicsBindingVulkanKHR -> Int -> Ptr (Ptr Device_T)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (Ptr OpenXR.VulkanTypes.Device_T))) (Ptr Device_T
forall a. Zero a => a
zero)
("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("bufferCapacityInput" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsBindingVulkanKHR
p Ptr GraphicsBindingVulkanKHR
-> Int
-> "bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Word32)) ("bufferCapacityInput" ::: Word32
forall a. Zero a => a
zero)
("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> ("bufferCapacityInput" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsBindingVulkanKHR
p Ptr GraphicsBindingVulkanKHR
-> Int
-> "bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 44 :: Ptr Word32)) ("bufferCapacityInput" ::: Word32
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct GraphicsBindingVulkanKHR where
peekCStruct :: Ptr GraphicsBindingVulkanKHR -> IO GraphicsBindingVulkanKHR
peekCStruct p :: Ptr GraphicsBindingVulkanKHR
p = do
"vkInstance" ::: Ptr Instance_T
instance' <- Ptr ("vkInstance" ::: Ptr Instance_T)
-> IO ("vkInstance" ::: Ptr Instance_T)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr OpenXR.VulkanTypes.Instance_T) ((Ptr GraphicsBindingVulkanKHR
p Ptr GraphicsBindingVulkanKHR
-> Int -> Ptr ("vkInstance" ::: Ptr Instance_T)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (Ptr OpenXR.VulkanTypes.Instance_T)))
"vkPhysicalDevice" ::: Ptr PhysicalDevice_T
physicalDevice <- ("vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr OpenXR.VulkanTypes.PhysicalDevice_T) ((Ptr GraphicsBindingVulkanKHR
p Ptr GraphicsBindingVulkanKHR
-> Int
-> "vkPhysicalDevice"
::: Ptr ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr OpenXR.VulkanTypes.PhysicalDevice_T)))
Ptr Device_T
device <- Ptr (Ptr Device_T) -> IO (Ptr Device_T)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr OpenXR.VulkanTypes.Device_T) ((Ptr GraphicsBindingVulkanKHR
p Ptr GraphicsBindingVulkanKHR -> Int -> Ptr (Ptr Device_T)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (Ptr OpenXR.VulkanTypes.Device_T)))
"bufferCapacityInput" ::: Word32
queueFamilyIndex <- ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> IO ("bufferCapacityInput" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr GraphicsBindingVulkanKHR
p Ptr GraphicsBindingVulkanKHR
-> Int
-> "bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Word32))
"bufferCapacityInput" ::: Word32
queueIndex <- ("bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32))
-> IO ("bufferCapacityInput" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr GraphicsBindingVulkanKHR
p Ptr GraphicsBindingVulkanKHR
-> Int
-> "bufferCountOutput" ::: Ptr ("bufferCapacityInput" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 44 :: Ptr Word32))
GraphicsBindingVulkanKHR -> IO GraphicsBindingVulkanKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (GraphicsBindingVulkanKHR -> IO GraphicsBindingVulkanKHR)
-> GraphicsBindingVulkanKHR -> IO GraphicsBindingVulkanKHR
forall a b. (a -> b) -> a -> b
$ ("vkInstance" ::: Ptr Instance_T)
-> ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> Ptr Device_T
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCapacityInput" ::: Word32)
-> GraphicsBindingVulkanKHR
GraphicsBindingVulkanKHR
"vkInstance" ::: Ptr Instance_T
instance' "vkPhysicalDevice" ::: Ptr PhysicalDevice_T
physicalDevice Ptr Device_T
device "bufferCapacityInput" ::: Word32
queueFamilyIndex "bufferCapacityInput" ::: Word32
queueIndex
instance Storable GraphicsBindingVulkanKHR where
sizeOf :: GraphicsBindingVulkanKHR -> Int
sizeOf ~GraphicsBindingVulkanKHR
_ = 48
alignment :: GraphicsBindingVulkanKHR -> Int
alignment ~GraphicsBindingVulkanKHR
_ = 8
peek :: Ptr GraphicsBindingVulkanKHR -> IO GraphicsBindingVulkanKHR
peek = Ptr GraphicsBindingVulkanKHR -> IO GraphicsBindingVulkanKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr GraphicsBindingVulkanKHR -> GraphicsBindingVulkanKHR -> IO ()
poke ptr :: Ptr GraphicsBindingVulkanKHR
ptr poked :: GraphicsBindingVulkanKHR
poked = Ptr GraphicsBindingVulkanKHR
-> GraphicsBindingVulkanKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr GraphicsBindingVulkanKHR
ptr GraphicsBindingVulkanKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero GraphicsBindingVulkanKHR where
zero :: GraphicsBindingVulkanKHR
zero = ("vkInstance" ::: Ptr Instance_T)
-> ("vkPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> Ptr Device_T
-> ("bufferCapacityInput" ::: Word32)
-> ("bufferCapacityInput" ::: Word32)
-> GraphicsBindingVulkanKHR
GraphicsBindingVulkanKHR
"vkInstance" ::: Ptr Instance_T
forall a. Zero a => a
zero
"vkPhysicalDevice" ::: Ptr PhysicalDevice_T
forall a. Zero a => a
zero
Ptr Device_T
forall a. Zero a => a
zero
"bufferCapacityInput" ::: Word32
forall a. Zero a => a
zero
"bufferCapacityInput" ::: Word32
forall a. Zero a => a
zero
data SwapchainImageVulkanKHR = SwapchainImageVulkanKHR
{
SwapchainImageVulkanKHR -> Image
image :: OpenXR.VulkanTypes.Image }
deriving (Typeable, SwapchainImageVulkanKHR -> SwapchainImageVulkanKHR -> Bool
(SwapchainImageVulkanKHR -> SwapchainImageVulkanKHR -> Bool)
-> (SwapchainImageVulkanKHR -> SwapchainImageVulkanKHR -> Bool)
-> Eq SwapchainImageVulkanKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SwapchainImageVulkanKHR -> SwapchainImageVulkanKHR -> Bool
$c/= :: SwapchainImageVulkanKHR -> SwapchainImageVulkanKHR -> Bool
== :: SwapchainImageVulkanKHR -> SwapchainImageVulkanKHR -> Bool
$c== :: SwapchainImageVulkanKHR -> SwapchainImageVulkanKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SwapchainImageVulkanKHR)
#endif
deriving instance Show SwapchainImageVulkanKHR
instance IsSwapchainImage SwapchainImageVulkanKHR where
toSwapchainImageBaseHeader :: SwapchainImageVulkanKHR -> SwapchainImageBaseHeader
toSwapchainImageBaseHeader SwapchainImageVulkanKHR{} = $WSwapchainImageBaseHeader :: StructureType -> SwapchainImageBaseHeader
SwapchainImageBaseHeader{$sel:type':SwapchainImageBaseHeader :: StructureType
type' = StructureType
TYPE_SWAPCHAIN_IMAGE_VULKAN_KHR}
instance ToCStruct SwapchainImageVulkanKHR where
withCStruct :: SwapchainImageVulkanKHR
-> (Ptr SwapchainImageVulkanKHR -> IO b) -> IO b
withCStruct x :: SwapchainImageVulkanKHR
x f :: Ptr SwapchainImageVulkanKHR -> IO b
f = Int -> Int -> (Ptr SwapchainImageVulkanKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr SwapchainImageVulkanKHR -> IO b) -> IO b)
-> (Ptr SwapchainImageVulkanKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr SwapchainImageVulkanKHR
p -> Ptr SwapchainImageVulkanKHR
-> SwapchainImageVulkanKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SwapchainImageVulkanKHR
p SwapchainImageVulkanKHR
x (Ptr SwapchainImageVulkanKHR -> IO b
f Ptr SwapchainImageVulkanKHR
p)
pokeCStruct :: Ptr SwapchainImageVulkanKHR
-> SwapchainImageVulkanKHR -> IO b -> IO b
pokeCStruct p :: Ptr SwapchainImageVulkanKHR
p SwapchainImageVulkanKHR{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainImageVulkanKHR
p Ptr SwapchainImageVulkanKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_SWAPCHAIN_IMAGE_VULKAN_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainImageVulkanKHR
p Ptr SwapchainImageVulkanKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Image -> Image -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainImageVulkanKHR
p Ptr SwapchainImageVulkanKHR -> Int -> Ptr Image
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr OpenXR.VulkanTypes.Image)) (Image
image)
IO b
f
cStructSize :: Int
cStructSize = 24
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr SwapchainImageVulkanKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr SwapchainImageVulkanKHR
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainImageVulkanKHR
p Ptr SwapchainImageVulkanKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_SWAPCHAIN_IMAGE_VULKAN_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainImageVulkanKHR
p Ptr SwapchainImageVulkanKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Image -> Image -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainImageVulkanKHR
p Ptr SwapchainImageVulkanKHR -> Int -> Ptr Image
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr OpenXR.VulkanTypes.Image)) (Image
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct SwapchainImageVulkanKHR where
peekCStruct :: Ptr SwapchainImageVulkanKHR -> IO SwapchainImageVulkanKHR
peekCStruct p :: Ptr SwapchainImageVulkanKHR
p = do
Image
image <- Ptr Image -> IO Image
forall a. Storable a => Ptr a -> IO a
peek @OpenXR.VulkanTypes.Image ((Ptr SwapchainImageVulkanKHR
p Ptr SwapchainImageVulkanKHR -> Int -> Ptr Image
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr OpenXR.VulkanTypes.Image))
SwapchainImageVulkanKHR -> IO SwapchainImageVulkanKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SwapchainImageVulkanKHR -> IO SwapchainImageVulkanKHR)
-> SwapchainImageVulkanKHR -> IO SwapchainImageVulkanKHR
forall a b. (a -> b) -> a -> b
$ Image -> SwapchainImageVulkanKHR
SwapchainImageVulkanKHR
Image
image
instance Storable SwapchainImageVulkanKHR where
sizeOf :: SwapchainImageVulkanKHR -> Int
sizeOf ~SwapchainImageVulkanKHR
_ = 24
alignment :: SwapchainImageVulkanKHR -> Int
alignment ~SwapchainImageVulkanKHR
_ = 8
peek :: Ptr SwapchainImageVulkanKHR -> IO SwapchainImageVulkanKHR
peek = Ptr SwapchainImageVulkanKHR -> IO SwapchainImageVulkanKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr SwapchainImageVulkanKHR -> SwapchainImageVulkanKHR -> IO ()
poke ptr :: Ptr SwapchainImageVulkanKHR
ptr poked :: SwapchainImageVulkanKHR
poked = Ptr SwapchainImageVulkanKHR
-> SwapchainImageVulkanKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SwapchainImageVulkanKHR
ptr SwapchainImageVulkanKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero SwapchainImageVulkanKHR where
zero :: SwapchainImageVulkanKHR
zero = Image -> SwapchainImageVulkanKHR
SwapchainImageVulkanKHR
Image
forall a. Zero a => a
zero
data GraphicsRequirementsVulkanKHR = GraphicsRequirementsVulkanKHR
{
GraphicsRequirementsVulkanKHR -> Version
minApiVersionSupported :: Version
,
GraphicsRequirementsVulkanKHR -> Version
maxApiVersionSupported :: Version
}
deriving (Typeable, GraphicsRequirementsVulkanKHR
-> GraphicsRequirementsVulkanKHR -> Bool
(GraphicsRequirementsVulkanKHR
-> GraphicsRequirementsVulkanKHR -> Bool)
-> (GraphicsRequirementsVulkanKHR
-> GraphicsRequirementsVulkanKHR -> Bool)
-> Eq GraphicsRequirementsVulkanKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GraphicsRequirementsVulkanKHR
-> GraphicsRequirementsVulkanKHR -> Bool
$c/= :: GraphicsRequirementsVulkanKHR
-> GraphicsRequirementsVulkanKHR -> Bool
== :: GraphicsRequirementsVulkanKHR
-> GraphicsRequirementsVulkanKHR -> Bool
$c== :: GraphicsRequirementsVulkanKHR
-> GraphicsRequirementsVulkanKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (GraphicsRequirementsVulkanKHR)
#endif
deriving instance Show GraphicsRequirementsVulkanKHR
instance ToCStruct GraphicsRequirementsVulkanKHR where
withCStruct :: GraphicsRequirementsVulkanKHR
-> (Ptr GraphicsRequirementsVulkanKHR -> IO b) -> IO b
withCStruct x :: GraphicsRequirementsVulkanKHR
x f :: Ptr GraphicsRequirementsVulkanKHR -> IO b
f = Int -> Int -> (Ptr GraphicsRequirementsVulkanKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((Ptr GraphicsRequirementsVulkanKHR -> IO b) -> IO b)
-> (Ptr GraphicsRequirementsVulkanKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr GraphicsRequirementsVulkanKHR
p -> Ptr GraphicsRequirementsVulkanKHR
-> GraphicsRequirementsVulkanKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr GraphicsRequirementsVulkanKHR
p GraphicsRequirementsVulkanKHR
x (Ptr GraphicsRequirementsVulkanKHR -> IO b
f Ptr GraphicsRequirementsVulkanKHR
p)
pokeCStruct :: Ptr GraphicsRequirementsVulkanKHR
-> GraphicsRequirementsVulkanKHR -> IO b -> IO b
pokeCStruct p :: Ptr GraphicsRequirementsVulkanKHR
p GraphicsRequirementsVulkanKHR{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsRequirementsVulkanKHR
p Ptr GraphicsRequirementsVulkanKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_GRAPHICS_REQUIREMENTS_VULKAN_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsRequirementsVulkanKHR
p Ptr GraphicsRequirementsVulkanKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Version -> Version -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsRequirementsVulkanKHR
p Ptr GraphicsRequirementsVulkanKHR -> Int -> Ptr Version
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Version)) (Version
minApiVersionSupported)
Ptr Version -> Version -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsRequirementsVulkanKHR
p Ptr GraphicsRequirementsVulkanKHR -> Int -> Ptr Version
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Version)) (Version
maxApiVersionSupported)
IO b
f
cStructSize :: Int
cStructSize = 32
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr GraphicsRequirementsVulkanKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr GraphicsRequirementsVulkanKHR
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsRequirementsVulkanKHR
p Ptr GraphicsRequirementsVulkanKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_GRAPHICS_REQUIREMENTS_VULKAN_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsRequirementsVulkanKHR
p Ptr GraphicsRequirementsVulkanKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Version -> Version -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsRequirementsVulkanKHR
p Ptr GraphicsRequirementsVulkanKHR -> Int -> Ptr Version
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Version)) (Version
forall a. Zero a => a
zero)
Ptr Version -> Version -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsRequirementsVulkanKHR
p Ptr GraphicsRequirementsVulkanKHR -> Int -> Ptr Version
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Version)) (Version
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct GraphicsRequirementsVulkanKHR where
peekCStruct :: Ptr GraphicsRequirementsVulkanKHR
-> IO GraphicsRequirementsVulkanKHR
peekCStruct p :: Ptr GraphicsRequirementsVulkanKHR
p = do
Version
minApiVersionSupported <- Ptr Version -> IO Version
forall a. Storable a => Ptr a -> IO a
peek @Version ((Ptr GraphicsRequirementsVulkanKHR
p Ptr GraphicsRequirementsVulkanKHR -> Int -> Ptr Version
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Version))
Version
maxApiVersionSupported <- Ptr Version -> IO Version
forall a. Storable a => Ptr a -> IO a
peek @Version ((Ptr GraphicsRequirementsVulkanKHR
p Ptr GraphicsRequirementsVulkanKHR -> Int -> Ptr Version
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Version))
GraphicsRequirementsVulkanKHR -> IO GraphicsRequirementsVulkanKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (GraphicsRequirementsVulkanKHR -> IO GraphicsRequirementsVulkanKHR)
-> GraphicsRequirementsVulkanKHR
-> IO GraphicsRequirementsVulkanKHR
forall a b. (a -> b) -> a -> b
$ Version -> Version -> GraphicsRequirementsVulkanKHR
GraphicsRequirementsVulkanKHR
Version
minApiVersionSupported Version
maxApiVersionSupported
instance Storable GraphicsRequirementsVulkanKHR where
sizeOf :: GraphicsRequirementsVulkanKHR -> Int
sizeOf ~GraphicsRequirementsVulkanKHR
_ = 32
alignment :: GraphicsRequirementsVulkanKHR -> Int
alignment ~GraphicsRequirementsVulkanKHR
_ = 8
peek :: Ptr GraphicsRequirementsVulkanKHR
-> IO GraphicsRequirementsVulkanKHR
peek = Ptr GraphicsRequirementsVulkanKHR
-> IO GraphicsRequirementsVulkanKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr GraphicsRequirementsVulkanKHR
-> GraphicsRequirementsVulkanKHR -> IO ()
poke ptr :: Ptr GraphicsRequirementsVulkanKHR
ptr poked :: GraphicsRequirementsVulkanKHR
poked = Ptr GraphicsRequirementsVulkanKHR
-> GraphicsRequirementsVulkanKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr GraphicsRequirementsVulkanKHR
ptr GraphicsRequirementsVulkanKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero GraphicsRequirementsVulkanKHR where
zero :: GraphicsRequirementsVulkanKHR
zero = Version -> Version -> GraphicsRequirementsVulkanKHR
GraphicsRequirementsVulkanKHR
Version
forall a. Zero a => a
zero
Version
forall a. Zero a => a
zero
type KHR_vulkan_enable_SPEC_VERSION = 7
pattern KHR_vulkan_enable_SPEC_VERSION :: forall a . Integral a => a
pattern $bKHR_vulkan_enable_SPEC_VERSION :: a
$mKHR_vulkan_enable_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
KHR_vulkan_enable_SPEC_VERSION = 7
type KHR_VULKAN_ENABLE_EXTENSION_NAME = "XR_KHR_vulkan_enable"
pattern KHR_VULKAN_ENABLE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bKHR_VULKAN_ENABLE_EXTENSION_NAME :: a
$mKHR_VULKAN_ENABLE_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
KHR_VULKAN_ENABLE_EXTENSION_NAME = "XR_KHR_vulkan_enable"