{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_direct_mode_display ( releaseDisplayEXT
, EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION
, pattern EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION
, EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME
, pattern EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME
, DisplayKHR(..)
) where
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import GHC.IO (throwIO)
import GHC.Ptr (nullFunPtr)
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import Vulkan.Extensions.Handles (DisplayKHR)
import Vulkan.Extensions.Handles (DisplayKHR(..))
import Vulkan.Dynamic (InstanceCmds(pVkReleaseDisplayEXT))
import Vulkan.Core10.Handles (PhysicalDevice)
import Vulkan.Core10.Handles (PhysicalDevice(..))
import Vulkan.Core10.Handles (PhysicalDevice(PhysicalDevice))
import Vulkan.Core10.Handles (PhysicalDevice_T)
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Extensions.Handles (DisplayKHR(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkReleaseDisplayEXT
:: FunPtr (Ptr PhysicalDevice_T -> DisplayKHR -> IO Result) -> Ptr PhysicalDevice_T -> DisplayKHR -> IO Result
releaseDisplayEXT :: forall io
. (MonadIO io)
=>
PhysicalDevice
->
DisplayKHR
-> io ()
releaseDisplayEXT :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice -> DisplayKHR -> io ()
releaseDisplayEXT PhysicalDevice
physicalDevice DisplayKHR
display = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let vkReleaseDisplayEXTPtr :: FunPtr (Ptr PhysicalDevice_T -> DisplayKHR -> IO Result)
vkReleaseDisplayEXTPtr = InstanceCmds
-> FunPtr (Ptr PhysicalDevice_T -> DisplayKHR -> IO Result)
pVkReleaseDisplayEXT (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
$sel:instanceCmds:PhysicalDevice :: PhysicalDevice -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr (Ptr PhysicalDevice_T -> DisplayKHR -> IO Result)
vkReleaseDisplayEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkReleaseDisplayEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkReleaseDisplayEXT' :: Ptr PhysicalDevice_T -> DisplayKHR -> IO Result
vkReleaseDisplayEXT' = FunPtr (Ptr PhysicalDevice_T -> DisplayKHR -> IO Result)
-> Ptr PhysicalDevice_T -> DisplayKHR -> IO Result
mkVkReleaseDisplayEXT FunPtr (Ptr PhysicalDevice_T -> DisplayKHR -> IO Result)
vkReleaseDisplayEXTPtr
Result
_ <- forall a. String -> IO a -> IO a
traceAroundEvent String
"vkReleaseDisplayEXT" (Ptr PhysicalDevice_T -> DisplayKHR -> IO Result
vkReleaseDisplayEXT'
(PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice))
(DisplayKHR
display))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()
type EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION = 1
pattern EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_DIRECT_MODE_DISPLAY_SPEC_VERSION :: forall a. Integral a => a
$mEXT_DIRECT_MODE_DISPLAY_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION = 1
type EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME = "VK_EXT_direct_mode_display"
pattern EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME = "VK_EXT_direct_mode_display"