{-# language CPP #-}
-- | = Name
--
-- XR_KHR_vulkan_enable2 - instance extension
--
-- = Specification
--
-- See
-- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_KHR_vulkan_enable2  XR_KHR_vulkan_enable2>
-- in the main specification for complete information.
--
-- = Registered Extension Number
--
-- 91
--
-- = Revision
--
-- 1
--
-- = Extension and Version Dependencies
--
-- -   Requires OpenXR 1.0
--
-- = See Also
--
-- 'GraphicsBindingVulkan2KHR', 'GraphicsRequirementsVulkan2KHR',
-- 'SwapchainImageVulkan2KHR', 'VulkanDeviceCreateInfoKHR',
-- 'VulkanGraphicsDeviceGetInfoKHR', 'VulkanInstanceCreateInfoKHR',
-- 'createVulkanDeviceKHR', 'createVulkanInstanceKHR',
-- 'getVulkanGraphicsDevice2KHR', 'getVulkanGraphicsRequirements2KHR'
--
-- = Document Notes
--
-- For more information, see the
-- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_KHR_vulkan_enable2 OpenXR Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module OpenXR.Extensions.XR_KHR_vulkan_enable2  ( createVulkanInstanceKHR
                                                , createVulkanDeviceKHR
                                                , getVulkanGraphicsDevice2KHR
                                                , pattern TYPE_GRAPHICS_BINDING_VULKAN2_KHR
                                                , pattern TYPE_SWAPCHAIN_IMAGE_VULKAN2_KHR
                                                , pattern TYPE_GRAPHICS_REQUIREMENTS_VULKAN2_KHR
                                                , getVulkanGraphicsRequirements2KHR
                                                , VulkanInstanceCreateInfoKHR(..)
                                                , VulkanDeviceCreateInfoKHR(..)
                                                , VulkanGraphicsDeviceGetInfoKHR(..)
                                                , VulkanInstanceCreateFlagsKHR(..)
                                                , VulkanDeviceCreateFlagsKHR(..)
                                                , GraphicsBindingVulkan2KHR
                                                , SwapchainImageVulkan2KHR
                                                , GraphicsRequirementsVulkan2KHR
                                                , KHR_vulkan_enable2_SPEC_VERSION
                                                , pattern KHR_vulkan_enable2_SPEC_VERSION
                                                , KHR_VULKAN_ENABLE2_EXTENSION_NAME
                                                , pattern KHR_VULKAN_ENABLE2_EXTENSION_NAME
                                                , GraphicsBindingVulkanKHR(..)
                                                , SwapchainImageVulkanKHR(..)
                                                , GraphicsRequirementsVulkanKHR(..)
                                                , getVulkanGraphicsRequirementsKHR
                                                ) where

import OpenXR.Internal.Utils (enumReadPrec)
import OpenXR.Internal.Utils (enumShowsPrec)
import OpenXR.Internal.Utils (traceAroundEvent)
import qualified OpenXR.VulkanTypes (AllocationCallbacks)
import qualified OpenXR.VulkanTypes (DeviceCreateInfo)
import qualified OpenXR.VulkanTypes (Device_T)
import qualified OpenXR.VulkanTypes (InstanceCreateInfo)
import qualified OpenXR.VulkanTypes (Instance_T)
import qualified OpenXR.VulkanTypes (PFN_vkGetInstanceProcAddr)
import qualified OpenXR.VulkanTypes (PhysicalDevice_T)
import qualified OpenXR.VulkanTypes (Result)
import qualified OpenXR.VulkanTypes (SomeStruct)
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 GHC.Show (showString)
import Numeric (showHex)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import OpenXR.CStruct (FromCStruct)
import OpenXR.CStruct (FromCStruct(..))
import OpenXR.CStruct (ToCStruct)
import OpenXR.CStruct (ToCStruct(..))
import qualified OpenXR.VulkanTypes (Result(..))
import OpenXR.Zero (Zero)
import OpenXR.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Data.String (IsString)
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 OpenXR.Extensions.XR_KHR_vulkan_enable (getVulkanGraphicsRequirementsKHR)
import OpenXR.NamedType ((:::))
import OpenXR.Core10.FundamentalTypes (Flags64)
import OpenXR.Extensions.XR_KHR_vulkan_enable (GraphicsBindingVulkanKHR)
import OpenXR.Extensions.XR_KHR_vulkan_enable (GraphicsRequirementsVulkanKHR)
import OpenXR.Core10.Handles (Instance)
import OpenXR.Core10.Handles (Instance(..))
import OpenXR.Dynamic (InstanceCmds(pXrCreateVulkanDeviceKHR))
import OpenXR.Dynamic (InstanceCmds(pXrCreateVulkanInstanceKHR))
import OpenXR.Dynamic (InstanceCmds(pXrGetVulkanGraphicsDevice2KHR))
import OpenXR.Core10.Handles (Instance_T)
import OpenXR.Exception (OpenXrException(..))
import OpenXR.Core10.Enums.Result (Result)
import OpenXR.Core10.Enums.Result (Result(..))
import OpenXR.Core10.Enums.StructureType (StructureType)
import OpenXR.Extensions.XR_KHR_vulkan_enable (SwapchainImageVulkanKHR)
import OpenXR.Core10.Device (SystemId)
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))
import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_VULKAN_DEVICE_CREATE_INFO_KHR))
import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_VULKAN_GRAPHICS_DEVICE_GET_INFO_KHR))
import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_VULKAN_INSTANCE_CREATE_INFO_KHR))
import OpenXR.Extensions.XR_KHR_vulkan_enable (getVulkanGraphicsRequirementsKHR)
import OpenXR.Extensions.XR_KHR_vulkan_enable (GraphicsBindingVulkanKHR(..))
import OpenXR.Extensions.XR_KHR_vulkan_enable (GraphicsRequirementsVulkanKHR(..))
import OpenXR.Extensions.XR_KHR_vulkan_enable (SwapchainImageVulkanKHR(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkXrCreateVulkanInstanceKHR
  :: FunPtr (Ptr Instance_T -> Ptr VulkanInstanceCreateInfoKHR -> Ptr (Ptr OpenXR.VulkanTypes.Instance_T) -> Ptr OpenXR.VulkanTypes.Result -> IO Result) -> Ptr Instance_T -> Ptr VulkanInstanceCreateInfoKHR -> Ptr (Ptr OpenXR.VulkanTypes.Instance_T) -> Ptr OpenXR.VulkanTypes.Result -> IO Result

-- | xrCreateVulkanInstanceKHR - Create an OpenXR compatible VkInstance
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-xrCreateVulkanInstanceKHR-extension-notenabled# The @@
--     extension /must/ be enabled prior to calling
--     'createVulkanInstanceKHR'
--
-- -   #VUID-xrCreateVulkanInstanceKHR-instance-parameter# @instance@
--     /must/ be a valid 'OpenXR.Core10.Handles.Instance' handle
--
-- -   #VUID-xrCreateVulkanInstanceKHR-createInfo-parameter# @createInfo@
--     /must/ be a pointer to a valid 'VulkanInstanceCreateInfoKHR'
--     structure
--
-- -   #VUID-xrCreateVulkanInstanceKHR-vulkanInstance-parameter#
--     @vulkanInstance@ /must/ be a pointer to a @VkInstance@ value
--
-- -   #VUID-xrCreateVulkanInstanceKHR-vulkanResult-parameter#
--     @vulkanResult@ /must/ be a pointer to a @VkResult@ value
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-successcodes Success>]
--
--     -   'OpenXR.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-errorcodes Failure>]
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_INSTANCE_LOST'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_RUNTIME_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_HANDLE_INVALID'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_SYSTEM_INVALID'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_VALIDATION_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_FUNCTION_UNSUPPORTED'
--
-- = See Also
--
-- 'OpenXR.Core10.Handles.Instance', 'VulkanInstanceCreateInfoKHR',
-- 'createVulkanDeviceKHR'
createVulkanInstanceKHR :: forall io
                         . (MonadIO io)
                        => -- | @instance@ is an 'OpenXR.Core10.Handles.Instance' handle previously
                           -- created with 'OpenXR.Core10.Instance.createInstance'.
                           Instance
                        -> -- | @createInfo@ extensible input struct of type
                           -- @XrCreateVulkanInstanceCreateInfoKHR@
                           VulkanInstanceCreateInfoKHR
                        -> io (("vulkanInstance" ::: Ptr OpenXR.VulkanTypes.Instance_T), ("vulkanResult" ::: OpenXR.VulkanTypes.Result))
createVulkanInstanceKHR :: Instance
-> VulkanInstanceCreateInfoKHR
-> io
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
createVulkanInstanceKHR instance' :: Instance
instance' createInfo :: VulkanInstanceCreateInfoKHR
createInfo = IO ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
-> io
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO
   ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
 -> io
      ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
-> (ContT
      ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
      IO
      ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
    -> IO
         ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     IO
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
-> io
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
  ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
  IO
  ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
-> IO
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
   ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
   IO
   ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
 -> io
      ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     IO
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
-> io
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
forall a b. (a -> b) -> a -> b
$ do
  let xrCreateVulkanInstanceKHRPtr :: FunPtr
  (Ptr Instance_T
   -> Ptr VulkanInstanceCreateInfoKHR
   -> ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
   -> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
   -> IO Result)
xrCreateVulkanInstanceKHRPtr = InstanceCmds
-> FunPtr
     (Ptr Instance_T
      -> Ptr VulkanInstanceCreateInfoKHR
      -> ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
      -> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
      -> IO Result)
pXrCreateVulkanInstanceKHR (Instance -> InstanceCmds
instanceCmds (Instance
instance' :: Instance))
  IO ()
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     IO
     ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
 -> ContT
      ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
      IO
      ())
-> IO ()
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     IO
     ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Instance_T
   -> Ptr VulkanInstanceCreateInfoKHR
   -> ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
   -> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
   -> IO Result)
xrCreateVulkanInstanceKHRPtr FunPtr
  (Ptr Instance_T
   -> Ptr VulkanInstanceCreateInfoKHR
   -> ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
   -> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
   -> IO Result)
-> FunPtr
     (Ptr Instance_T
      -> Ptr VulkanInstanceCreateInfoKHR
      -> ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
      -> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Instance_T
   -> Ptr VulkanInstanceCreateInfoKHR
   -> ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
   -> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
   -> 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 xrCreateVulkanInstanceKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let xrCreateVulkanInstanceKHR' :: Ptr Instance_T
-> Ptr VulkanInstanceCreateInfoKHR
-> ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
-> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
-> IO Result
xrCreateVulkanInstanceKHR' = FunPtr
  (Ptr Instance_T
   -> Ptr VulkanInstanceCreateInfoKHR
   -> ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
   -> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
   -> IO Result)
-> Ptr Instance_T
-> Ptr VulkanInstanceCreateInfoKHR
-> ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
-> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
-> IO Result
mkXrCreateVulkanInstanceKHR FunPtr
  (Ptr Instance_T
   -> Ptr VulkanInstanceCreateInfoKHR
   -> ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
   -> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
   -> IO Result)
xrCreateVulkanInstanceKHRPtr
  Ptr VulkanInstanceCreateInfoKHR
createInfo' <- ((Ptr VulkanInstanceCreateInfoKHR
  -> IO
       ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
 -> IO
      ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     IO
     (Ptr VulkanInstanceCreateInfoKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr VulkanInstanceCreateInfoKHR
   -> IO
        ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
  -> IO
       ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
 -> ContT
      ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
      IO
      (Ptr VulkanInstanceCreateInfoKHR))
-> ((Ptr VulkanInstanceCreateInfoKHR
     -> IO
          ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
    -> IO
         ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     IO
     (Ptr VulkanInstanceCreateInfoKHR)
forall a b. (a -> b) -> a -> b
$ VulkanInstanceCreateInfoKHR
-> (Ptr VulkanInstanceCreateInfoKHR
    -> IO
         ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
-> IO
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (VulkanInstanceCreateInfoKHR
createInfo)
  "vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T)
pVulkanInstance <- ((("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
  -> IO
       ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
 -> IO
      ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     IO
     ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
   -> IO
        ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
  -> IO
       ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
 -> ContT
      ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
      IO
      ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T)))
-> ((("vulkanInstance"
      ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
     -> IO
          ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
    -> IO
         ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     IO
     ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
forall a b. (a -> b) -> a -> b
$ IO ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
-> (("vulkanInstance"
     ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
    -> IO ())
-> (("vulkanInstance"
     ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
    -> IO
         ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
-> IO
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int
-> IO
     ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
forall a. Int -> IO (Ptr a)
callocBytes @(Ptr OpenXR.VulkanTypes.Instance_T) 8) ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
-> IO ()
forall a. Ptr a -> IO ()
free
  "vulkanResult" ::: Ptr ("vulkanResult" ::: Result)
pVulkanResult <- ((("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
  -> IO
       ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
 -> IO
      ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     IO
     ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
   -> IO
        ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
  -> IO
       ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
 -> ContT
      ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
      IO
      ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result)))
-> ((("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
     -> IO
          ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
    -> IO
         ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     IO
     ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
forall a b. (a -> b) -> a -> b
$ IO ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
-> (("vulkanResult" ::: Ptr ("vulkanResult" ::: Result)) -> IO ())
-> (("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
    -> IO
         ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
-> IO
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
forall a. Int -> IO (Ptr a)
callocBytes @OpenXR.VulkanTypes.Result 4) ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result)) -> IO ()
forall a. Ptr a -> IO ()
free
  Result
r <- IO Result
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     IO
     Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
 -> ContT
      ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
      IO
      Result)
-> IO Result
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     IO
     Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrCreateVulkanInstanceKHR" (Ptr Instance_T
-> Ptr VulkanInstanceCreateInfoKHR
-> ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
-> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
-> IO Result
xrCreateVulkanInstanceKHR' (Instance -> Ptr Instance_T
instanceHandle (Instance
instance')) Ptr VulkanInstanceCreateInfoKHR
createInfo' ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T)
pVulkanInstance) ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result)
pVulkanResult))
  IO ()
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     IO
     ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
 -> ContT
      ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
      IO
      ())
-> IO ()
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     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))
  "vulkanInstance" ::: Ptr Instance_T
vulkanInstance <- IO ("vulkanInstance" ::: Ptr Instance_T)
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     IO
     ("vulkanInstance" ::: Ptr Instance_T)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("vulkanInstance" ::: Ptr Instance_T)
 -> ContT
      ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
      IO
      ("vulkanInstance" ::: Ptr Instance_T))
-> IO ("vulkanInstance" ::: Ptr Instance_T)
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     IO
     ("vulkanInstance" ::: Ptr Instance_T)
forall a b. (a -> b) -> a -> b
$ ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
-> IO ("vulkanInstance" ::: Ptr Instance_T)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr OpenXR.VulkanTypes.Instance_T) "vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T)
pVulkanInstance
  "vulkanResult" ::: Result
vulkanResult <- IO ("vulkanResult" ::: Result)
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     IO
     ("vulkanResult" ::: Result)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("vulkanResult" ::: Result)
 -> ContT
      ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
      IO
      ("vulkanResult" ::: Result))
-> IO ("vulkanResult" ::: Result)
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     IO
     ("vulkanResult" ::: Result)
forall a b. (a -> b) -> a -> b
$ ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
-> IO ("vulkanResult" ::: Result)
forall a. Storable a => Ptr a -> IO a
peek @OpenXR.VulkanTypes.Result "vulkanResult" ::: Ptr ("vulkanResult" ::: Result)
pVulkanResult
  ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     IO
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
 -> ContT
      ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
      IO
      ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result))
-> ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
-> ContT
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
     IO
     ("vulkanInstance" ::: Ptr Instance_T, "vulkanResult" ::: Result)
forall a b. (a -> b) -> a -> b
$ ("vulkanInstance" ::: Ptr Instance_T
vulkanInstance, "vulkanResult" ::: Result
vulkanResult)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkXrCreateVulkanDeviceKHR
  :: FunPtr (Ptr Instance_T -> Ptr VulkanDeviceCreateInfoKHR -> Ptr (Ptr OpenXR.VulkanTypes.Device_T) -> Ptr OpenXR.VulkanTypes.Result -> IO Result) -> Ptr Instance_T -> Ptr VulkanDeviceCreateInfoKHR -> Ptr (Ptr OpenXR.VulkanTypes.Device_T) -> Ptr OpenXR.VulkanTypes.Result -> IO Result

-- | xrCreateVulkanDeviceKHR - Create an OpenXR compatible VkDevice
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-xrCreateVulkanDeviceKHR-extension-notenabled# The @@ extension
--     /must/ be enabled prior to calling 'createVulkanDeviceKHR'
--
-- -   #VUID-xrCreateVulkanDeviceKHR-instance-parameter# @instance@ /must/
--     be a valid 'OpenXR.Core10.Handles.Instance' handle
--
-- -   #VUID-xrCreateVulkanDeviceKHR-createInfo-parameter# @createInfo@
--     /must/ be a pointer to a valid 'VulkanDeviceCreateInfoKHR' structure
--
-- -   #VUID-xrCreateVulkanDeviceKHR-vulkanDevice-parameter# @vulkanDevice@
--     /must/ be a pointer to a @VkDevice@ value
--
-- -   #VUID-xrCreateVulkanDeviceKHR-vulkanResult-parameter# @vulkanResult@
--     /must/ be a pointer to a @VkResult@ value
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-successcodes Success>]
--
--     -   'OpenXR.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-errorcodes Failure>]
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_INSTANCE_LOST'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_RUNTIME_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_HANDLE_INVALID'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_SYSTEM_INVALID'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_VALIDATION_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_FUNCTION_UNSUPPORTED'
--
-- = See Also
--
-- 'OpenXR.Core10.Handles.Instance', 'VulkanDeviceCreateInfoKHR',
-- 'createVulkanInstanceKHR'
createVulkanDeviceKHR :: forall io
                       . (MonadIO io)
                      => -- | @instance@ is an 'OpenXR.Core10.Handles.Instance' handle previously
                         -- created with 'OpenXR.Core10.Instance.createInstance'.
                         Instance
                      -> -- | @createInfo@ extensible input struct of type
                         -- @XrCreateVulkanDeviceCreateInfoKHR@
                         VulkanDeviceCreateInfoKHR
                      -> io (("vulkanDevice" ::: Ptr OpenXR.VulkanTypes.Device_T), ("vulkanResult" ::: OpenXR.VulkanTypes.Result))
createVulkanDeviceKHR :: Instance
-> VulkanDeviceCreateInfoKHR
-> io ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
createVulkanDeviceKHR instance' :: Instance
instance' createInfo :: VulkanDeviceCreateInfoKHR
createInfo = IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
-> io ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
 -> io ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
-> (ContT
      ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
      IO
      ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
    -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
     IO
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
-> io ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
  ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
  IO
  ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
-> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
   ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
   IO
   ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
 -> io ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
     IO
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
-> io ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
forall a b. (a -> b) -> a -> b
$ do
  let xrCreateVulkanDeviceKHRPtr :: FunPtr
  (Ptr Instance_T
   -> Ptr VulkanDeviceCreateInfoKHR
   -> ("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
   -> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
   -> IO Result)
xrCreateVulkanDeviceKHRPtr = InstanceCmds
-> FunPtr
     (Ptr Instance_T
      -> Ptr VulkanDeviceCreateInfoKHR
      -> ("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
      -> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
      -> IO Result)
pXrCreateVulkanDeviceKHR (Instance -> InstanceCmds
instanceCmds (Instance
instance' :: Instance))
  IO ()
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
 -> ContT
      ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result) IO ())
-> IO ()
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Instance_T
   -> Ptr VulkanDeviceCreateInfoKHR
   -> ("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
   -> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
   -> IO Result)
xrCreateVulkanDeviceKHRPtr FunPtr
  (Ptr Instance_T
   -> Ptr VulkanDeviceCreateInfoKHR
   -> ("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
   -> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
   -> IO Result)
-> FunPtr
     (Ptr Instance_T
      -> Ptr VulkanDeviceCreateInfoKHR
      -> ("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
      -> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Instance_T
   -> Ptr VulkanDeviceCreateInfoKHR
   -> ("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
   -> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
   -> 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 xrCreateVulkanDeviceKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let xrCreateVulkanDeviceKHR' :: Ptr Instance_T
-> Ptr VulkanDeviceCreateInfoKHR
-> ("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
-> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
-> IO Result
xrCreateVulkanDeviceKHR' = FunPtr
  (Ptr Instance_T
   -> Ptr VulkanDeviceCreateInfoKHR
   -> ("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
   -> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
   -> IO Result)
-> Ptr Instance_T
-> Ptr VulkanDeviceCreateInfoKHR
-> ("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
-> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
-> IO Result
mkXrCreateVulkanDeviceKHR FunPtr
  (Ptr Instance_T
   -> Ptr VulkanDeviceCreateInfoKHR
   -> ("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
   -> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
   -> IO Result)
xrCreateVulkanDeviceKHRPtr
  Ptr VulkanDeviceCreateInfoKHR
createInfo' <- ((Ptr VulkanDeviceCreateInfoKHR
  -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
 -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
     IO
     (Ptr VulkanDeviceCreateInfoKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr VulkanDeviceCreateInfoKHR
   -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
  -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
 -> ContT
      ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
      IO
      (Ptr VulkanDeviceCreateInfoKHR))
-> ((Ptr VulkanDeviceCreateInfoKHR
     -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
    -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
     IO
     (Ptr VulkanDeviceCreateInfoKHR)
forall a b. (a -> b) -> a -> b
$ VulkanDeviceCreateInfoKHR
-> (Ptr VulkanDeviceCreateInfoKHR
    -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
-> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (VulkanDeviceCreateInfoKHR
createInfo)
  "vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T)
pVulkanDevice <- ((("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
  -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
 -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
     IO
     ("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
   -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
  -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
 -> ContT
      ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
      IO
      ("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T)))
-> ((("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
     -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
    -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
     IO
     ("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
forall a b. (a -> b) -> a -> b
$ IO ("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
-> (("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
    -> IO ())
-> (("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
    -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
-> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int
-> IO ("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
forall a. Int -> IO (Ptr a)
callocBytes @(Ptr OpenXR.VulkanTypes.Device_T) 8) ("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T)) -> IO ()
forall a. Ptr a -> IO ()
free
  "vulkanResult" ::: Ptr ("vulkanResult" ::: Result)
pVulkanResult <- ((("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
  -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
 -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
     IO
     ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
   -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
  -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
 -> ContT
      ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
      IO
      ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result)))
-> ((("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
     -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
    -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
     IO
     ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
forall a b. (a -> b) -> a -> b
$ IO ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
-> (("vulkanResult" ::: Ptr ("vulkanResult" ::: Result)) -> IO ())
-> (("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
    -> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
-> IO ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
forall a. Int -> IO (Ptr a)
callocBytes @OpenXR.VulkanTypes.Result 4) ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result)) -> IO ()
forall a. Ptr a -> IO ()
free
  Result
r <- IO Result
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
     IO
     Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
 -> ContT
      ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
      IO
      Result)
-> IO Result
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
     IO
     Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrCreateVulkanDeviceKHR" (Ptr Instance_T
-> Ptr VulkanDeviceCreateInfoKHR
-> ("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
-> ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
-> IO Result
xrCreateVulkanDeviceKHR' (Instance -> Ptr Instance_T
instanceHandle (Instance
instance')) Ptr VulkanDeviceCreateInfoKHR
createInfo' ("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T)
pVulkanDevice) ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result)
pVulkanResult))
  IO ()
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
 -> ContT
      ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result) IO ())
-> IO ()
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result) 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))
  "vulkanDevice" ::: Ptr Device_T
vulkanDevice <- IO ("vulkanDevice" ::: Ptr Device_T)
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
     IO
     ("vulkanDevice" ::: Ptr Device_T)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("vulkanDevice" ::: Ptr Device_T)
 -> ContT
      ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
      IO
      ("vulkanDevice" ::: Ptr Device_T))
-> IO ("vulkanDevice" ::: Ptr Device_T)
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
     IO
     ("vulkanDevice" ::: Ptr Device_T)
forall a b. (a -> b) -> a -> b
$ ("vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T))
-> IO ("vulkanDevice" ::: Ptr Device_T)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr OpenXR.VulkanTypes.Device_T) "vulkanDevice" ::: Ptr ("vulkanDevice" ::: Ptr Device_T)
pVulkanDevice
  "vulkanResult" ::: Result
vulkanResult <- IO ("vulkanResult" ::: Result)
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
     IO
     ("vulkanResult" ::: Result)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("vulkanResult" ::: Result)
 -> ContT
      ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
      IO
      ("vulkanResult" ::: Result))
-> IO ("vulkanResult" ::: Result)
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
     IO
     ("vulkanResult" ::: Result)
forall a b. (a -> b) -> a -> b
$ ("vulkanResult" ::: Ptr ("vulkanResult" ::: Result))
-> IO ("vulkanResult" ::: Result)
forall a. Storable a => Ptr a -> IO a
peek @OpenXR.VulkanTypes.Result "vulkanResult" ::: Ptr ("vulkanResult" ::: Result)
pVulkanResult
  ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
     IO
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
 -> ContT
      ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
      IO
      ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result))
-> ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
-> ContT
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
     IO
     ("vulkanDevice" ::: Ptr Device_T, "vulkanResult" ::: Result)
forall a b. (a -> b) -> a -> b
$ ("vulkanDevice" ::: Ptr Device_T
vulkanDevice, "vulkanResult" ::: Result
vulkanResult)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkXrGetVulkanGraphicsDevice2KHR
  :: FunPtr (Ptr Instance_T -> Ptr VulkanGraphicsDeviceGetInfoKHR -> Ptr (Ptr OpenXR.VulkanTypes.PhysicalDevice_T) -> IO Result) -> Ptr Instance_T -> Ptr VulkanGraphicsDeviceGetInfoKHR -> Ptr (Ptr OpenXR.VulkanTypes.PhysicalDevice_T) -> IO Result

-- | xrGetVulkanGraphicsDevice2KHR - Retrieve the Vulkan physical device
-- associated with an OpenXR instance and system
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-xrGetVulkanGraphicsDevice2KHR-extension-notenabled# The @@
--     extension /must/ be enabled prior to calling
--     'getVulkanGraphicsDevice2KHR'
--
-- -   #VUID-xrGetVulkanGraphicsDevice2KHR-instance-parameter# @instance@
--     /must/ be a valid 'OpenXR.Core10.Handles.Instance' handle
--
-- -   #VUID-xrGetVulkanGraphicsDevice2KHR-getInfo-parameter# @getInfo@
--     /must/ be a pointer to a valid 'VulkanGraphicsDeviceGetInfoKHR'
--     structure
--
-- -   #VUID-xrGetVulkanGraphicsDevice2KHR-vulkanPhysicalDevice-parameter#
--     @vulkanPhysicalDevice@ /must/ be a pointer to a @VkPhysicalDevice@
--     value
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-successcodes Success>]
--
--     -   'OpenXR.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-errorcodes Failure>]
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_HANDLE_INVALID'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_INSTANCE_LOST'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_RUNTIME_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_SYSTEM_INVALID'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_VALIDATION_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_FUNCTION_UNSUPPORTED'
--
-- = See Also
--
-- 'OpenXR.Core10.Handles.Instance', 'VulkanGraphicsDeviceGetInfoKHR'
getVulkanGraphicsDevice2KHR :: forall io
                             . (MonadIO io)
                            => -- | @instance@ is an 'OpenXR.Core10.Handles.Instance' handle previously
                               -- created with 'OpenXR.Core10.Instance.createInstance'.
                               Instance
                            -> -- | @getInfo@ extensible input struct of type
                               -- 'VulkanGraphicsDeviceGetInfoKHR'
                               VulkanGraphicsDeviceGetInfoKHR
                            -> io (("vulkanPhysicalDevice" ::: Ptr OpenXR.VulkanTypes.PhysicalDevice_T))
getVulkanGraphicsDevice2KHR :: Instance
-> VulkanGraphicsDeviceGetInfoKHR
-> io ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
getVulkanGraphicsDevice2KHR instance' :: Instance
instance' getInfo :: VulkanGraphicsDeviceGetInfoKHR
getInfo = IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> io ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
 -> io ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> (ContT
      ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
      IO
      ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
    -> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> ContT
     ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
     IO
     ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> io ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
  ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
  IO
  ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
   ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
   IO
   ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
 -> io ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> ContT
     ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
     IO
     ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> io ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall a b. (a -> b) -> a -> b
$ do
  let xrGetVulkanGraphicsDevice2KHRPtr :: FunPtr
  (Ptr Instance_T
   -> Ptr VulkanGraphicsDeviceGetInfoKHR
   -> ("vulkanPhysicalDevice"
       ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
   -> IO Result)
xrGetVulkanGraphicsDevice2KHRPtr = InstanceCmds
-> FunPtr
     (Ptr Instance_T
      -> Ptr VulkanGraphicsDeviceGetInfoKHR
      -> ("vulkanPhysicalDevice"
          ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
      -> IO Result)
pXrGetVulkanGraphicsDevice2KHR (Instance -> InstanceCmds
instanceCmds (Instance
instance' :: Instance))
  IO ()
-> ContT ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
 -> ContT ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T) IO ())
-> IO ()
-> ContT ("vulkanPhysicalDevice" ::: 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
   -> Ptr VulkanGraphicsDeviceGetInfoKHR
   -> ("vulkanPhysicalDevice"
       ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
   -> IO Result)
xrGetVulkanGraphicsDevice2KHRPtr FunPtr
  (Ptr Instance_T
   -> Ptr VulkanGraphicsDeviceGetInfoKHR
   -> ("vulkanPhysicalDevice"
       ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
   -> IO Result)
-> FunPtr
     (Ptr Instance_T
      -> Ptr VulkanGraphicsDeviceGetInfoKHR
      -> ("vulkanPhysicalDevice"
          ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Instance_T
   -> Ptr VulkanGraphicsDeviceGetInfoKHR
   -> ("vulkanPhysicalDevice"
       ::: Ptr ("vulkanPhysicalDevice" ::: 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 xrGetVulkanGraphicsDevice2KHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let xrGetVulkanGraphicsDevice2KHR' :: Ptr Instance_T
-> Ptr VulkanGraphicsDeviceGetInfoKHR
-> ("vulkanPhysicalDevice"
    ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO Result
xrGetVulkanGraphicsDevice2KHR' = FunPtr
  (Ptr Instance_T
   -> Ptr VulkanGraphicsDeviceGetInfoKHR
   -> ("vulkanPhysicalDevice"
       ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
   -> IO Result)
-> Ptr Instance_T
-> Ptr VulkanGraphicsDeviceGetInfoKHR
-> ("vulkanPhysicalDevice"
    ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO Result
mkXrGetVulkanGraphicsDevice2KHR FunPtr
  (Ptr Instance_T
   -> Ptr VulkanGraphicsDeviceGetInfoKHR
   -> ("vulkanPhysicalDevice"
       ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
   -> IO Result)
xrGetVulkanGraphicsDevice2KHRPtr
  Ptr VulkanGraphicsDeviceGetInfoKHR
getInfo' <- ((Ptr VulkanGraphicsDeviceGetInfoKHR
  -> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
 -> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> ContT
     ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
     IO
     (Ptr VulkanGraphicsDeviceGetInfoKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr VulkanGraphicsDeviceGetInfoKHR
   -> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
  -> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
 -> ContT
      ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
      IO
      (Ptr VulkanGraphicsDeviceGetInfoKHR))
-> ((Ptr VulkanGraphicsDeviceGetInfoKHR
     -> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
    -> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> ContT
     ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
     IO
     (Ptr VulkanGraphicsDeviceGetInfoKHR)
forall a b. (a -> b) -> a -> b
$ VulkanGraphicsDeviceGetInfoKHR
-> (Ptr VulkanGraphicsDeviceGetInfoKHR
    -> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (VulkanGraphicsDeviceGetInfoKHR
getInfo)
  "vulkanPhysicalDevice"
::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
pVulkanPhysicalDevice <- ((("vulkanPhysicalDevice"
   ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
  -> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
 -> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> ContT
     ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
     IO
     ("vulkanPhysicalDevice"
      ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("vulkanPhysicalDevice"
    ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
   -> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
  -> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
 -> ContT
      ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
      IO
      ("vulkanPhysicalDevice"
       ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)))
-> ((("vulkanPhysicalDevice"
      ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
     -> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
    -> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> ContT
     ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
     IO
     ("vulkanPhysicalDevice"
      ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
forall a b. (a -> b) -> a -> b
$ IO
  ("vulkanPhysicalDevice"
   ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> (("vulkanPhysicalDevice"
     ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
    -> IO ())
-> (("vulkanPhysicalDevice"
     ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
    -> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int
-> IO
     ("vulkanPhysicalDevice"
      ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
forall a. Int -> IO (Ptr a)
callocBytes @(Ptr OpenXR.VulkanTypes.PhysicalDevice_T) 8) ("vulkanPhysicalDevice"
 ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO ()
forall a. Ptr a -> IO ()
free
  Result
r <- IO Result
-> ContT
     ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
 -> ContT
      ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T) IO Result)
-> IO Result
-> ContT
     ("vulkanPhysicalDevice" ::: 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 "xrGetVulkanGraphicsDevice2KHR" (Ptr Instance_T
-> Ptr VulkanGraphicsDeviceGetInfoKHR
-> ("vulkanPhysicalDevice"
    ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO Result
xrGetVulkanGraphicsDevice2KHR' (Instance -> Ptr Instance_T
instanceHandle (Instance
instance')) Ptr VulkanGraphicsDeviceGetInfoKHR
getInfo' ("vulkanPhysicalDevice"
::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
pVulkanPhysicalDevice))
  IO ()
-> ContT ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
 -> ContT ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T) IO ())
-> IO ()
-> ContT ("vulkanPhysicalDevice" ::: 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))
  "vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T
vulkanPhysicalDevice <- IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> ContT
     ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
     IO
     ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
 -> ContT
      ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
      IO
      ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> ContT
     ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
     IO
     ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall a b. (a -> b) -> a -> b
$ ("vulkanPhysicalDevice"
 ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr OpenXR.VulkanTypes.PhysicalDevice_T) "vulkanPhysicalDevice"
::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
pVulkanPhysicalDevice
  ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> ContT
     ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
     IO
     ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
 -> ContT
      ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
      IO
      ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> ContT
     ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
     IO
     ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall a b. (a -> b) -> a -> b
$ ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T
vulkanPhysicalDevice)


-- No documentation found for TopLevel "XR_TYPE_GRAPHICS_BINDING_VULKAN2_KHR"
pattern $bTYPE_GRAPHICS_BINDING_VULKAN2_KHR :: StructureType
$mTYPE_GRAPHICS_BINDING_VULKAN2_KHR :: forall r. StructureType -> (Void# -> r) -> (Void# -> r) -> r
TYPE_GRAPHICS_BINDING_VULKAN2_KHR = TYPE_GRAPHICS_BINDING_VULKAN_KHR


-- No documentation found for TopLevel "XR_TYPE_SWAPCHAIN_IMAGE_VULKAN2_KHR"
pattern $bTYPE_SWAPCHAIN_IMAGE_VULKAN2_KHR :: StructureType
$mTYPE_SWAPCHAIN_IMAGE_VULKAN2_KHR :: forall r. StructureType -> (Void# -> r) -> (Void# -> r) -> r
TYPE_SWAPCHAIN_IMAGE_VULKAN2_KHR = TYPE_SWAPCHAIN_IMAGE_VULKAN_KHR


-- No documentation found for TopLevel "XR_TYPE_GRAPHICS_REQUIREMENTS_VULKAN2_KHR"
pattern $bTYPE_GRAPHICS_REQUIREMENTS_VULKAN2_KHR :: StructureType
$mTYPE_GRAPHICS_REQUIREMENTS_VULKAN2_KHR :: forall r. StructureType -> (Void# -> r) -> (Void# -> r) -> r
TYPE_GRAPHICS_REQUIREMENTS_VULKAN2_KHR = TYPE_GRAPHICS_REQUIREMENTS_VULKAN_KHR


-- | xrGetVulkanGraphicsRequirements2KHR - Retrieve the Vulkan version
-- requirements for an instance and system
--
-- = Parameters
--
-- The
-- 'OpenXR.Extensions.XR_KHR_vulkan_enable.getVulkanGraphicsRequirementsKHR'
-- function identifies to the application the runtime’s minimum Vulkan
-- version requirement and the highest known tested Vulkan version.
-- 'OpenXR.Extensions.XR_KHR_vulkan_enable.getVulkanGraphicsRequirementsKHR'
-- /must/ be called prior to calling 'OpenXR.Core10.Device.createSession'.
-- The runtime /must/ return
-- 'OpenXR.Core10.Enums.Result.ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING' on
-- calls to 'OpenXR.Core10.Device.createSession' if
-- 'getVulkanGraphicsRequirements2KHR' has not been called for the same
-- @instance@ and @systemId@.
--
-- == Parameter Descriptions
--
-- -   @instance@ is an 'OpenXR.Core10.Handles.Instance' handle previously
--     created with 'OpenXR.Core10.Instance.createInstance'.
--
-- -   @systemId@ is an
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId >
--     handle for the system which will be used to create a session.
--
-- -   @graphicsRequirements@ is the 'GraphicsRequirementsVulkan2KHR'
--     output structure.
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-xrGetVulkanGraphicsRequirements2KHR-extension-notenabled# The
--     @@ extension /must/ be enabled prior to calling
--     'getVulkanGraphicsRequirements2KHR'
--
-- -   #VUID-xrGetVulkanGraphicsRequirements2KHR-instance-parameter#
--     @instance@ /must/ be a valid 'OpenXR.Core10.Handles.Instance' handle
--
-- -   #VUID-xrGetVulkanGraphicsRequirements2KHR-graphicsRequirements-parameter#
--     @graphicsRequirements@ /must/ be a pointer to an
--     'OpenXR.Extensions.XR_KHR_vulkan_enable.GraphicsRequirementsVulkanKHR'
--     structure
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-successcodes Success>]
--
--     -   'OpenXR.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-errorcodes Failure>]
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_HANDLE_INVALID'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_INSTANCE_LOST'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_RUNTIME_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_SYSTEM_INVALID'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_VALIDATION_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_FUNCTION_UNSUPPORTED'
--
-- = See Also
--
-- 'GraphicsRequirementsVulkan2KHR',
-- 'OpenXR.Extensions.XR_KHR_vulkan_enable.GraphicsRequirementsVulkanKHR',
-- 'OpenXR.Core10.Handles.Instance',
-- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId >
getVulkanGraphicsRequirements2KHR :: Instance -> SystemId -> io GraphicsRequirementsVulkanKHR
getVulkanGraphicsRequirements2KHR = Instance -> SystemId -> io GraphicsRequirementsVulkanKHR
forall (io :: * -> *).
MonadIO io =>
Instance -> SystemId -> io GraphicsRequirementsVulkanKHR
getVulkanGraphicsRequirementsKHR


-- | XrVulkanInstanceCreateInfoKHR - Vulkan Instance Create Info
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-XrVulkanInstanceCreateInfoKHR-extension-notenabled# The @@
--     extension /must/ be enabled prior to using
--     'VulkanInstanceCreateInfoKHR'
--
-- -   #VUID-XrVulkanInstanceCreateInfoKHR-type-type# @type@ /must/ be
--     'OpenXR.Core10.Enums.StructureType.TYPE_VULKAN_INSTANCE_CREATE_INFO_KHR'
--
-- -   #VUID-XrVulkanInstanceCreateInfoKHR-next-next# @next@ /must/ be
--     @NULL@ or a valid pointer to the
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#valid-usage-for-structure-pointer-chains next structure in a structure chain>
--
-- -   #VUID-XrVulkanInstanceCreateInfoKHR-createFlags-zerobitmask#
--     @createFlags@ /must/ be @0@
--
-- -   #VUID-XrVulkanInstanceCreateInfoKHR-pfnGetInstanceProcAddr-parameter#
--     @pfnGetInstanceProcAddr@ /must/ be a valid
--     @PFN_vkGetInstanceProcAddr@ value
--
-- -   #VUID-XrVulkanInstanceCreateInfoKHR-vulkanCreateInfo-parameter#
--     @vulkanCreateInfo@ /must/ be a pointer to a valid
--     @VkInstanceCreateInfo@ value
--
-- -   #VUID-XrVulkanInstanceCreateInfoKHR-vulkanAllocator-parameter#
--     @vulkanAllocator@ /must/ be a pointer to a valid
--     @VkAllocationCallbacks@ value
--
-- = See Also
--
-- 'OpenXR.Core10.Enums.StructureType.StructureType',
-- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId >,
-- 'VulkanInstanceCreateFlagsKHR', 'createVulkanInstanceKHR'
data VulkanInstanceCreateInfoKHR = VulkanInstanceCreateInfoKHR
  { -- | @systemId@ is an
    -- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId >
    -- handle for the system which will be used to create a session.
    VulkanInstanceCreateInfoKHR -> SystemId
systemId :: SystemId
  , -- No documentation found for Nested "XrVulkanInstanceCreateInfoKHR" "createFlags"
    VulkanInstanceCreateInfoKHR -> VulkanInstanceCreateFlagsKHR
createFlags :: VulkanInstanceCreateFlagsKHR
  , -- | @pfnGetInstanceProcAddr@ is a function pointer to
    -- @vkGetInstanceProcAddr@ or a compatible entry point.
    VulkanInstanceCreateInfoKHR -> PFN_vkGetInstanceProcAddr
pfnGetInstanceProcAddr :: OpenXR.VulkanTypes.PFN_vkGetInstanceProcAddr
  , -- | @vulkanCreateInfo@ is the
    -- <{vkRefPageRoot}/VkInstanceCreateInfo.html VkInstanceCreateInfo as specified by Vulkan>.
    VulkanInstanceCreateInfoKHR -> Ptr (SomeStruct InstanceCreateInfo)
vulkanCreateInfo :: Ptr (OpenXR.VulkanTypes.SomeStruct OpenXR.VulkanTypes.InstanceCreateInfo)
  , -- | @vulkanAllocator@ is the
    -- <{vkRefPageRoot}/VkAllocationCallbacks.html VkAllocationCallbacks as specified by Vulkan>.
    VulkanInstanceCreateInfoKHR -> Ptr AllocationCallbacks
vulkanAllocator :: Ptr OpenXR.VulkanTypes.AllocationCallbacks
  }
  deriving (Typeable, VulkanInstanceCreateInfoKHR -> VulkanInstanceCreateInfoKHR -> Bool
(VulkanInstanceCreateInfoKHR
 -> VulkanInstanceCreateInfoKHR -> Bool)
-> (VulkanInstanceCreateInfoKHR
    -> VulkanInstanceCreateInfoKHR -> Bool)
-> Eq VulkanInstanceCreateInfoKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VulkanInstanceCreateInfoKHR -> VulkanInstanceCreateInfoKHR -> Bool
$c/= :: VulkanInstanceCreateInfoKHR -> VulkanInstanceCreateInfoKHR -> Bool
== :: VulkanInstanceCreateInfoKHR -> VulkanInstanceCreateInfoKHR -> Bool
$c== :: VulkanInstanceCreateInfoKHR -> VulkanInstanceCreateInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (VulkanInstanceCreateInfoKHR)
#endif
deriving instance Show VulkanInstanceCreateInfoKHR

instance ToCStruct VulkanInstanceCreateInfoKHR where
  withCStruct :: VulkanInstanceCreateInfoKHR
-> (Ptr VulkanInstanceCreateInfoKHR -> IO b) -> IO b
withCStruct x :: VulkanInstanceCreateInfoKHR
x f :: Ptr VulkanInstanceCreateInfoKHR -> IO b
f = Int -> Int -> (Ptr VulkanInstanceCreateInfoKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 56 8 ((Ptr VulkanInstanceCreateInfoKHR -> IO b) -> IO b)
-> (Ptr VulkanInstanceCreateInfoKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr VulkanInstanceCreateInfoKHR
p -> Ptr VulkanInstanceCreateInfoKHR
-> VulkanInstanceCreateInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr VulkanInstanceCreateInfoKHR
p VulkanInstanceCreateInfoKHR
x (Ptr VulkanInstanceCreateInfoKHR -> IO b
f Ptr VulkanInstanceCreateInfoKHR
p)
  pokeCStruct :: Ptr VulkanInstanceCreateInfoKHR
-> VulkanInstanceCreateInfoKHR -> IO b -> IO b
pokeCStruct p :: Ptr VulkanInstanceCreateInfoKHR
p VulkanInstanceCreateInfoKHR{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanInstanceCreateInfoKHR
p Ptr VulkanInstanceCreateInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_VULKAN_INSTANCE_CREATE_INFO_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanInstanceCreateInfoKHR
p Ptr VulkanInstanceCreateInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr SystemId -> SystemId -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanInstanceCreateInfoKHR
p Ptr VulkanInstanceCreateInfoKHR -> Int -> Ptr SystemId
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr SystemId)) (SystemId
systemId)
    Ptr VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanInstanceCreateInfoKHR
p Ptr VulkanInstanceCreateInfoKHR
-> Int -> Ptr VulkanInstanceCreateFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr VulkanInstanceCreateFlagsKHR)) (VulkanInstanceCreateFlagsKHR
createFlags)
    Ptr PFN_vkGetInstanceProcAddr -> PFN_vkGetInstanceProcAddr -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanInstanceCreateInfoKHR
p Ptr VulkanInstanceCreateInfoKHR
-> Int -> Ptr PFN_vkGetInstanceProcAddr
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr OpenXR.VulkanTypes.PFN_vkGetInstanceProcAddr)) (PFN_vkGetInstanceProcAddr
pfnGetInstanceProcAddr)
    Ptr (Ptr (SomeStruct InstanceCreateInfo))
-> Ptr (SomeStruct InstanceCreateInfo) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanInstanceCreateInfoKHR
p Ptr VulkanInstanceCreateInfoKHR
-> Int -> Ptr (Ptr (SomeStruct InstanceCreateInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr (OpenXR.VulkanTypes.SomeStruct OpenXR.VulkanTypes.InstanceCreateInfo)))) (Ptr (SomeStruct InstanceCreateInfo)
vulkanCreateInfo)
    Ptr (Ptr AllocationCallbacks) -> Ptr AllocationCallbacks -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanInstanceCreateInfoKHR
p Ptr VulkanInstanceCreateInfoKHR
-> Int -> Ptr (Ptr AllocationCallbacks)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr (Ptr OpenXR.VulkanTypes.AllocationCallbacks))) (Ptr AllocationCallbacks
vulkanAllocator)
    IO b
f
  cStructSize :: Int
cStructSize = 56
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr VulkanInstanceCreateInfoKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr VulkanInstanceCreateInfoKHR
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanInstanceCreateInfoKHR
p Ptr VulkanInstanceCreateInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_VULKAN_INSTANCE_CREATE_INFO_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanInstanceCreateInfoKHR
p Ptr VulkanInstanceCreateInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr SystemId -> SystemId -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanInstanceCreateInfoKHR
p Ptr VulkanInstanceCreateInfoKHR -> Int -> Ptr SystemId
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr SystemId)) (SystemId
forall a. Zero a => a
zero)
    Ptr VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanInstanceCreateInfoKHR
p Ptr VulkanInstanceCreateInfoKHR
-> Int -> Ptr VulkanInstanceCreateFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr VulkanInstanceCreateFlagsKHR)) (VulkanInstanceCreateFlagsKHR
forall a. Zero a => a
zero)
    Ptr PFN_vkGetInstanceProcAddr -> PFN_vkGetInstanceProcAddr -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanInstanceCreateInfoKHR
p Ptr VulkanInstanceCreateInfoKHR
-> Int -> Ptr PFN_vkGetInstanceProcAddr
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr OpenXR.VulkanTypes.PFN_vkGetInstanceProcAddr)) (PFN_vkGetInstanceProcAddr
forall a. Zero a => a
zero)
    Ptr (Ptr (SomeStruct InstanceCreateInfo))
-> Ptr (SomeStruct InstanceCreateInfo) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanInstanceCreateInfoKHR
p Ptr VulkanInstanceCreateInfoKHR
-> Int -> Ptr (Ptr (SomeStruct InstanceCreateInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr (OpenXR.VulkanTypes.SomeStruct OpenXR.VulkanTypes.InstanceCreateInfo)))) (Ptr (SomeStruct InstanceCreateInfo)
forall a. Zero a => a
zero)
    Ptr (Ptr AllocationCallbacks) -> Ptr AllocationCallbacks -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanInstanceCreateInfoKHR
p Ptr VulkanInstanceCreateInfoKHR
-> Int -> Ptr (Ptr AllocationCallbacks)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr (Ptr OpenXR.VulkanTypes.AllocationCallbacks))) (Ptr AllocationCallbacks
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct VulkanInstanceCreateInfoKHR where
  peekCStruct :: Ptr VulkanInstanceCreateInfoKHR -> IO VulkanInstanceCreateInfoKHR
peekCStruct p :: Ptr VulkanInstanceCreateInfoKHR
p = do
    SystemId
systemId <- Ptr SystemId -> IO SystemId
forall a. Storable a => Ptr a -> IO a
peek @SystemId ((Ptr VulkanInstanceCreateInfoKHR
p Ptr VulkanInstanceCreateInfoKHR -> Int -> Ptr SystemId
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr SystemId))
    VulkanInstanceCreateFlagsKHR
createFlags <- Ptr VulkanInstanceCreateFlagsKHR -> IO VulkanInstanceCreateFlagsKHR
forall a. Storable a => Ptr a -> IO a
peek @VulkanInstanceCreateFlagsKHR ((Ptr VulkanInstanceCreateInfoKHR
p Ptr VulkanInstanceCreateInfoKHR
-> Int -> Ptr VulkanInstanceCreateFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr VulkanInstanceCreateFlagsKHR))
    PFN_vkGetInstanceProcAddr
pfnGetInstanceProcAddr <- Ptr PFN_vkGetInstanceProcAddr -> IO PFN_vkGetInstanceProcAddr
forall a. Storable a => Ptr a -> IO a
peek @OpenXR.VulkanTypes.PFN_vkGetInstanceProcAddr ((Ptr VulkanInstanceCreateInfoKHR
p Ptr VulkanInstanceCreateInfoKHR
-> Int -> Ptr PFN_vkGetInstanceProcAddr
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr OpenXR.VulkanTypes.PFN_vkGetInstanceProcAddr))
    Ptr (SomeStruct InstanceCreateInfo)
vulkanCreateInfo <- Ptr (Ptr (SomeStruct InstanceCreateInfo))
-> IO (Ptr (SomeStruct InstanceCreateInfo))
forall a. Storable a => Ptr a -> IO a
peek @(Ptr (OpenXR.VulkanTypes.SomeStruct OpenXR.VulkanTypes.InstanceCreateInfo)) ((Ptr VulkanInstanceCreateInfoKHR
p Ptr VulkanInstanceCreateInfoKHR
-> Int -> Ptr (Ptr (SomeStruct InstanceCreateInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr (OpenXR.VulkanTypes.SomeStruct OpenXR.VulkanTypes.InstanceCreateInfo))))
    Ptr AllocationCallbacks
vulkanAllocator <- Ptr (Ptr AllocationCallbacks) -> IO (Ptr AllocationCallbacks)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr OpenXR.VulkanTypes.AllocationCallbacks) ((Ptr VulkanInstanceCreateInfoKHR
p Ptr VulkanInstanceCreateInfoKHR
-> Int -> Ptr (Ptr AllocationCallbacks)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr (Ptr OpenXR.VulkanTypes.AllocationCallbacks)))
    VulkanInstanceCreateInfoKHR -> IO VulkanInstanceCreateInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (VulkanInstanceCreateInfoKHR -> IO VulkanInstanceCreateInfoKHR)
-> VulkanInstanceCreateInfoKHR -> IO VulkanInstanceCreateInfoKHR
forall a b. (a -> b) -> a -> b
$ SystemId
-> VulkanInstanceCreateFlagsKHR
-> PFN_vkGetInstanceProcAddr
-> Ptr (SomeStruct InstanceCreateInfo)
-> Ptr AllocationCallbacks
-> VulkanInstanceCreateInfoKHR
VulkanInstanceCreateInfoKHR
             SystemId
systemId VulkanInstanceCreateFlagsKHR
createFlags PFN_vkGetInstanceProcAddr
pfnGetInstanceProcAddr Ptr (SomeStruct InstanceCreateInfo)
vulkanCreateInfo Ptr AllocationCallbacks
vulkanAllocator

instance Storable VulkanInstanceCreateInfoKHR where
  sizeOf :: VulkanInstanceCreateInfoKHR -> Int
sizeOf ~VulkanInstanceCreateInfoKHR
_ = 56
  alignment :: VulkanInstanceCreateInfoKHR -> Int
alignment ~VulkanInstanceCreateInfoKHR
_ = 8
  peek :: Ptr VulkanInstanceCreateInfoKHR -> IO VulkanInstanceCreateInfoKHR
peek = Ptr VulkanInstanceCreateInfoKHR -> IO VulkanInstanceCreateInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr VulkanInstanceCreateInfoKHR
-> VulkanInstanceCreateInfoKHR -> IO ()
poke ptr :: Ptr VulkanInstanceCreateInfoKHR
ptr poked :: VulkanInstanceCreateInfoKHR
poked = Ptr VulkanInstanceCreateInfoKHR
-> VulkanInstanceCreateInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr VulkanInstanceCreateInfoKHR
ptr VulkanInstanceCreateInfoKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero VulkanInstanceCreateInfoKHR where
  zero :: VulkanInstanceCreateInfoKHR
zero = SystemId
-> VulkanInstanceCreateFlagsKHR
-> PFN_vkGetInstanceProcAddr
-> Ptr (SomeStruct InstanceCreateInfo)
-> Ptr AllocationCallbacks
-> VulkanInstanceCreateInfoKHR
VulkanInstanceCreateInfoKHR
           SystemId
forall a. Zero a => a
zero
           VulkanInstanceCreateFlagsKHR
forall a. Zero a => a
zero
           PFN_vkGetInstanceProcAddr
forall a. Zero a => a
zero
           Ptr (SomeStruct InstanceCreateInfo)
forall a. Zero a => a
zero
           Ptr AllocationCallbacks
forall a. Zero a => a
zero


-- | XrVulkanDeviceCreateInfoKHR - Vulkan Device Create Info
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-XrVulkanDeviceCreateInfoKHR-extension-notenabled# The @@
--     extension /must/ be enabled prior to using
--     'VulkanDeviceCreateInfoKHR'
--
-- -   #VUID-XrVulkanDeviceCreateInfoKHR-type-type# @type@ /must/ be
--     'OpenXR.Core10.Enums.StructureType.TYPE_VULKAN_DEVICE_CREATE_INFO_KHR'
--
-- -   #VUID-XrVulkanDeviceCreateInfoKHR-next-next# @next@ /must/ be @NULL@
--     or a valid pointer to the
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#valid-usage-for-structure-pointer-chains next structure in a structure chain>
--
-- -   #VUID-XrVulkanDeviceCreateInfoKHR-createFlags-zerobitmask#
--     @createFlags@ /must/ be @0@
--
-- -   #VUID-XrVulkanDeviceCreateInfoKHR-pfnGetInstanceProcAddr-parameter#
--     @pfnGetInstanceProcAddr@ /must/ be a valid
--     @PFN_vkGetInstanceProcAddr@ value
--
-- -   #VUID-XrVulkanDeviceCreateInfoKHR-vulkanPhysicalDevice-parameter#
--     @vulkanPhysicalDevice@ /must/ be a valid @VkPhysicalDevice@ value
--
-- -   #VUID-XrVulkanDeviceCreateInfoKHR-vulkanCreateInfo-parameter#
--     @vulkanCreateInfo@ /must/ be a pointer to a valid
--     @VkDeviceCreateInfo@ value
--
-- -   #VUID-XrVulkanDeviceCreateInfoKHR-vulkanAllocator-parameter#
--     @vulkanAllocator@ /must/ be a pointer to a valid
--     @VkAllocationCallbacks@ value
--
-- = See Also
--
-- 'OpenXR.Core10.Enums.StructureType.StructureType',
-- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId >,
-- 'VulkanDeviceCreateFlagsKHR', 'createVulkanDeviceKHR'
data VulkanDeviceCreateInfoKHR = VulkanDeviceCreateInfoKHR
  { -- | @systemId@ is an
    -- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId >
    -- handle for the system which will be used to create a session.
    VulkanDeviceCreateInfoKHR -> SystemId
systemId :: SystemId
  , -- No documentation found for Nested "XrVulkanDeviceCreateInfoKHR" "createFlags"
    VulkanDeviceCreateInfoKHR -> VulkanDeviceCreateFlagsKHR
createFlags :: VulkanDeviceCreateFlagsKHR
  , -- | @pfnGetInstanceProcAddr@ is a function pointer to
    -- @vkGetInstanceProcAddr@ or a compatible entry point.
    VulkanDeviceCreateInfoKHR -> PFN_vkGetInstanceProcAddr
pfnGetInstanceProcAddr :: OpenXR.VulkanTypes.PFN_vkGetInstanceProcAddr
  , -- | @vulkanPhysicalDevice@ /must/ match
    -- 'OpenXR.Extensions.XR_KHR_vulkan_enable.getVulkanGraphicsDeviceKHR'.
    VulkanDeviceCreateInfoKHR
-> "vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T
vulkanPhysicalDevice :: Ptr OpenXR.VulkanTypes.PhysicalDevice_T
  , -- | @vulkanCreateInfo@ is the
    -- <{vkRefPageRoot}/VkDeviceCreateInfo.html VkDeviceCreateInfo as specified by Vulkan>.
    VulkanDeviceCreateInfoKHR -> Ptr (SomeStruct DeviceCreateInfo)
vulkanCreateInfo :: Ptr (OpenXR.VulkanTypes.SomeStruct OpenXR.VulkanTypes.DeviceCreateInfo)
  , -- | @vulkanAllocator@ is the
    -- <{vkRefPageRoot}/VkAllocationCallbacks.html VkAllocationCallbacks as specified by Vulkan>.
    VulkanDeviceCreateInfoKHR -> Ptr AllocationCallbacks
vulkanAllocator :: Ptr OpenXR.VulkanTypes.AllocationCallbacks
  }
  deriving (Typeable, VulkanDeviceCreateInfoKHR -> VulkanDeviceCreateInfoKHR -> Bool
(VulkanDeviceCreateInfoKHR -> VulkanDeviceCreateInfoKHR -> Bool)
-> (VulkanDeviceCreateInfoKHR -> VulkanDeviceCreateInfoKHR -> Bool)
-> Eq VulkanDeviceCreateInfoKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VulkanDeviceCreateInfoKHR -> VulkanDeviceCreateInfoKHR -> Bool
$c/= :: VulkanDeviceCreateInfoKHR -> VulkanDeviceCreateInfoKHR -> Bool
== :: VulkanDeviceCreateInfoKHR -> VulkanDeviceCreateInfoKHR -> Bool
$c== :: VulkanDeviceCreateInfoKHR -> VulkanDeviceCreateInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (VulkanDeviceCreateInfoKHR)
#endif
deriving instance Show VulkanDeviceCreateInfoKHR

instance ToCStruct VulkanDeviceCreateInfoKHR where
  withCStruct :: VulkanDeviceCreateInfoKHR
-> (Ptr VulkanDeviceCreateInfoKHR -> IO b) -> IO b
withCStruct x :: VulkanDeviceCreateInfoKHR
x f :: Ptr VulkanDeviceCreateInfoKHR -> IO b
f = Int -> Int -> (Ptr VulkanDeviceCreateInfoKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 64 8 ((Ptr VulkanDeviceCreateInfoKHR -> IO b) -> IO b)
-> (Ptr VulkanDeviceCreateInfoKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr VulkanDeviceCreateInfoKHR
p -> Ptr VulkanDeviceCreateInfoKHR
-> VulkanDeviceCreateInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr VulkanDeviceCreateInfoKHR
p VulkanDeviceCreateInfoKHR
x (Ptr VulkanDeviceCreateInfoKHR -> IO b
f Ptr VulkanDeviceCreateInfoKHR
p)
  pokeCStruct :: Ptr VulkanDeviceCreateInfoKHR
-> VulkanDeviceCreateInfoKHR -> IO b -> IO b
pokeCStruct p :: Ptr VulkanDeviceCreateInfoKHR
p VulkanDeviceCreateInfoKHR{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_VULKAN_DEVICE_CREATE_INFO_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr SystemId -> SystemId -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR -> Int -> Ptr SystemId
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr SystemId)) (SystemId
systemId)
    Ptr VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR
-> Int -> Ptr VulkanDeviceCreateFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr VulkanDeviceCreateFlagsKHR)) (VulkanDeviceCreateFlagsKHR
createFlags)
    Ptr PFN_vkGetInstanceProcAddr -> PFN_vkGetInstanceProcAddr -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR
-> Int -> Ptr PFN_vkGetInstanceProcAddr
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr OpenXR.VulkanTypes.PFN_vkGetInstanceProcAddr)) (PFN_vkGetInstanceProcAddr
pfnGetInstanceProcAddr)
    ("vulkanPhysicalDevice"
 ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR
-> Int
-> "vulkanPhysicalDevice"
   ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr OpenXR.VulkanTypes.PhysicalDevice_T))) ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T
vulkanPhysicalDevice)
    Ptr (Ptr (SomeStruct DeviceCreateInfo))
-> Ptr (SomeStruct DeviceCreateInfo) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR
-> Int -> Ptr (Ptr (SomeStruct DeviceCreateInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr (Ptr (OpenXR.VulkanTypes.SomeStruct OpenXR.VulkanTypes.DeviceCreateInfo)))) (Ptr (SomeStruct DeviceCreateInfo)
vulkanCreateInfo)
    Ptr (Ptr AllocationCallbacks) -> Ptr AllocationCallbacks -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR
-> Int -> Ptr (Ptr AllocationCallbacks)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr (Ptr OpenXR.VulkanTypes.AllocationCallbacks))) (Ptr AllocationCallbacks
vulkanAllocator)
    IO b
f
  cStructSize :: Int
cStructSize = 64
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr VulkanDeviceCreateInfoKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr VulkanDeviceCreateInfoKHR
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_VULKAN_DEVICE_CREATE_INFO_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr SystemId -> SystemId -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR -> Int -> Ptr SystemId
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr SystemId)) (SystemId
forall a. Zero a => a
zero)
    Ptr VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR
-> Int -> Ptr VulkanDeviceCreateFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr VulkanDeviceCreateFlagsKHR)) (VulkanDeviceCreateFlagsKHR
forall a. Zero a => a
zero)
    Ptr PFN_vkGetInstanceProcAddr -> PFN_vkGetInstanceProcAddr -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR
-> Int -> Ptr PFN_vkGetInstanceProcAddr
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr OpenXR.VulkanTypes.PFN_vkGetInstanceProcAddr)) (PFN_vkGetInstanceProcAddr
forall a. Zero a => a
zero)
    ("vulkanPhysicalDevice"
 ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR
-> Int
-> "vulkanPhysicalDevice"
   ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr OpenXR.VulkanTypes.PhysicalDevice_T))) ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T
forall a. Zero a => a
zero)
    Ptr (Ptr (SomeStruct DeviceCreateInfo))
-> Ptr (SomeStruct DeviceCreateInfo) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR
-> Int -> Ptr (Ptr (SomeStruct DeviceCreateInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr (Ptr (OpenXR.VulkanTypes.SomeStruct OpenXR.VulkanTypes.DeviceCreateInfo)))) (Ptr (SomeStruct DeviceCreateInfo)
forall a. Zero a => a
zero)
    Ptr (Ptr AllocationCallbacks) -> Ptr AllocationCallbacks -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR
-> Int -> Ptr (Ptr AllocationCallbacks)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr (Ptr OpenXR.VulkanTypes.AllocationCallbacks))) (Ptr AllocationCallbacks
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct VulkanDeviceCreateInfoKHR where
  peekCStruct :: Ptr VulkanDeviceCreateInfoKHR -> IO VulkanDeviceCreateInfoKHR
peekCStruct p :: Ptr VulkanDeviceCreateInfoKHR
p = do
    SystemId
systemId <- Ptr SystemId -> IO SystemId
forall a. Storable a => Ptr a -> IO a
peek @SystemId ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR -> Int -> Ptr SystemId
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr SystemId))
    VulkanDeviceCreateFlagsKHR
createFlags <- Ptr VulkanDeviceCreateFlagsKHR -> IO VulkanDeviceCreateFlagsKHR
forall a. Storable a => Ptr a -> IO a
peek @VulkanDeviceCreateFlagsKHR ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR
-> Int -> Ptr VulkanDeviceCreateFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr VulkanDeviceCreateFlagsKHR))
    PFN_vkGetInstanceProcAddr
pfnGetInstanceProcAddr <- Ptr PFN_vkGetInstanceProcAddr -> IO PFN_vkGetInstanceProcAddr
forall a. Storable a => Ptr a -> IO a
peek @OpenXR.VulkanTypes.PFN_vkGetInstanceProcAddr ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR
-> Int -> Ptr PFN_vkGetInstanceProcAddr
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr OpenXR.VulkanTypes.PFN_vkGetInstanceProcAddr))
    "vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T
vulkanPhysicalDevice <- ("vulkanPhysicalDevice"
 ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T))
-> IO ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr OpenXR.VulkanTypes.PhysicalDevice_T) ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR
-> Int
-> "vulkanPhysicalDevice"
   ::: Ptr ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr OpenXR.VulkanTypes.PhysicalDevice_T)))
    Ptr (SomeStruct DeviceCreateInfo)
vulkanCreateInfo <- Ptr (Ptr (SomeStruct DeviceCreateInfo))
-> IO (Ptr (SomeStruct DeviceCreateInfo))
forall a. Storable a => Ptr a -> IO a
peek @(Ptr (OpenXR.VulkanTypes.SomeStruct OpenXR.VulkanTypes.DeviceCreateInfo)) ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR
-> Int -> Ptr (Ptr (SomeStruct DeviceCreateInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr (Ptr (OpenXR.VulkanTypes.SomeStruct OpenXR.VulkanTypes.DeviceCreateInfo))))
    Ptr AllocationCallbacks
vulkanAllocator <- Ptr (Ptr AllocationCallbacks) -> IO (Ptr AllocationCallbacks)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr OpenXR.VulkanTypes.AllocationCallbacks) ((Ptr VulkanDeviceCreateInfoKHR
p Ptr VulkanDeviceCreateInfoKHR
-> Int -> Ptr (Ptr AllocationCallbacks)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr (Ptr OpenXR.VulkanTypes.AllocationCallbacks)))
    VulkanDeviceCreateInfoKHR -> IO VulkanDeviceCreateInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (VulkanDeviceCreateInfoKHR -> IO VulkanDeviceCreateInfoKHR)
-> VulkanDeviceCreateInfoKHR -> IO VulkanDeviceCreateInfoKHR
forall a b. (a -> b) -> a -> b
$ SystemId
-> VulkanDeviceCreateFlagsKHR
-> PFN_vkGetInstanceProcAddr
-> ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> Ptr (SomeStruct DeviceCreateInfo)
-> Ptr AllocationCallbacks
-> VulkanDeviceCreateInfoKHR
VulkanDeviceCreateInfoKHR
             SystemId
systemId VulkanDeviceCreateFlagsKHR
createFlags PFN_vkGetInstanceProcAddr
pfnGetInstanceProcAddr "vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T
vulkanPhysicalDevice Ptr (SomeStruct DeviceCreateInfo)
vulkanCreateInfo Ptr AllocationCallbacks
vulkanAllocator

instance Storable VulkanDeviceCreateInfoKHR where
  sizeOf :: VulkanDeviceCreateInfoKHR -> Int
sizeOf ~VulkanDeviceCreateInfoKHR
_ = 64
  alignment :: VulkanDeviceCreateInfoKHR -> Int
alignment ~VulkanDeviceCreateInfoKHR
_ = 8
  peek :: Ptr VulkanDeviceCreateInfoKHR -> IO VulkanDeviceCreateInfoKHR
peek = Ptr VulkanDeviceCreateInfoKHR -> IO VulkanDeviceCreateInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr VulkanDeviceCreateInfoKHR -> VulkanDeviceCreateInfoKHR -> IO ()
poke ptr :: Ptr VulkanDeviceCreateInfoKHR
ptr poked :: VulkanDeviceCreateInfoKHR
poked = Ptr VulkanDeviceCreateInfoKHR
-> VulkanDeviceCreateInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr VulkanDeviceCreateInfoKHR
ptr VulkanDeviceCreateInfoKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero VulkanDeviceCreateInfoKHR where
  zero :: VulkanDeviceCreateInfoKHR
zero = SystemId
-> VulkanDeviceCreateFlagsKHR
-> PFN_vkGetInstanceProcAddr
-> ("vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T)
-> Ptr (SomeStruct DeviceCreateInfo)
-> Ptr AllocationCallbacks
-> VulkanDeviceCreateInfoKHR
VulkanDeviceCreateInfoKHR
           SystemId
forall a. Zero a => a
zero
           VulkanDeviceCreateFlagsKHR
forall a. Zero a => a
zero
           PFN_vkGetInstanceProcAddr
forall a. Zero a => a
zero
           "vulkanPhysicalDevice" ::: Ptr PhysicalDevice_T
forall a. Zero a => a
zero
           Ptr (SomeStruct DeviceCreateInfo)
forall a. Zero a => a
zero
           Ptr AllocationCallbacks
forall a. Zero a => a
zero


-- | XrVulkanGraphicsDeviceGetInfoKHR - Vulkan Graphics Device Get Info
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-XrVulkanGraphicsDeviceGetInfoKHR-extension-notenabled# The @@
--     extension /must/ be enabled prior to using
--     'VulkanGraphicsDeviceGetInfoKHR'
--
-- -   #VUID-XrVulkanGraphicsDeviceGetInfoKHR-type-type# @type@ /must/ be
--     'OpenXR.Core10.Enums.StructureType.TYPE_VULKAN_GRAPHICS_DEVICE_GET_INFO_KHR'
--
-- -   #VUID-XrVulkanGraphicsDeviceGetInfoKHR-next-next# @next@ /must/ be
--     @NULL@ or a valid pointer to the
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#valid-usage-for-structure-pointer-chains next structure in a structure chain>
--
-- -   #VUID-XrVulkanGraphicsDeviceGetInfoKHR-vulkanInstance-parameter#
--     @vulkanInstance@ /must/ be a valid @VkInstance@ value
--
-- = See Also
--
-- 'OpenXR.Core10.Enums.StructureType.StructureType',
-- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId >,
-- 'getVulkanGraphicsDevice2KHR'
data VulkanGraphicsDeviceGetInfoKHR = VulkanGraphicsDeviceGetInfoKHR
  { -- | @systemId@ is an
    -- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId >
    -- handle for the system which will be used to create a session.
    VulkanGraphicsDeviceGetInfoKHR -> SystemId
systemId :: SystemId
  , -- | @vulkanInstance@ is a valid Vulkan @VkInstance@.
    VulkanGraphicsDeviceGetInfoKHR
-> "vulkanInstance" ::: Ptr Instance_T
vulkanInstance :: Ptr OpenXR.VulkanTypes.Instance_T
  }
  deriving (Typeable, VulkanGraphicsDeviceGetInfoKHR
-> VulkanGraphicsDeviceGetInfoKHR -> Bool
(VulkanGraphicsDeviceGetInfoKHR
 -> VulkanGraphicsDeviceGetInfoKHR -> Bool)
-> (VulkanGraphicsDeviceGetInfoKHR
    -> VulkanGraphicsDeviceGetInfoKHR -> Bool)
-> Eq VulkanGraphicsDeviceGetInfoKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VulkanGraphicsDeviceGetInfoKHR
-> VulkanGraphicsDeviceGetInfoKHR -> Bool
$c/= :: VulkanGraphicsDeviceGetInfoKHR
-> VulkanGraphicsDeviceGetInfoKHR -> Bool
== :: VulkanGraphicsDeviceGetInfoKHR
-> VulkanGraphicsDeviceGetInfoKHR -> Bool
$c== :: VulkanGraphicsDeviceGetInfoKHR
-> VulkanGraphicsDeviceGetInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (VulkanGraphicsDeviceGetInfoKHR)
#endif
deriving instance Show VulkanGraphicsDeviceGetInfoKHR

instance ToCStruct VulkanGraphicsDeviceGetInfoKHR where
  withCStruct :: VulkanGraphicsDeviceGetInfoKHR
-> (Ptr VulkanGraphicsDeviceGetInfoKHR -> IO b) -> IO b
withCStruct x :: VulkanGraphicsDeviceGetInfoKHR
x f :: Ptr VulkanGraphicsDeviceGetInfoKHR -> IO b
f = Int -> Int -> (Ptr VulkanGraphicsDeviceGetInfoKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((Ptr VulkanGraphicsDeviceGetInfoKHR -> IO b) -> IO b)
-> (Ptr VulkanGraphicsDeviceGetInfoKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr VulkanGraphicsDeviceGetInfoKHR
p -> Ptr VulkanGraphicsDeviceGetInfoKHR
-> VulkanGraphicsDeviceGetInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr VulkanGraphicsDeviceGetInfoKHR
p VulkanGraphicsDeviceGetInfoKHR
x (Ptr VulkanGraphicsDeviceGetInfoKHR -> IO b
f Ptr VulkanGraphicsDeviceGetInfoKHR
p)
  pokeCStruct :: Ptr VulkanGraphicsDeviceGetInfoKHR
-> VulkanGraphicsDeviceGetInfoKHR -> IO b -> IO b
pokeCStruct p :: Ptr VulkanGraphicsDeviceGetInfoKHR
p VulkanGraphicsDeviceGetInfoKHR{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanGraphicsDeviceGetInfoKHR
p Ptr VulkanGraphicsDeviceGetInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_VULKAN_GRAPHICS_DEVICE_GET_INFO_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanGraphicsDeviceGetInfoKHR
p Ptr VulkanGraphicsDeviceGetInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr SystemId -> SystemId -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanGraphicsDeviceGetInfoKHR
p Ptr VulkanGraphicsDeviceGetInfoKHR -> Int -> Ptr SystemId
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr SystemId)) (SystemId
systemId)
    ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
-> ("vulkanInstance" ::: Ptr Instance_T) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanGraphicsDeviceGetInfoKHR
p Ptr VulkanGraphicsDeviceGetInfoKHR
-> Int
-> "vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr OpenXR.VulkanTypes.Instance_T))) ("vulkanInstance" ::: Ptr Instance_T
vulkanInstance)
    IO b
f
  cStructSize :: Int
cStructSize = 32
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr VulkanGraphicsDeviceGetInfoKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr VulkanGraphicsDeviceGetInfoKHR
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanGraphicsDeviceGetInfoKHR
p Ptr VulkanGraphicsDeviceGetInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_VULKAN_GRAPHICS_DEVICE_GET_INFO_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanGraphicsDeviceGetInfoKHR
p Ptr VulkanGraphicsDeviceGetInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr SystemId -> SystemId -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanGraphicsDeviceGetInfoKHR
p Ptr VulkanGraphicsDeviceGetInfoKHR -> Int -> Ptr SystemId
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr SystemId)) (SystemId
forall a. Zero a => a
zero)
    ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
-> ("vulkanInstance" ::: Ptr Instance_T) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VulkanGraphicsDeviceGetInfoKHR
p Ptr VulkanGraphicsDeviceGetInfoKHR
-> Int
-> "vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr OpenXR.VulkanTypes.Instance_T))) ("vulkanInstance" ::: Ptr Instance_T
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct VulkanGraphicsDeviceGetInfoKHR where
  peekCStruct :: Ptr VulkanGraphicsDeviceGetInfoKHR
-> IO VulkanGraphicsDeviceGetInfoKHR
peekCStruct p :: Ptr VulkanGraphicsDeviceGetInfoKHR
p = do
    SystemId
systemId <- Ptr SystemId -> IO SystemId
forall a. Storable a => Ptr a -> IO a
peek @SystemId ((Ptr VulkanGraphicsDeviceGetInfoKHR
p Ptr VulkanGraphicsDeviceGetInfoKHR -> Int -> Ptr SystemId
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr SystemId))
    "vulkanInstance" ::: Ptr Instance_T
vulkanInstance <- ("vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T))
-> IO ("vulkanInstance" ::: Ptr Instance_T)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr OpenXR.VulkanTypes.Instance_T) ((Ptr VulkanGraphicsDeviceGetInfoKHR
p Ptr VulkanGraphicsDeviceGetInfoKHR
-> Int
-> "vulkanInstance" ::: Ptr ("vulkanInstance" ::: Ptr Instance_T)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr OpenXR.VulkanTypes.Instance_T)))
    VulkanGraphicsDeviceGetInfoKHR -> IO VulkanGraphicsDeviceGetInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (VulkanGraphicsDeviceGetInfoKHR
 -> IO VulkanGraphicsDeviceGetInfoKHR)
-> VulkanGraphicsDeviceGetInfoKHR
-> IO VulkanGraphicsDeviceGetInfoKHR
forall a b. (a -> b) -> a -> b
$ SystemId
-> ("vulkanInstance" ::: Ptr Instance_T)
-> VulkanGraphicsDeviceGetInfoKHR
VulkanGraphicsDeviceGetInfoKHR
             SystemId
systemId "vulkanInstance" ::: Ptr Instance_T
vulkanInstance

instance Storable VulkanGraphicsDeviceGetInfoKHR where
  sizeOf :: VulkanGraphicsDeviceGetInfoKHR -> Int
sizeOf ~VulkanGraphicsDeviceGetInfoKHR
_ = 32
  alignment :: VulkanGraphicsDeviceGetInfoKHR -> Int
alignment ~VulkanGraphicsDeviceGetInfoKHR
_ = 8
  peek :: Ptr VulkanGraphicsDeviceGetInfoKHR
-> IO VulkanGraphicsDeviceGetInfoKHR
peek = Ptr VulkanGraphicsDeviceGetInfoKHR
-> IO VulkanGraphicsDeviceGetInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr VulkanGraphicsDeviceGetInfoKHR
-> VulkanGraphicsDeviceGetInfoKHR -> IO ()
poke ptr :: Ptr VulkanGraphicsDeviceGetInfoKHR
ptr poked :: VulkanGraphicsDeviceGetInfoKHR
poked = Ptr VulkanGraphicsDeviceGetInfoKHR
-> VulkanGraphicsDeviceGetInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr VulkanGraphicsDeviceGetInfoKHR
ptr VulkanGraphicsDeviceGetInfoKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero VulkanGraphicsDeviceGetInfoKHR where
  zero :: VulkanGraphicsDeviceGetInfoKHR
zero = SystemId
-> ("vulkanInstance" ::: Ptr Instance_T)
-> VulkanGraphicsDeviceGetInfoKHR
VulkanGraphicsDeviceGetInfoKHR
           SystemId
forall a. Zero a => a
zero
           "vulkanInstance" ::: Ptr Instance_T
forall a. Zero a => a
zero


-- | XrVulkanInstanceCreateFlagsKHR - Vulkan Instance Create Info Flags
--
-- = See Also
--
-- 'VulkanInstanceCreateInfoKHR'
newtype VulkanInstanceCreateFlagsKHR = VulkanInstanceCreateFlagsKHR Flags64
  deriving newtype (VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> Bool
(VulkanInstanceCreateFlagsKHR
 -> VulkanInstanceCreateFlagsKHR -> Bool)
-> (VulkanInstanceCreateFlagsKHR
    -> VulkanInstanceCreateFlagsKHR -> Bool)
-> Eq VulkanInstanceCreateFlagsKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> Bool
$c/= :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> Bool
== :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> Bool
$c== :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> Bool
Eq, Eq VulkanInstanceCreateFlagsKHR
Eq VulkanInstanceCreateFlagsKHR =>
(VulkanInstanceCreateFlagsKHR
 -> VulkanInstanceCreateFlagsKHR -> Ordering)
-> (VulkanInstanceCreateFlagsKHR
    -> VulkanInstanceCreateFlagsKHR -> Bool)
-> (VulkanInstanceCreateFlagsKHR
    -> VulkanInstanceCreateFlagsKHR -> Bool)
-> (VulkanInstanceCreateFlagsKHR
    -> VulkanInstanceCreateFlagsKHR -> Bool)
-> (VulkanInstanceCreateFlagsKHR
    -> VulkanInstanceCreateFlagsKHR -> Bool)
-> (VulkanInstanceCreateFlagsKHR
    -> VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR)
-> (VulkanInstanceCreateFlagsKHR
    -> VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR)
-> Ord VulkanInstanceCreateFlagsKHR
VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> Bool
VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> Ordering
VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR
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 :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR
$cmin :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR
max :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR
$cmax :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR
>= :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> Bool
$c>= :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> Bool
> :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> Bool
$c> :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> Bool
<= :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> Bool
$c<= :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> Bool
< :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> Bool
$c< :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> Bool
compare :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> Ordering
$ccompare :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> Ordering
$cp1Ord :: Eq VulkanInstanceCreateFlagsKHR
Ord, Ptr b -> Int -> IO VulkanInstanceCreateFlagsKHR
Ptr b -> Int -> VulkanInstanceCreateFlagsKHR -> IO ()
Ptr VulkanInstanceCreateFlagsKHR -> IO VulkanInstanceCreateFlagsKHR
Ptr VulkanInstanceCreateFlagsKHR
-> Int -> IO VulkanInstanceCreateFlagsKHR
Ptr VulkanInstanceCreateFlagsKHR
-> Int -> VulkanInstanceCreateFlagsKHR -> IO ()
Ptr VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> IO ()
VulkanInstanceCreateFlagsKHR -> Int
(VulkanInstanceCreateFlagsKHR -> Int)
-> (VulkanInstanceCreateFlagsKHR -> Int)
-> (Ptr VulkanInstanceCreateFlagsKHR
    -> Int -> IO VulkanInstanceCreateFlagsKHR)
-> (Ptr VulkanInstanceCreateFlagsKHR
    -> Int -> VulkanInstanceCreateFlagsKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO VulkanInstanceCreateFlagsKHR)
-> (forall b.
    Ptr b -> Int -> VulkanInstanceCreateFlagsKHR -> IO ())
-> (Ptr VulkanInstanceCreateFlagsKHR
    -> IO VulkanInstanceCreateFlagsKHR)
-> (Ptr VulkanInstanceCreateFlagsKHR
    -> VulkanInstanceCreateFlagsKHR -> IO ())
-> Storable VulkanInstanceCreateFlagsKHR
forall b. Ptr b -> Int -> IO VulkanInstanceCreateFlagsKHR
forall b. Ptr b -> Int -> VulkanInstanceCreateFlagsKHR -> 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 VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> IO ()
$cpoke :: Ptr VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> IO ()
peek :: Ptr VulkanInstanceCreateFlagsKHR -> IO VulkanInstanceCreateFlagsKHR
$cpeek :: Ptr VulkanInstanceCreateFlagsKHR -> IO VulkanInstanceCreateFlagsKHR
pokeByteOff :: Ptr b -> Int -> VulkanInstanceCreateFlagsKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> VulkanInstanceCreateFlagsKHR -> IO ()
peekByteOff :: Ptr b -> Int -> IO VulkanInstanceCreateFlagsKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO VulkanInstanceCreateFlagsKHR
pokeElemOff :: Ptr VulkanInstanceCreateFlagsKHR
-> Int -> VulkanInstanceCreateFlagsKHR -> IO ()
$cpokeElemOff :: Ptr VulkanInstanceCreateFlagsKHR
-> Int -> VulkanInstanceCreateFlagsKHR -> IO ()
peekElemOff :: Ptr VulkanInstanceCreateFlagsKHR
-> Int -> IO VulkanInstanceCreateFlagsKHR
$cpeekElemOff :: Ptr VulkanInstanceCreateFlagsKHR
-> Int -> IO VulkanInstanceCreateFlagsKHR
alignment :: VulkanInstanceCreateFlagsKHR -> Int
$calignment :: VulkanInstanceCreateFlagsKHR -> Int
sizeOf :: VulkanInstanceCreateFlagsKHR -> Int
$csizeOf :: VulkanInstanceCreateFlagsKHR -> Int
Storable, VulkanInstanceCreateFlagsKHR
VulkanInstanceCreateFlagsKHR -> Zero VulkanInstanceCreateFlagsKHR
forall a. a -> Zero a
zero :: VulkanInstanceCreateFlagsKHR
$czero :: VulkanInstanceCreateFlagsKHR
Zero, Eq VulkanInstanceCreateFlagsKHR
VulkanInstanceCreateFlagsKHR
Eq VulkanInstanceCreateFlagsKHR =>
(VulkanInstanceCreateFlagsKHR
 -> VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR)
-> (VulkanInstanceCreateFlagsKHR
    -> VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR)
-> (VulkanInstanceCreateFlagsKHR
    -> VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR)
-> (VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR)
-> (VulkanInstanceCreateFlagsKHR
    -> Int -> VulkanInstanceCreateFlagsKHR)
-> (VulkanInstanceCreateFlagsKHR
    -> Int -> VulkanInstanceCreateFlagsKHR)
-> VulkanInstanceCreateFlagsKHR
-> (Int -> VulkanInstanceCreateFlagsKHR)
-> (VulkanInstanceCreateFlagsKHR
    -> Int -> VulkanInstanceCreateFlagsKHR)
-> (VulkanInstanceCreateFlagsKHR
    -> Int -> VulkanInstanceCreateFlagsKHR)
-> (VulkanInstanceCreateFlagsKHR
    -> Int -> VulkanInstanceCreateFlagsKHR)
-> (VulkanInstanceCreateFlagsKHR -> Int -> Bool)
-> (VulkanInstanceCreateFlagsKHR -> Maybe Int)
-> (VulkanInstanceCreateFlagsKHR -> Int)
-> (VulkanInstanceCreateFlagsKHR -> Bool)
-> (VulkanInstanceCreateFlagsKHR
    -> Int -> VulkanInstanceCreateFlagsKHR)
-> (VulkanInstanceCreateFlagsKHR
    -> Int -> VulkanInstanceCreateFlagsKHR)
-> (VulkanInstanceCreateFlagsKHR
    -> Int -> VulkanInstanceCreateFlagsKHR)
-> (VulkanInstanceCreateFlagsKHR
    -> Int -> VulkanInstanceCreateFlagsKHR)
-> (VulkanInstanceCreateFlagsKHR
    -> Int -> VulkanInstanceCreateFlagsKHR)
-> (VulkanInstanceCreateFlagsKHR
    -> Int -> VulkanInstanceCreateFlagsKHR)
-> (VulkanInstanceCreateFlagsKHR -> Int)
-> Bits VulkanInstanceCreateFlagsKHR
Int -> VulkanInstanceCreateFlagsKHR
VulkanInstanceCreateFlagsKHR -> Bool
VulkanInstanceCreateFlagsKHR -> Int
VulkanInstanceCreateFlagsKHR -> Maybe Int
VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR
VulkanInstanceCreateFlagsKHR -> Int -> Bool
VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR
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 :: VulkanInstanceCreateFlagsKHR -> Int
$cpopCount :: VulkanInstanceCreateFlagsKHR -> Int
rotateR :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
$crotateR :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
rotateL :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
$crotateL :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
unsafeShiftR :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
$cunsafeShiftR :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
shiftR :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
$cshiftR :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
unsafeShiftL :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
$cunsafeShiftL :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
shiftL :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
$cshiftL :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
isSigned :: VulkanInstanceCreateFlagsKHR -> Bool
$cisSigned :: VulkanInstanceCreateFlagsKHR -> Bool
bitSize :: VulkanInstanceCreateFlagsKHR -> Int
$cbitSize :: VulkanInstanceCreateFlagsKHR -> Int
bitSizeMaybe :: VulkanInstanceCreateFlagsKHR -> Maybe Int
$cbitSizeMaybe :: VulkanInstanceCreateFlagsKHR -> Maybe Int
testBit :: VulkanInstanceCreateFlagsKHR -> Int -> Bool
$ctestBit :: VulkanInstanceCreateFlagsKHR -> Int -> Bool
complementBit :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
$ccomplementBit :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
clearBit :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
$cclearBit :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
setBit :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
$csetBit :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
bit :: Int -> VulkanInstanceCreateFlagsKHR
$cbit :: Int -> VulkanInstanceCreateFlagsKHR
zeroBits :: VulkanInstanceCreateFlagsKHR
$czeroBits :: VulkanInstanceCreateFlagsKHR
rotate :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
$crotate :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
shift :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
$cshift :: VulkanInstanceCreateFlagsKHR -> Int -> VulkanInstanceCreateFlagsKHR
complement :: VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR
$ccomplement :: VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR
xor :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR
$cxor :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR
.|. :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR
$c.|. :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR
.&. :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR
$c.&. :: VulkanInstanceCreateFlagsKHR
-> VulkanInstanceCreateFlagsKHR -> VulkanInstanceCreateFlagsKHR
$cp1Bits :: Eq VulkanInstanceCreateFlagsKHR
Bits, Bits VulkanInstanceCreateFlagsKHR
Bits VulkanInstanceCreateFlagsKHR =>
(VulkanInstanceCreateFlagsKHR -> Int)
-> (VulkanInstanceCreateFlagsKHR -> Int)
-> (VulkanInstanceCreateFlagsKHR -> Int)
-> FiniteBits VulkanInstanceCreateFlagsKHR
VulkanInstanceCreateFlagsKHR -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: VulkanInstanceCreateFlagsKHR -> Int
$ccountTrailingZeros :: VulkanInstanceCreateFlagsKHR -> Int
countLeadingZeros :: VulkanInstanceCreateFlagsKHR -> Int
$ccountLeadingZeros :: VulkanInstanceCreateFlagsKHR -> Int
finiteBitSize :: VulkanInstanceCreateFlagsKHR -> Int
$cfiniteBitSize :: VulkanInstanceCreateFlagsKHR -> Int
$cp1FiniteBits :: Bits VulkanInstanceCreateFlagsKHR
FiniteBits)



conNameVulkanInstanceCreateFlagsKHR :: String
conNameVulkanInstanceCreateFlagsKHR :: String
conNameVulkanInstanceCreateFlagsKHR = "VulkanInstanceCreateFlagsKHR"

enumPrefixVulkanInstanceCreateFlagsKHR :: String
enumPrefixVulkanInstanceCreateFlagsKHR :: String
enumPrefixVulkanInstanceCreateFlagsKHR = ""

showTableVulkanInstanceCreateFlagsKHR :: [(VulkanInstanceCreateFlagsKHR, String)]
showTableVulkanInstanceCreateFlagsKHR :: [(VulkanInstanceCreateFlagsKHR, String)]
showTableVulkanInstanceCreateFlagsKHR = []

instance Show VulkanInstanceCreateFlagsKHR where
  showsPrec :: Int -> VulkanInstanceCreateFlagsKHR -> ShowS
showsPrec = String
-> [(VulkanInstanceCreateFlagsKHR, String)]
-> String
-> (VulkanInstanceCreateFlagsKHR -> Flags64)
-> (Flags64 -> ShowS)
-> Int
-> VulkanInstanceCreateFlagsKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixVulkanInstanceCreateFlagsKHR
                            [(VulkanInstanceCreateFlagsKHR, String)]
showTableVulkanInstanceCreateFlagsKHR
                            String
conNameVulkanInstanceCreateFlagsKHR
                            (\(VulkanInstanceCreateFlagsKHR x :: Flags64
x) -> Flags64
x)
                            (\x :: Flags64
x -> String -> ShowS
showString "0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Flags64 -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Flags64
x)

instance Read VulkanInstanceCreateFlagsKHR where
  readPrec :: ReadPrec VulkanInstanceCreateFlagsKHR
readPrec = String
-> [(VulkanInstanceCreateFlagsKHR, String)]
-> String
-> (Flags64 -> VulkanInstanceCreateFlagsKHR)
-> ReadPrec VulkanInstanceCreateFlagsKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixVulkanInstanceCreateFlagsKHR
                          [(VulkanInstanceCreateFlagsKHR, String)]
showTableVulkanInstanceCreateFlagsKHR
                          String
conNameVulkanInstanceCreateFlagsKHR
                          Flags64 -> VulkanInstanceCreateFlagsKHR
VulkanInstanceCreateFlagsKHR


-- | XrVulkanDeviceCreateFlagsKHR - Vulkan Device Create Info Flags
--
-- = See Also
--
-- 'VulkanDeviceCreateInfoKHR'
newtype VulkanDeviceCreateFlagsKHR = VulkanDeviceCreateFlagsKHR Flags64
  deriving newtype (VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR -> Bool
(VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR -> Bool)
-> (VulkanDeviceCreateFlagsKHR
    -> VulkanDeviceCreateFlagsKHR -> Bool)
-> Eq VulkanDeviceCreateFlagsKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR -> Bool
$c/= :: VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR -> Bool
== :: VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR -> Bool
$c== :: VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR -> Bool
Eq, Eq VulkanDeviceCreateFlagsKHR
Eq VulkanDeviceCreateFlagsKHR =>
(VulkanDeviceCreateFlagsKHR
 -> VulkanDeviceCreateFlagsKHR -> Ordering)
-> (VulkanDeviceCreateFlagsKHR
    -> VulkanDeviceCreateFlagsKHR -> Bool)
-> (VulkanDeviceCreateFlagsKHR
    -> VulkanDeviceCreateFlagsKHR -> Bool)
-> (VulkanDeviceCreateFlagsKHR
    -> VulkanDeviceCreateFlagsKHR -> Bool)
-> (VulkanDeviceCreateFlagsKHR
    -> VulkanDeviceCreateFlagsKHR -> Bool)
-> (VulkanDeviceCreateFlagsKHR
    -> VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR)
-> (VulkanDeviceCreateFlagsKHR
    -> VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR)
-> Ord VulkanDeviceCreateFlagsKHR
VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR -> Bool
VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> Ordering
VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR
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 :: VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR
$cmin :: VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR
max :: VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR
$cmax :: VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR
>= :: VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR -> Bool
$c>= :: VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR -> Bool
> :: VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR -> Bool
$c> :: VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR -> Bool
<= :: VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR -> Bool
$c<= :: VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR -> Bool
< :: VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR -> Bool
$c< :: VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR -> Bool
compare :: VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> Ordering
$ccompare :: VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> Ordering
$cp1Ord :: Eq VulkanDeviceCreateFlagsKHR
Ord, Ptr b -> Int -> IO VulkanDeviceCreateFlagsKHR
Ptr b -> Int -> VulkanDeviceCreateFlagsKHR -> IO ()
Ptr VulkanDeviceCreateFlagsKHR -> IO VulkanDeviceCreateFlagsKHR
Ptr VulkanDeviceCreateFlagsKHR
-> Int -> IO VulkanDeviceCreateFlagsKHR
Ptr VulkanDeviceCreateFlagsKHR
-> Int -> VulkanDeviceCreateFlagsKHR -> IO ()
Ptr VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> IO ()
VulkanDeviceCreateFlagsKHR -> Int
(VulkanDeviceCreateFlagsKHR -> Int)
-> (VulkanDeviceCreateFlagsKHR -> Int)
-> (Ptr VulkanDeviceCreateFlagsKHR
    -> Int -> IO VulkanDeviceCreateFlagsKHR)
-> (Ptr VulkanDeviceCreateFlagsKHR
    -> Int -> VulkanDeviceCreateFlagsKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO VulkanDeviceCreateFlagsKHR)
-> (forall b. Ptr b -> Int -> VulkanDeviceCreateFlagsKHR -> IO ())
-> (Ptr VulkanDeviceCreateFlagsKHR
    -> IO VulkanDeviceCreateFlagsKHR)
-> (Ptr VulkanDeviceCreateFlagsKHR
    -> VulkanDeviceCreateFlagsKHR -> IO ())
-> Storable VulkanDeviceCreateFlagsKHR
forall b. Ptr b -> Int -> IO VulkanDeviceCreateFlagsKHR
forall b. Ptr b -> Int -> VulkanDeviceCreateFlagsKHR -> 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 VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> IO ()
$cpoke :: Ptr VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> IO ()
peek :: Ptr VulkanDeviceCreateFlagsKHR -> IO VulkanDeviceCreateFlagsKHR
$cpeek :: Ptr VulkanDeviceCreateFlagsKHR -> IO VulkanDeviceCreateFlagsKHR
pokeByteOff :: Ptr b -> Int -> VulkanDeviceCreateFlagsKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> VulkanDeviceCreateFlagsKHR -> IO ()
peekByteOff :: Ptr b -> Int -> IO VulkanDeviceCreateFlagsKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO VulkanDeviceCreateFlagsKHR
pokeElemOff :: Ptr VulkanDeviceCreateFlagsKHR
-> Int -> VulkanDeviceCreateFlagsKHR -> IO ()
$cpokeElemOff :: Ptr VulkanDeviceCreateFlagsKHR
-> Int -> VulkanDeviceCreateFlagsKHR -> IO ()
peekElemOff :: Ptr VulkanDeviceCreateFlagsKHR
-> Int -> IO VulkanDeviceCreateFlagsKHR
$cpeekElemOff :: Ptr VulkanDeviceCreateFlagsKHR
-> Int -> IO VulkanDeviceCreateFlagsKHR
alignment :: VulkanDeviceCreateFlagsKHR -> Int
$calignment :: VulkanDeviceCreateFlagsKHR -> Int
sizeOf :: VulkanDeviceCreateFlagsKHR -> Int
$csizeOf :: VulkanDeviceCreateFlagsKHR -> Int
Storable, VulkanDeviceCreateFlagsKHR
VulkanDeviceCreateFlagsKHR -> Zero VulkanDeviceCreateFlagsKHR
forall a. a -> Zero a
zero :: VulkanDeviceCreateFlagsKHR
$czero :: VulkanDeviceCreateFlagsKHR
Zero, Eq VulkanDeviceCreateFlagsKHR
VulkanDeviceCreateFlagsKHR
Eq VulkanDeviceCreateFlagsKHR =>
(VulkanDeviceCreateFlagsKHR
 -> VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR)
-> (VulkanDeviceCreateFlagsKHR
    -> VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR)
-> (VulkanDeviceCreateFlagsKHR
    -> VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR)
-> (VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR)
-> (VulkanDeviceCreateFlagsKHR
    -> Int -> VulkanDeviceCreateFlagsKHR)
-> (VulkanDeviceCreateFlagsKHR
    -> Int -> VulkanDeviceCreateFlagsKHR)
-> VulkanDeviceCreateFlagsKHR
-> (Int -> VulkanDeviceCreateFlagsKHR)
-> (VulkanDeviceCreateFlagsKHR
    -> Int -> VulkanDeviceCreateFlagsKHR)
-> (VulkanDeviceCreateFlagsKHR
    -> Int -> VulkanDeviceCreateFlagsKHR)
-> (VulkanDeviceCreateFlagsKHR
    -> Int -> VulkanDeviceCreateFlagsKHR)
-> (VulkanDeviceCreateFlagsKHR -> Int -> Bool)
-> (VulkanDeviceCreateFlagsKHR -> Maybe Int)
-> (VulkanDeviceCreateFlagsKHR -> Int)
-> (VulkanDeviceCreateFlagsKHR -> Bool)
-> (VulkanDeviceCreateFlagsKHR
    -> Int -> VulkanDeviceCreateFlagsKHR)
-> (VulkanDeviceCreateFlagsKHR
    -> Int -> VulkanDeviceCreateFlagsKHR)
-> (VulkanDeviceCreateFlagsKHR
    -> Int -> VulkanDeviceCreateFlagsKHR)
-> (VulkanDeviceCreateFlagsKHR
    -> Int -> VulkanDeviceCreateFlagsKHR)
-> (VulkanDeviceCreateFlagsKHR
    -> Int -> VulkanDeviceCreateFlagsKHR)
-> (VulkanDeviceCreateFlagsKHR
    -> Int -> VulkanDeviceCreateFlagsKHR)
-> (VulkanDeviceCreateFlagsKHR -> Int)
-> Bits VulkanDeviceCreateFlagsKHR
Int -> VulkanDeviceCreateFlagsKHR
VulkanDeviceCreateFlagsKHR -> Bool
VulkanDeviceCreateFlagsKHR -> Int
VulkanDeviceCreateFlagsKHR -> Maybe Int
VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR
VulkanDeviceCreateFlagsKHR -> Int -> Bool
VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR
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 :: VulkanDeviceCreateFlagsKHR -> Int
$cpopCount :: VulkanDeviceCreateFlagsKHR -> Int
rotateR :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
$crotateR :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
rotateL :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
$crotateL :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
unsafeShiftR :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
$cunsafeShiftR :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
shiftR :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
$cshiftR :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
unsafeShiftL :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
$cunsafeShiftL :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
shiftL :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
$cshiftL :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
isSigned :: VulkanDeviceCreateFlagsKHR -> Bool
$cisSigned :: VulkanDeviceCreateFlagsKHR -> Bool
bitSize :: VulkanDeviceCreateFlagsKHR -> Int
$cbitSize :: VulkanDeviceCreateFlagsKHR -> Int
bitSizeMaybe :: VulkanDeviceCreateFlagsKHR -> Maybe Int
$cbitSizeMaybe :: VulkanDeviceCreateFlagsKHR -> Maybe Int
testBit :: VulkanDeviceCreateFlagsKHR -> Int -> Bool
$ctestBit :: VulkanDeviceCreateFlagsKHR -> Int -> Bool
complementBit :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
$ccomplementBit :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
clearBit :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
$cclearBit :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
setBit :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
$csetBit :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
bit :: Int -> VulkanDeviceCreateFlagsKHR
$cbit :: Int -> VulkanDeviceCreateFlagsKHR
zeroBits :: VulkanDeviceCreateFlagsKHR
$czeroBits :: VulkanDeviceCreateFlagsKHR
rotate :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
$crotate :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
shift :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
$cshift :: VulkanDeviceCreateFlagsKHR -> Int -> VulkanDeviceCreateFlagsKHR
complement :: VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR
$ccomplement :: VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR
xor :: VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR
$cxor :: VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR
.|. :: VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR
$c.|. :: VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR
.&. :: VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR
$c.&. :: VulkanDeviceCreateFlagsKHR
-> VulkanDeviceCreateFlagsKHR -> VulkanDeviceCreateFlagsKHR
$cp1Bits :: Eq VulkanDeviceCreateFlagsKHR
Bits, Bits VulkanDeviceCreateFlagsKHR
Bits VulkanDeviceCreateFlagsKHR =>
(VulkanDeviceCreateFlagsKHR -> Int)
-> (VulkanDeviceCreateFlagsKHR -> Int)
-> (VulkanDeviceCreateFlagsKHR -> Int)
-> FiniteBits VulkanDeviceCreateFlagsKHR
VulkanDeviceCreateFlagsKHR -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: VulkanDeviceCreateFlagsKHR -> Int
$ccountTrailingZeros :: VulkanDeviceCreateFlagsKHR -> Int
countLeadingZeros :: VulkanDeviceCreateFlagsKHR -> Int
$ccountLeadingZeros :: VulkanDeviceCreateFlagsKHR -> Int
finiteBitSize :: VulkanDeviceCreateFlagsKHR -> Int
$cfiniteBitSize :: VulkanDeviceCreateFlagsKHR -> Int
$cp1FiniteBits :: Bits VulkanDeviceCreateFlagsKHR
FiniteBits)



conNameVulkanDeviceCreateFlagsKHR :: String
conNameVulkanDeviceCreateFlagsKHR :: String
conNameVulkanDeviceCreateFlagsKHR = "VulkanDeviceCreateFlagsKHR"

enumPrefixVulkanDeviceCreateFlagsKHR :: String
enumPrefixVulkanDeviceCreateFlagsKHR :: String
enumPrefixVulkanDeviceCreateFlagsKHR = ""

showTableVulkanDeviceCreateFlagsKHR :: [(VulkanDeviceCreateFlagsKHR, String)]
showTableVulkanDeviceCreateFlagsKHR :: [(VulkanDeviceCreateFlagsKHR, String)]
showTableVulkanDeviceCreateFlagsKHR = []

instance Show VulkanDeviceCreateFlagsKHR where
  showsPrec :: Int -> VulkanDeviceCreateFlagsKHR -> ShowS
showsPrec = String
-> [(VulkanDeviceCreateFlagsKHR, String)]
-> String
-> (VulkanDeviceCreateFlagsKHR -> Flags64)
-> (Flags64 -> ShowS)
-> Int
-> VulkanDeviceCreateFlagsKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixVulkanDeviceCreateFlagsKHR
                            [(VulkanDeviceCreateFlagsKHR, String)]
showTableVulkanDeviceCreateFlagsKHR
                            String
conNameVulkanDeviceCreateFlagsKHR
                            (\(VulkanDeviceCreateFlagsKHR x :: Flags64
x) -> Flags64
x)
                            (\x :: Flags64
x -> String -> ShowS
showString "0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Flags64 -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Flags64
x)

instance Read VulkanDeviceCreateFlagsKHR where
  readPrec :: ReadPrec VulkanDeviceCreateFlagsKHR
readPrec = String
-> [(VulkanDeviceCreateFlagsKHR, String)]
-> String
-> (Flags64 -> VulkanDeviceCreateFlagsKHR)
-> ReadPrec VulkanDeviceCreateFlagsKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixVulkanDeviceCreateFlagsKHR
                          [(VulkanDeviceCreateFlagsKHR, String)]
showTableVulkanDeviceCreateFlagsKHR
                          String
conNameVulkanDeviceCreateFlagsKHR
                          Flags64 -> VulkanDeviceCreateFlagsKHR
VulkanDeviceCreateFlagsKHR


-- | XrGraphicsBindingVulkan2KHR - The graphics binding structure to be
-- passed at session creation to use Vulkan
--
-- == Valid Usage
--
-- -   @instance@ /must/ have enabled a Vulkan API version in the range
--     specified by 'getVulkanGraphicsRequirements2KHR'
--
-- -   @instance@ /must/ have been created using 'createVulkanInstanceKHR'
--
-- -   @physicalDevice@ @VkPhysicalDevice@ /must/ match the device
--     specified by 'getVulkanGraphicsDevice2KHR'
--
-- -   @device@ /must/ have been created using 'createVulkanDeviceKHR'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-XrGraphicsBindingVulkan2KHR-extension-notenabled# The @@
--     extension /must/ be enabled prior to using
--     'GraphicsBindingVulkan2KHR'
--
-- -   __Note:__ 'GraphicsBindingVulkan2KHR' is an alias for
--     'OpenXR.Extensions.XR_KHR_vulkan_enable.GraphicsBindingVulkanKHR',
--     so implicit valid usage for
--     'OpenXR.Extensions.XR_KHR_vulkan_enable.GraphicsBindingVulkanKHR'
--     has been replicated below.
--
-- -   @type@ /must/ be
--     'OpenXR.Core10.Enums.StructureType.TYPE_GRAPHICS_BINDING_VULKAN_KHR'
--
-- -   @next@ /must/ be @NULL@ or a valid pointer to the
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#valid-usage-for-structure-pointer-chains next structure in a structure chain>
--
-- -   @instance@ /must/ be a valid @VkInstance@ value
--
-- -   @physicalDevice@ /must/ be a valid @VkPhysicalDevice@ value
--
-- -   @device@ /must/ be a valid @VkDevice@ value
--
-- = See Also
--
-- 'OpenXR.Core10.Device.createSession'
type GraphicsBindingVulkan2KHR = GraphicsBindingVulkanKHR


-- | XrSwapchainImageVulkan2KHR - Vulkan-specific swapchain image structure
--
-- == Member Descriptions
--
-- = Description
--
-- If a given session was created with 'GraphicsBindingVulkan2KHR', the
-- following conditions /must/ apply.
--
-- -   Calls to 'OpenXR.Core10.Image.enumerateSwapchainImages' on an
--     'OpenXR.Core10.Handles.Swapchain' in that session /must/ return an
--     array of 'SwapchainImageVulkan2KHR' structures.
--
-- -   Whenever an OpenXR function accepts an
--     'OpenXR.Core10.Image.SwapchainImageBaseHeader' pointer as a
--     parameter in that session, the runtime /must/ also accept a pointer
--     to an 'SwapchainImageVulkan2KHR'.
--
-- The OpenXR runtime /must/ interpret the top-left corner of the swapchain
-- image as the coordinate origin unless specified otherwise by extension
-- functionality.
--
-- The OpenXR runtime /must/ interpret the swapchain images in a clip space
-- of positive Y pointing down, near Z plane at 0, and far Z plane at 1.
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-XrSwapchainImageVulkan2KHR-extension-notenabled# The @@
--     extension /must/ be enabled prior to using
--     'SwapchainImageVulkan2KHR'
--
-- -   __Note:__ 'SwapchainImageVulkan2KHR' is an alias for
--     'OpenXR.Extensions.XR_KHR_vulkan_enable.SwapchainImageVulkanKHR', so
--     implicit valid usage for
--     'OpenXR.Extensions.XR_KHR_vulkan_enable.SwapchainImageVulkanKHR' has
--     been replicated below.
--
-- -   @type@ /must/ be
--     'OpenXR.Core10.Enums.StructureType.TYPE_SWAPCHAIN_IMAGE_VULKAN_KHR'
--
-- -   @next@ /must/ be @NULL@ or a valid pointer to the
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#valid-usage-for-structure-pointer-chains next structure in a structure chain>
--
-- -   @image@ /must/ be a valid @VkImage@ value
--
-- = See Also
--
-- 'OpenXR.Core10.Image.SwapchainImageBaseHeader'
type SwapchainImageVulkan2KHR = SwapchainImageVulkanKHR


-- | XrGraphicsRequirementsVulkan2KHR - Vulkan API version requirements
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-XrGraphicsRequirementsVulkan2KHR-extension-notenabled# The @@
--     extension /must/ be enabled prior to using
--     'GraphicsRequirementsVulkan2KHR'
--
-- -   __Note:__ 'GraphicsRequirementsVulkan2KHR' is an alias for
--     'OpenXR.Extensions.XR_KHR_vulkan_enable.GraphicsRequirementsVulkanKHR',
--     so implicit valid usage for
--     'OpenXR.Extensions.XR_KHR_vulkan_enable.GraphicsRequirementsVulkanKHR'
--     has been replicated below.
--
-- -   @type@ /must/ be
--     'OpenXR.Core10.Enums.StructureType.TYPE_GRAPHICS_REQUIREMENTS_VULKAN_KHR'
--
-- -   @next@ /must/ be @NULL@ or a valid pointer to the
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#valid-usage-for-structure-pointer-chains next structure in a structure chain>
--
-- = See Also
--
-- 'getVulkanGraphicsRequirements2KHR'
type GraphicsRequirementsVulkan2KHR = GraphicsRequirementsVulkanKHR


type KHR_vulkan_enable2_SPEC_VERSION = 1

-- No documentation found for TopLevel "XR_KHR_vulkan_enable2_SPEC_VERSION"
pattern KHR_vulkan_enable2_SPEC_VERSION :: forall a . Integral a => a
pattern $bKHR_vulkan_enable2_SPEC_VERSION :: a
$mKHR_vulkan_enable2_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
KHR_vulkan_enable2_SPEC_VERSION = 1


type KHR_VULKAN_ENABLE2_EXTENSION_NAME = "XR_KHR_vulkan_enable2"

-- No documentation found for TopLevel "XR_KHR_VULKAN_ENABLE2_EXTENSION_NAME"
pattern KHR_VULKAN_ENABLE2_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bKHR_VULKAN_ENABLE2_EXTENSION_NAME :: a
$mKHR_VULKAN_ENABLE2_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
KHR_VULKAN_ENABLE2_EXTENSION_NAME = "XR_KHR_vulkan_enable2"