module Vulkan.Utils.Debug
( debugCallbackPtr
, debugCallbackFatalPtr
, nameObject
) where
import Control.Monad.IO.Class
import Data.ByteString
import Vulkan.Core10
import Vulkan.Extensions.VK_EXT_debug_utils
foreign import ccall unsafe "DebugCallback.c &debugCallback"
debugCallbackPtr :: PFN_vkDebugUtilsMessengerCallbackEXT
foreign import ccall unsafe "DebugCallback.c &debugCallbackFatal"
debugCallbackFatalPtr :: PFN_vkDebugUtilsMessengerCallbackEXT
nameObject :: (HasObjectType a, MonadIO m) => Device -> a -> ByteString -> m ()
nameObject :: Device -> a -> ByteString -> m ()
nameObject device :: Device
device object :: a
object name :: ByteString
name = Device -> DebugUtilsObjectNameInfoEXT -> m ()
forall (io :: * -> *).
MonadIO io =>
Device -> DebugUtilsObjectNameInfoEXT -> io ()
setDebugUtilsObjectNameEXT
Device
device
((ObjectType
-> Word64 -> Maybe ByteString -> DebugUtilsObjectNameInfoEXT)
-> (ObjectType, Word64)
-> Maybe ByteString
-> DebugUtilsObjectNameInfoEXT
forall a b c. (a -> b -> c) -> (a, b) -> c
uncurry ObjectType
-> Word64 -> Maybe ByteString -> DebugUtilsObjectNameInfoEXT
DebugUtilsObjectNameInfoEXT (a -> (ObjectType, Word64)
forall a. HasObjectType a => a -> (ObjectType, Word64)
objectTypeAndHandle a
object) (ByteString -> Maybe ByteString
forall a. a -> Maybe a
Just ByteString
name))