{-# language CPP #-}
module Graphics.Vulkan.Extensions.VK_EXT_debug_report ( createDebugReportCallbackEXT
, withDebugReportCallbackEXT
, destroyDebugReportCallbackEXT
, debugReportMessageEXT
, pattern STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT
, DebugReportCallbackCreateInfoEXT(..)
, DebugReportFlagBitsEXT( DEBUG_REPORT_INFORMATION_BIT_EXT
, DEBUG_REPORT_WARNING_BIT_EXT
, DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT
, DEBUG_REPORT_ERROR_BIT_EXT
, DEBUG_REPORT_DEBUG_BIT_EXT
, ..
)
, DebugReportFlagsEXT
, DebugReportObjectTypeEXT( DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT
, DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT
, DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT
, DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT
, DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT
, DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT
, DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT
, DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT
, DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT
, DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT
, DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT
, DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT
, DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT
, DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT
, DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT
, DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT
, DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT
, DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT
, DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT
, DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT
, DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT
, DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT
, DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT
, DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT
, DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT
, DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT
, DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT
, DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT
, DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT
, DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT
, DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT
, DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT
, DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT
, DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT
, DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT
, ..
)
, PFN_vkDebugReportCallbackEXT
, FN_vkDebugReportCallbackEXT
, EXT_DEBUG_REPORT_SPEC_VERSION
, pattern EXT_DEBUG_REPORT_SPEC_VERSION
, EXT_DEBUG_REPORT_EXTENSION_NAME
, pattern EXT_DEBUG_REPORT_EXTENSION_NAME
, DebugReportCallbackEXT(..)
) where
import Control.Exception.Base (bracket)
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 Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Numeric (showHex)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Data.ByteString (useAsCString)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Foreign.C.Types (CChar(..))
import Foreign.C.Types (CSize(..))
import Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.C.Types (CChar)
import Foreign.C.Types (CSize)
import Foreign.C.Types (CSize(CSize))
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import Data.Int (Int32)
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import Data.Word (Word64)
import Text.Read.Lex (Lexeme(Ident))
import Data.ByteString (ByteString)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Graphics.Vulkan.NamedType ((:::))
import Graphics.Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Graphics.Vulkan.Core10.BaseType (Bool32)
import Graphics.Vulkan.Extensions.Handles (DebugReportCallbackEXT)
import Graphics.Vulkan.Extensions.Handles (DebugReportCallbackEXT(..))
import Graphics.Vulkan.Core10.BaseType (Flags)
import Graphics.Vulkan.CStruct (FromCStruct)
import Graphics.Vulkan.CStruct (FromCStruct(..))
import Graphics.Vulkan.Core10.Handles (Instance)
import Graphics.Vulkan.Core10.Handles (Instance(..))
import Graphics.Vulkan.Dynamic (InstanceCmds(pVkCreateDebugReportCallbackEXT))
import Graphics.Vulkan.Dynamic (InstanceCmds(pVkDebugReportMessageEXT))
import Graphics.Vulkan.Dynamic (InstanceCmds(pVkDestroyDebugReportCallbackEXT))
import Graphics.Vulkan.Core10.Handles (Instance_T)
import Graphics.Vulkan.Core10.Enums.Result (Result)
import Graphics.Vulkan.Core10.Enums.Result (Result(..))
import Graphics.Vulkan.Core10.Enums.StructureType (StructureType)
import Graphics.Vulkan.CStruct (ToCStruct)
import Graphics.Vulkan.CStruct (ToCStruct(..))
import Graphics.Vulkan.Exception (VulkanException(..))
import Graphics.Vulkan.Zero (Zero)
import Graphics.Vulkan.Zero (Zero(..))
import Graphics.Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT))
import Graphics.Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Graphics.Vulkan.Extensions.Handles (DebugReportCallbackEXT(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCreateDebugReportCallbackEXT
:: FunPtr (Ptr Instance_T -> Ptr DebugReportCallbackCreateInfoEXT -> Ptr AllocationCallbacks -> Ptr DebugReportCallbackEXT -> IO Result) -> Ptr Instance_T -> Ptr DebugReportCallbackCreateInfoEXT -> Ptr AllocationCallbacks -> Ptr DebugReportCallbackEXT -> IO Result
createDebugReportCallbackEXT :: forall io . MonadIO io => Instance -> DebugReportCallbackCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io (DebugReportCallbackEXT)
createDebugReportCallbackEXT instance' createInfo allocator = liftIO . evalContT $ do
let vkCreateDebugReportCallbackEXT' = mkVkCreateDebugReportCallbackEXT (pVkCreateDebugReportCallbackEXT (instanceCmds (instance' :: Instance)))
pCreateInfo <- ContT $ withCStruct (createInfo)
pAllocator <- case (allocator) of
Nothing -> pure nullPtr
Just j -> ContT $ withCStruct (j)
pPCallback <- ContT $ bracket (callocBytes @DebugReportCallbackEXT 8) free
r <- lift $ vkCreateDebugReportCallbackEXT' (instanceHandle (instance')) pCreateInfo pAllocator (pPCallback)
lift $ when (r < SUCCESS) (throwIO (VulkanException r))
pCallback <- lift $ peek @DebugReportCallbackEXT pPCallback
pure $ (pCallback)
withDebugReportCallbackEXT :: forall io r . MonadIO io => (io (DebugReportCallbackEXT) -> ((DebugReportCallbackEXT) -> io ()) -> r) -> Instance -> DebugReportCallbackCreateInfoEXT -> Maybe AllocationCallbacks -> r
withDebugReportCallbackEXT b instance' pCreateInfo pAllocator =
b (createDebugReportCallbackEXT instance' pCreateInfo pAllocator)
(\(o0) -> destroyDebugReportCallbackEXT instance' o0 pAllocator)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkDestroyDebugReportCallbackEXT
:: FunPtr (Ptr Instance_T -> DebugReportCallbackEXT -> Ptr AllocationCallbacks -> IO ()) -> Ptr Instance_T -> DebugReportCallbackEXT -> Ptr AllocationCallbacks -> IO ()
destroyDebugReportCallbackEXT :: forall io . MonadIO io => Instance -> DebugReportCallbackEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
destroyDebugReportCallbackEXT instance' callback allocator = liftIO . evalContT $ do
let vkDestroyDebugReportCallbackEXT' = mkVkDestroyDebugReportCallbackEXT (pVkDestroyDebugReportCallbackEXT (instanceCmds (instance' :: Instance)))
pAllocator <- case (allocator) of
Nothing -> pure nullPtr
Just j -> ContT $ withCStruct (j)
lift $ vkDestroyDebugReportCallbackEXT' (instanceHandle (instance')) (callback) pAllocator
pure $ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkDebugReportMessageEXT
:: FunPtr (Ptr Instance_T -> DebugReportFlagsEXT -> DebugReportObjectTypeEXT -> Word64 -> CSize -> Int32 -> Ptr CChar -> Ptr CChar -> IO ()) -> Ptr Instance_T -> DebugReportFlagsEXT -> DebugReportObjectTypeEXT -> Word64 -> CSize -> Int32 -> Ptr CChar -> Ptr CChar -> IO ()
debugReportMessageEXT :: forall io . MonadIO io => Instance -> DebugReportFlagsEXT -> DebugReportObjectTypeEXT -> ("object" ::: Word64) -> ("location" ::: Word64) -> ("messageCode" ::: Int32) -> ("layerPrefix" ::: ByteString) -> ("message" ::: ByteString) -> io ()
debugReportMessageEXT instance' flags objectType object location messageCode layerPrefix message = liftIO . evalContT $ do
let vkDebugReportMessageEXT' = mkVkDebugReportMessageEXT (pVkDebugReportMessageEXT (instanceCmds (instance' :: Instance)))
pLayerPrefix <- ContT $ useAsCString (layerPrefix)
pMessage <- ContT $ useAsCString (message)
lift $ vkDebugReportMessageEXT' (instanceHandle (instance')) (flags) (objectType) (object) (CSize (location)) (messageCode) pLayerPrefix pMessage
pure $ ()
pattern STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT
data DebugReportCallbackCreateInfoEXT = DebugReportCallbackCreateInfoEXT
{
flags :: DebugReportFlagsEXT
,
pfnCallback :: PFN_vkDebugReportCallbackEXT
,
userData :: Ptr ()
}
deriving (Typeable)
deriving instance Show DebugReportCallbackCreateInfoEXT
instance ToCStruct DebugReportCallbackCreateInfoEXT where
withCStruct x f = allocaBytesAligned 40 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p DebugReportCallbackCreateInfoEXT{..} f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
poke ((p `plusPtr` 16 :: Ptr DebugReportFlagsEXT)) (flags)
poke ((p `plusPtr` 24 :: Ptr PFN_vkDebugReportCallbackEXT)) (pfnCallback)
poke ((p `plusPtr` 32 :: Ptr (Ptr ()))) (userData)
f
cStructSize = 40
cStructAlignment = 8
pokeZeroCStruct p f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
poke ((p `plusPtr` 24 :: Ptr PFN_vkDebugReportCallbackEXT)) (zero)
f
instance FromCStruct DebugReportCallbackCreateInfoEXT where
peekCStruct p = do
flags <- peek @DebugReportFlagsEXT ((p `plusPtr` 16 :: Ptr DebugReportFlagsEXT))
pfnCallback <- peek @PFN_vkDebugReportCallbackEXT ((p `plusPtr` 24 :: Ptr PFN_vkDebugReportCallbackEXT))
pUserData <- peek @(Ptr ()) ((p `plusPtr` 32 :: Ptr (Ptr ())))
pure $ DebugReportCallbackCreateInfoEXT
flags pfnCallback pUserData
instance Storable DebugReportCallbackCreateInfoEXT where
sizeOf ~_ = 40
alignment ~_ = 8
peek = peekCStruct
poke ptr poked = pokeCStruct ptr poked (pure ())
instance Zero DebugReportCallbackCreateInfoEXT where
zero = DebugReportCallbackCreateInfoEXT
zero
zero
zero
newtype DebugReportFlagBitsEXT = DebugReportFlagBitsEXT Flags
deriving newtype (Eq, Ord, Storable, Zero, Bits)
pattern DEBUG_REPORT_INFORMATION_BIT_EXT = DebugReportFlagBitsEXT 0x00000001
pattern DEBUG_REPORT_WARNING_BIT_EXT = DebugReportFlagBitsEXT 0x00000002
pattern DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = DebugReportFlagBitsEXT 0x00000004
pattern DEBUG_REPORT_ERROR_BIT_EXT = DebugReportFlagBitsEXT 0x00000008
pattern DEBUG_REPORT_DEBUG_BIT_EXT = DebugReportFlagBitsEXT 0x00000010
type DebugReportFlagsEXT = DebugReportFlagBitsEXT
instance Show DebugReportFlagBitsEXT where
showsPrec p = \case
DEBUG_REPORT_INFORMATION_BIT_EXT -> showString "DEBUG_REPORT_INFORMATION_BIT_EXT"
DEBUG_REPORT_WARNING_BIT_EXT -> showString "DEBUG_REPORT_WARNING_BIT_EXT"
DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT -> showString "DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT"
DEBUG_REPORT_ERROR_BIT_EXT -> showString "DEBUG_REPORT_ERROR_BIT_EXT"
DEBUG_REPORT_DEBUG_BIT_EXT -> showString "DEBUG_REPORT_DEBUG_BIT_EXT"
DebugReportFlagBitsEXT x -> showParen (p >= 11) (showString "DebugReportFlagBitsEXT 0x" . showHex x)
instance Read DebugReportFlagBitsEXT where
readPrec = parens (choose [("DEBUG_REPORT_INFORMATION_BIT_EXT", pure DEBUG_REPORT_INFORMATION_BIT_EXT)
, ("DEBUG_REPORT_WARNING_BIT_EXT", pure DEBUG_REPORT_WARNING_BIT_EXT)
, ("DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT", pure DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT)
, ("DEBUG_REPORT_ERROR_BIT_EXT", pure DEBUG_REPORT_ERROR_BIT_EXT)
, ("DEBUG_REPORT_DEBUG_BIT_EXT", pure DEBUG_REPORT_DEBUG_BIT_EXT)]
+++
prec 10 (do
expectP (Ident "DebugReportFlagBitsEXT")
v <- step readPrec
pure (DebugReportFlagBitsEXT v)))
newtype DebugReportObjectTypeEXT = DebugReportObjectTypeEXT Int32
deriving newtype (Eq, Ord, Storable, Zero)
pattern DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = DebugReportObjectTypeEXT 0
pattern DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = DebugReportObjectTypeEXT 1
pattern DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = DebugReportObjectTypeEXT 2
pattern DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = DebugReportObjectTypeEXT 3
pattern DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = DebugReportObjectTypeEXT 4
pattern DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = DebugReportObjectTypeEXT 5
pattern DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = DebugReportObjectTypeEXT 6
pattern DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = DebugReportObjectTypeEXT 7
pattern DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = DebugReportObjectTypeEXT 8
pattern DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = DebugReportObjectTypeEXT 9
pattern DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = DebugReportObjectTypeEXT 10
pattern DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = DebugReportObjectTypeEXT 11
pattern DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = DebugReportObjectTypeEXT 12
pattern DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = DebugReportObjectTypeEXT 13
pattern DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = DebugReportObjectTypeEXT 14
pattern DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = DebugReportObjectTypeEXT 15
pattern DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = DebugReportObjectTypeEXT 16
pattern DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = DebugReportObjectTypeEXT 17
pattern DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = DebugReportObjectTypeEXT 18
pattern DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = DebugReportObjectTypeEXT 19
pattern DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = DebugReportObjectTypeEXT 20
pattern DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = DebugReportObjectTypeEXT 21
pattern DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = DebugReportObjectTypeEXT 22
pattern DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = DebugReportObjectTypeEXT 23
pattern DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = DebugReportObjectTypeEXT 24
pattern DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = DebugReportObjectTypeEXT 25
pattern DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = DebugReportObjectTypeEXT 26
pattern DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = DebugReportObjectTypeEXT 27
pattern DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = DebugReportObjectTypeEXT 28
pattern DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = DebugReportObjectTypeEXT 29
pattern DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = DebugReportObjectTypeEXT 30
pattern DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT = DebugReportObjectTypeEXT 33
pattern DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT = DebugReportObjectTypeEXT 1000156000
pattern DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT = DebugReportObjectTypeEXT 1000165000
pattern DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT = DebugReportObjectTypeEXT 1000085000
{-# complete DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT,
DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT,
DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT,
DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT,
DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT,
DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT,
DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT,
DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT,
DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT,
DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT,
DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT,
DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT,
DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT,
DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT,
DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT,
DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT,
DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT,
DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT,
DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT,
DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT,
DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT,
DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT,
DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT,
DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT,
DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT,
DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT,
DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT,
DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT,
DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT,
DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT,
DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT,
DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT,
DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT :: DebugReportObjectTypeEXT #-}
instance Show DebugReportObjectTypeEXT where
showsPrec p = \case
DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT"
DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT"
DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT"
DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT"
DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT"
DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT"
DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT"
DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT"
DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT"
DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT"
DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT"
DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT"
DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT"
DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT"
DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT"
DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT"
DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT"
DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT"
DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT"
DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT"
DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT"
DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT"
DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT"
DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT"
DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT"
DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT"
DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT"
DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT"
DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT"
DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT"
DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT"
DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT"
DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT"
DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT"
DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT -> showString "DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT"
DebugReportObjectTypeEXT x -> showParen (p >= 11) (showString "DebugReportObjectTypeEXT " . showsPrec 11 x)
instance Read DebugReportObjectTypeEXT where
readPrec = parens (choose [("DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT", pure DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT", pure DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT", pure DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT", pure DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT", pure DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT", pure DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT", pure DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT", pure DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT", pure DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT", pure DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT", pure DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT", pure DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT", pure DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT", pure DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT", pure DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT", pure DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT", pure DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT", pure DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT", pure DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT", pure DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT", pure DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT", pure DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT", pure DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT", pure DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT", pure DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT", pure DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT", pure DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT", pure DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT", pure DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT", pure DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT", pure DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT", pure DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT", pure DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT", pure DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT)
, ("DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT", pure DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT)]
+++
prec 10 (do
expectP (Ident "DebugReportObjectTypeEXT")
v <- step readPrec
pure (DebugReportObjectTypeEXT v)))
type FN_vkDebugReportCallbackEXT = DebugReportFlagsEXT -> DebugReportObjectTypeEXT -> ("object" ::: Word64) -> ("location" ::: CSize) -> ("messageCode" ::: Int32) -> ("pLayerPrefix" ::: Ptr CChar) -> ("pMessage" ::: Ptr CChar) -> ("pUserData" ::: Ptr ()) -> IO Bool32
type PFN_vkDebugReportCallbackEXT = FunPtr FN_vkDebugReportCallbackEXT
type EXT_DEBUG_REPORT_SPEC_VERSION = 9
pattern EXT_DEBUG_REPORT_SPEC_VERSION :: forall a . Integral a => a
pattern EXT_DEBUG_REPORT_SPEC_VERSION = 9
type EXT_DEBUG_REPORT_EXTENSION_NAME = "VK_EXT_debug_report"
pattern EXT_DEBUG_REPORT_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern EXT_DEBUG_REPORT_EXTENSION_NAME = "VK_EXT_debug_report"