-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Utils for the vulkan package -- -- Utils for the vulkan package @package vulkan-utils @version 0.1.3 module Vulkan.Utils.Debug -- | A debug callback which prints the message prefixed with "Validation: " -- to stderr. debugCallbackPtr :: PFN_vkDebugUtilsMessengerCallbackEXT -- | A debug callback the same as debugCallbackPtr except it will -- call abort when -- VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT is set. debugCallbackFatalPtr :: PFN_vkDebugUtilsMessengerCallbackEXT -- | Assign a name to a handle using setDebugUtilsObjectNameEXT, -- note that the VK_EXT_debug_utils extension must be enabled. nameObject :: (HasObjectType a, MonadIO m) => Device -> a -> ByteString -> m () module Vulkan.Utils.FromGL -- | Convert an OpenGL format enum into a Format -- --
--   >>> internalFormat 0x8051
--   Just FORMAT_R8G8B8_UNORM
--   
internalFormat :: (Eq a, Num a) => a -> Maybe Format module Vulkan.Utils.ShaderQQ.Interpolate -- | interpExp performs very simple interpolation of Haskell values -- into Strings. -- -- -- --
--   >>> let foo = 123 in $(interpExp "hello, $foo")
--   "hello, 123"
--   
-- --
--   >>> let foo = "world" in $(interpExp "hello, \\$foo")
--   "hello, $foo"
--   
-- --
--   >>> let foo = "world" in $(interpExp "hello\r\n\rworld")
--   "hello\r\n\rworld"
--   
interpExp :: String -> Q Exp module Vulkan.Utils.ShaderQQ -- | glsl is a QuasiQuoter which produces GLSL source code with -- #line directives inserted so that error locations point to -- the correct location in the Haskell source file. It also permits basic -- string interpolation. -- -- -- -- It is intended to be used in concert with compileShaderQ like -- so -- --
--   myConstant = 3.141 -- Note that this will have to be in a different module
--   myFragmentShader = $(compileShaderQ "frag" [glsl|
--     #version 450
--     const float myConstant = ${myConstant};
--     main (){
--     }
--   |])
--   
-- -- An explicit example (interactive is from doctest): -- --
--   >>> let version = 450 :: Int in [glsl|#version $version|]
--   "#version 450\n#extension GL_GOOGLE_cpp_style_line_directive : enable\n#line 32 \"<interactive>\"\n"
--   
-- -- Note that line number will be thrown off if any of the interpolated -- variables contain newlines. glsl :: QuasiQuoter -- | QuasiQuoter for creating a compute shader. -- -- Equivalent to calling $(compileShaderQ "comp" [glsl|...|]) -- without interpolation support. comp :: QuasiQuoter -- | QuasiQuoter for creating a fragment shader. -- -- Equivalent to calling $(compileShaderQ "frag" [glsl|...|]) -- without interpolation support. frag :: QuasiQuoter -- | QuasiQuoter for creating a geometry shader. -- -- Equivalent to calling $(compileShaderQ "geom" [glsl|...|]) -- without interpolation support. geom :: QuasiQuoter -- | QuasiQuoter for creating a tessellation control shader. -- -- Equivalent to calling $(compileShaderQ "tesc" [glsl|...|]) -- without interpolation support. tesc :: QuasiQuoter -- | QuasiQuoter for creating a tessellation evaluation shader. -- -- Equivalent to calling $(compileShaderQ "tese" [glsl|...|]) -- without interpolation support. tese :: QuasiQuoter -- | QuasiQuoter for creating a vertex shader. -- -- Equivalent to calling $(compileShaderQ "vert" [glsl|...|]) -- without interpolation support. vert :: QuasiQuoter type GLSLError = String type GLSLWarning = String -- | Compile a glsl shader to spir-v using glslangValidator. -- -- Messages are converted to GHC warnings or errors depending on -- compilation success. compileShaderQ :: String -> String -> Q Exp -- | Compile a glsl shader to spir-v using glslangValidator compileShader :: MonadIO m => Maybe Loc -> String -> String -> m ([GLSLWarning], Either [GLSLError] ByteString) processValidatorMessages :: ByteString -> ([GLSLWarning], [GLSLError])