úÎ#?@ABCDEFGHIJKLMN O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f None."#$%&',-./145689;=>?FHIMPSUVX_`dghklmq&† vulkan-utils‹Create an expression which checks the function pointers for all the Vulkan commands depended upon by the specified list of function names.YIt returns a list of function names corresponding to those functions with null pointers.‹Your program can use this function to fail early if a command couldn't be loaded for some reason (missing extension or layer for example).!One can create a function called  checkCommands with the following: M [d| checkCommands = $(checkCommandsExp ['withInstance, 'cmdDraw, ...]) |] It has the type 'IsString a => Instance -> Device -> [a]It looks basically like ôinst dev -> [ name | True <- [ nullFunPtr == pVkCreateDevice inst , nullFunPtr == pVkCreateFence dev .. ] | name <- [ "vkCreateDevice" , "vkCreateFence" .. ] ] g vulkan-utilsqGiven instance and device accessors and a function, find the function pointer accessor names which it depends onZcommandNames ['pVkCreateDevice, 'pVkDestroyDevice] ['pVkCreateFence] (mkName "withDevice")X[InstanceCmd Vulkan.Dynamic.pVkCreateDevice,InstanceCmd Vulkan.Dynamic.pVkDestroyDevice]h vulkan-utilsGet the C name of a function6commandString (DeviceCmd (mkName "pVkCreateInstance"))"vkCreateInstance"i vulkan-utilsgA list of potential sets of vulkan commands this name depends on, not all of them will be valid names.commandCandidates "withDevice"J["pVkAllocateDevice","pVkFreeDevice","pVkCreateDevice","pVkDestroyDevice"]&commandCandidates "waitSemaphoresSafe"["pVkWaitSemaphores"] commandCandidates "useCmdBuffer"'["pVkBeginCmdBuffer","pVkEndCmdBuffer"]!commandCandidates "withSemaphore"V["pVkAllocateSemaphore","pVkFreeSemaphore","pVkCreateSemaphore","pVkDestroySemaphore"]j vulkan-utils"Get the record accessors of a type.$(lift . fmap show =<< accessorNames ''Device)I["Vulkan.Core10.Handles.deviceHandle","Vulkan.Core10.Handles.deviceCmds"] vulkan-utils The names of functions from the vulkan' package. Unknown commands are ignoredNone*"#$%&',-./145689;=>?FHIMPSUVX_dghklmq-w vulkan-utilsA debug callback the same as  except it will call abort when -VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT is set. vulkan-utilsRA debug callback which prints the message prefixed with "Validation: " to stderr. vulkan-utils Assign a name to a handle using k, note that the VK_EXT_debug_utils extension must be enabled.None+"#$%&',-./145689;=>?FHIMPSUVX_dghklmq0¬ vulkan-utils%Convert an OpenGL format enum into a linternalFormat 0x8051Just FORMAT_R8G8B8_UNORM None*"#$%&',-./145689;=>?FHIMPSUVX_dghklmq2:mnopNone*"#$%&',-./145689;=>?FHIMPSUVX_dghklmqG vulkan-utils]From a list of things, take all the required things and as many optional things as possible. vulkan-utilsLike .lWill throw an 'IOError in the case of missing things. Details on missing things will be reported in stderr.5This is useful in dealing with layers and extensions.  vulkan-utils/Show valies as a union of their individual bitsshowBits @Int 5 "1 .|. 4"showBits @Int 0 "zeroBits"(import Vulkan.Core10.Enums.QueueFlagBits3showBits (QUEUE_COMPUTE_BIT .|. QUEUE_GRAPHICS_BIT)*"QUEUE_GRAPHICS_BIT .|. QUEUE_COMPUTE_BIT"q vulkan-utilsThe list of bits which are set  vulkan-utils-Check if the intersection of bits is non-zero vulkan-utilsWhat do we have available vulkan-utilsOptional desired elements vulkan-utilsRequired desired elements vulkan-utils„(Missing optional elements, Either (missing required elements) or (all required elements and as many optional elements as possible) vulkan-utils.What are we sorting (Used for a debug message) vulkan-utilsWhat do we have available vulkan-utilsOptional desired elements vulkan-utilsRequired desired elements vulkan-utilsqAll the required elements and as many optional elements as possible, as well as the missing optional elements.  None*"#$%&',-./145689;=>?FHIMPSUVX_dghklmqlè vulkan-utilsRequirements for a r to be assigned a family by .+To assign to a specific queue family index f: )queueSpecFamilyPredicate = i _ -> i == f @To assign to any queue family which supports compute operations: wlet isComputeQueue q = QUEUE_COMPUTE_BIT .&&. queueFlags q in QueueSpec priority (_index q -> pure (isComputeQueue q))  vulkan-utilsGiven a s‹ and a set of requirements for queues, calculate an assignment of queues to queue families and return information with which to create a t. and also a function to extract the requested rs from the device.,You may want to create a custom type with a u% instance to store your queues like: ÿŠdata MyQueues q = MyQueues { computeQueue :: q , graphicsAndPresentQueue :: q , transferQueue :: q } myQueueSpecs :: MyQueues QueueSpec myQueueSpecs = MyQueues { computeQueue = QueueSpec 0.5 isComputeQueueFamily , graphicsAndPresentQueue = QueueSpec 1 isPresentQueueFamily , transferQueue = QueueSpec 1 isTransferOnlyQueueFamily } rNote, this doesn't permit differentiating queue family assignment based on whether or not the queue is protected. vulkan-utilsDoes this queue have v set and not w or x vulkan-utils<Can this queue family present to this surface on this devicey vulkan-utils6Find all possible valid assignments for elements of a u with some limited resources.assign @[] @_ @() [("a", 1)] [][[]]Iassign @[] [("hi", 1), ("foo", 3)] [Just, Just . reverse, Just . take 1 ]G[["hi","oof","f"],["foo","ih","f"],["foo","oof","h"],["foo","oof","f"]]žassign @[] [("a", 1), ("b", 2)] [\case {"a" -> Just 1; "b" -> Just 2; _ -> Nothing}, \case {"b" -> Just 3; _ -> Nothing}, \case {"a" -> Just 4; _ -> Nothing}] [[2,3,4]]z vulkan-utilsvSelect an element from the list according to some predicate, and return that element along with the decremented list. vulkan-utilsA set of requirements for rs to be created vulkan-utils A set of { s to pass to |$A function to extract the requested r s from the t created with the {s}* if it wasn't possible to satisfy all the sy vulkan-utilsHow many of each ~ are available vulkan-utilsWhich ~s can each element use vulkan-utilsYA list of assignments, each element in this list has the length of the requirements list  None-"#$%&',-./145689;=>?FHIMPSUVX_dghklmq‘ vulkan-utilsMEnough information to focus on any structure within a Vulkan structure chain.€ vulkan-utils\If the given structure can be found within a chain, return a lens to it. Otherwise, return }. vulkan-utilsIs this chain empty?% vulkan-utils The minimum value to be accepted& vulkan-utilsThe value we got, less than unsatisfiedMinumum( vulkan-utilsAll the requirements were met) vulkan-utils_Didn't attempt this check because it required getPhysicalDeviceProperties2 which wasn't loaded* vulkan-utils]Didn't attempt this check because it required getPhysicalDeviceFeatures2 which wasn't loaded+ vulkan-utilsA Layer was not found, vulkan-utils2A device version didn't meet the minimum requested- vulkan-utils6The instance version didn't meet the minimum requested. vulkan-utils1A layer version didn't meet the minimum requested/ vulkan-utilsA feature was missing0 vulkan-utils&A propery was not an appropriate value1 vulkan-utilsA device extension was missing2 vulkan-utilsEA device extension was found but the version didn't meet requirements3 vulkan-utils!An instance extension was missing4 vulkan-utilsHAn instance extension was found but the version didn't meet requirements‚ vulkan-utilsPInsert the settings of the requirements in to the provided instance create infoƒ vulkan-utils Generate „ from some requirements.KThe returned struct chain will enable all required features and extensions.7 vulkan-utilsbGenerate a string describing which requirements were not met, if everything was satisfied return }.… vulkan-utils/Make a lookup function for extensions in layers† vulkan-utils#There is no Semigroup instance for ‡ in base5 vulkan-utilsRequired requests vulkan-utilsOptional requests vulkan-utilsAn ˆC, this will be returned appropriately modified by the requirements6 vulkan-utilsRequired requests vulkan-utilsOptional requests vulkan-utilsnA deviceCreateInfo with no extensions. If you need elements in the struct chain you can add them later with ‰Š vulkan-utilsLookup an extension vulkan-utilsThe requirement to test vulkan-utils The result… vulkan-utilsPass } for ‹: extensions, pass a PhysicalDevice for device extensions.#$%&'(-.+43,)/*021567856'(-.+43,)/*021#$%&78None+ "#$%&',-./145689;=>?FHIMPSUVX_dghklmq­®B vulkan-utilsLike C: except it will create a debug utils messenger (from the VK_EXT_debug_utils extension).If the VK_EXT_validation_features extension (from the VK_LAYER_KHRONOS_validationP layer) is available is it will be enabled and best practices messages enabled.C vulkan-utils+Create an 'Instance from some requirements.€Will throw an 'IOError in the case of unsatisfied non-optional requirements. Unsatisfied requirements will be listed on stderr.D vulkan-utils Create a t from some requirements.€Will throw an 'IOError in the case of unsatisfied non-optional requirements. Unsatisfied requirements will be listed on stderr.E vulkan-utils Get a single s! deciding with a scoring functionÅPass a function which will extract any required values from a device in the spirit of parse-don't-validate. Also provide a function to compare these results for sorting multiple suitable devices.–As an example, the suitability function could return a tuple of device memory and the compute queue family index, and the scoring function could be ŒC to select devices based on their memory capacity. Consider using  : to find your desired queues in the suitability function.%Pehaps also use the functionality in  and return the „ too.)If no devices are deemed suitable then a  NoSuchThing  is thrown.F vulkan-utilsExtract the name of a s with ŽB vulkan-utilsRequired vulkan-utilsOptionalC vulkan-utilsRequired vulkan-utilsOptionalD vulkan-utilsRequired vulkan-utilsOptionalE vulkan-utilsA suitability funcion for a s, } if it is not to be chosen. vulkan-utils$Scoring function to rate this result vulkan-utilsThe score and the deviceBCDEFCBDEFNone-"#$%&',-./145689;=>?FHIMPSUVX_dghklmqÒ«G vulkan-utils/Parse a requirement and produce an appropriate DeviceVersionRequirement s are specified by in the form  major. minor[. patch]DeviceFeatureRequirements are specified in the form  typename.<member name> and produce a % which checks and sets this feature.DevicePropertyRequirementvs are specified like feature requirements except with an additional description of the constraint. This may be any of myFunctioNameO: To check with an in-scope function taking the property type and returning ‘> 1234: To indicate a minimum bound on a integral property>= 123?: To indicate an inclusive minimum bound on a integral property& SOMETHING_BITL: To indicate that the specified bit must be present in the bitmask valueDeviceExtensionRequirements are specified in the form  extensionname optionalversion.  extensionname must start with VK_,. The version will be compared against the  specVersion field of the ExtensionProperties record.Names may be qualified.8The separator between the type and member can be any of . :: : -> or any amount of spaceMlet r = [req|PhysicalDeviceRayTracingPipelineFeaturesKHR.rayTracingPipeline|] featureName r@"PhysicalDeviceRayTracingPipelineFeaturesKHR.rayTracingPipeline"7let r = [req|PhysicalDeviceVulkan11Features.multiview|] featureName r*"PhysicalDeviceVulkan11Features.multiview"8let r = [req|PhysicalDeviceMultiviewFeatures.multiview|] featureName r+"PhysicalDeviceMultiviewFeatures.multiview"H vulkan-utilsLike HB except that this parses a list of newline separated requirements It ignores Blank linesLines beginning with -- or #’ vulkan-utilsparse ""Nothingparse "Foo->bar"Just (Feature ["Foo"] "bar")parse "V.Foo.bar" Just (Feature ["V","Foo"] "bar")parse "V.E.Foo bar"$Just (Feature ["V","E","Foo"] "bar") parse "1.2"Just (Version 4202496) parse "1 2 1"Just (Version 4202497)parse "Foo.bar >= 10"&Just (Property ["Foo"] "bar" (GTE 10))parse "V.Foo.bar & A.B.C_BIT"<Just (Property ["V","Foo"] "bar" (AndBit ["A","B","C_BIT"]))parse "V.Foo.bar even"0Just (Property ["V","Foo"] "bar" (Fun ["even"]))parse "V.Foo.bar Prelude.even":Just (Property ["V","Foo"] "bar" (Fun ["Prelude","even"]))“ vulkan-utils3Filters blank or commented lines, remove duplicatesGHGH None-"#$%&',-./145689;=>?FHIMPSUVX_dghklmqæ)N vulkan-utilsN< performs very simple interpolation of Haskell values into ”s.)Interpolated variables are prefixed with $3They can optionally be surrounded with braces like ${foo}5Interpolated variables are converted to strings with • To escape a $ use \$+let foo = 123 in $(interpExp "hello, $foo") "hello, 123"1let foo = "world" in $(interpExp "hello, \\$foo") "hello, $foo"4let foo = "world" in $(interpExp "hello\r\n\rworld")"hello\r\n\rworld"– vulkan-utils=Extract variables and literals from string to be interpolatedparse ""[]parse "hello $world"[Right "hello ",Left "world"]parse "$hello$world"eft "hello",Left "world"] parse "$" [Right "$"] parse "hi" [Right "hi"] parse "h$hi"[Right "h",Left "hi"] parse "$$hi"[Right "$",Left "hi"] parse "$1" [Right "$1"] parse "$$$" [Right "$$$"] parse "\\" [Right "\\"] parse "\\$" [Right "$"] parse "\\$hi" [Right "$hi"]parse "\\\\$hi"[Right "\\$hi"] parse "\\hi"[Right "\\hi"]parse "$hi\\$foo"[Left "hi",Right "$foo"]parse "hello, \\$foo"[Right "hello, $foo"]parse "${fo'o}bar"[Left "fo'o",Right "bar"] parse "\\" [Right "\\"] parse "\\\\$" [Right "\\$"] parse "$" [Right "$"]NN None*"#$%&',-./145689;=>?FHIMPSUVX_dghklmq Ž Q vulkan-utilsQ7 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.)Interpolated variables are prefixed with $3They can optionally be surrounded with braces like ${foo}5Interpolated variables are converted to strings with • To escape a $ use \$*It is intended to be used in concert with X 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):5let version = 450 :: Int in [glsl|#version $version|]d"#version 450\n#extension GL_GOOGLE_cpp_style_line_directive : enable\n#line 46 \"<interactive>\"\n"`Note that line number will be thrown off if any of the interpolated variables contain newlines.R vulkan-utils*QuasiQuoter for creating a compute shader.Equivalent to calling $$(compileShaderQ "comp" [glsl|...|]) without interpolation support.S vulkan-utils+QuasiQuoter for creating a fragment shader.Equivalent to calling $$(compileShaderQ "frag" [glsl|...|]) without interpolation support.T vulkan-utils+QuasiQuoter for creating a geometry shader.Equivalent to calling $$(compileShaderQ "geom" [glsl|...|]) without interpolation support.U vulkan-utils7QuasiQuoter for creating a tessellation control shader.Equivalent to calling $$(compileShaderQ "tesc" [glsl|...|]) without interpolation support.V vulkan-utils:QuasiQuoter for creating a tessellation evaluation shader.Equivalent to calling $$(compileShaderQ "tese" [glsl|...|]) without interpolation support.W vulkan-utils)QuasiQuoter for creating a vertex shader.Equivalent to calling $$(compileShaderQ "vert" [glsl|...|]) without interpolation support.X vulkan-utils7Compile a glsl shader to spir-v using glslangValidator.RMessages are converted to GHC warnings or errors depending on compilation success.Y vulkan-utils6Compile a glsl shader to spir-v using glslangValidatorX vulkan-utils"Argument to pass to `--target-env` vulkan-utilsstage vulkan-utils glsl code vulkan-utilsSpir-V bytecodeY vulkan-utilsSource location vulkan-utils"Argument to pass to `--target-env` vulkan-utilsstage vulkan-utils glsl code vulkan-utils'Spir-V bytecode with warnings or errors OPQRSTUVWXYZ QRSTUVWPOXYZ None*"#$%&',-./145689;=>?FHIMPSUVX_dghklmq3s ] vulkan-utils]9 is a QuasiQuoter which produces HLSL source code with a #line“ directive inserted so that error locations point to the correct location in the Haskell source file. It also permits basic string interpolation.)Interpolated variables are prefixed with $3They can optionally be surrounded with braces like ${foo}5Interpolated variables are converted to strings with • To escape a $ use \$*It is intended to be used in concert with d like so ÞmyConstant = 3.141 -- Note that this will have to be in a different module myFragmentShader = $(compileShaderQ "frag" [hlsl| static const float myConstant = ${myConstant}; float main (){ return myConstant; } |]) An explicit example ( interactive is from doctest):6let foo = 450 :: Int in [hlsl|const float foo = $foo|]3"#line 31 \"<interactive>\"\nconst float foo = 450"`Note that line number will be thrown off if any of the interpolated variables contain newlines.^ vulkan-utils*QuasiQuoter for creating a compute shader.Equivalent to calling $$(compileShaderQ "comp" [hlsl|...|]) without interpolation support._ vulkan-utils+QuasiQuoter for creating a fragment shader.Equivalent to calling $$(compileShaderQ "frag" [hlsl|...|]) without interpolation support.` vulkan-utils+QuasiQuoter for creating a geometry shader.Equivalent to calling $$(compileShaderQ "geom" [hlsl|...|]) without interpolation support.a vulkan-utils7QuasiQuoter for creating a tessellation control shader.Equivalent to calling $$(compileShaderQ "tesc" [hlsl|...|]) without interpolation support.b vulkan-utils:QuasiQuoter for creating a tessellation evaluation shader.Equivalent to calling $$(compileShaderQ "tese" [hlsl|...|]) without interpolation support.c vulkan-utils)QuasiQuoter for creating a vertex shader.Equivalent to calling $$(compileShaderQ "vert" [hlsl|...|]) without interpolation support.d vulkan-utilsFCompile a HLSL shader to SPIR-V using glslc (from the shaderc project)RMessages are converted to GHC warnings or errors depending on compilation success.e vulkan-utils+Compile a HLSL shader to spir-v using glslcd vulkan-utilsstage vulkan-utils glsl or code vulkan-utilsSpir-V bytecodee vulkan-utilsSource location vulkan-utilsstage vulkan-utils HLSL code vulkan-utils'Spir-V bytecode with warnings or errors [\]^_`abcdef ]^_`abc\[def— ! "#$%&'()*+,-.//0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWX Y Z [ \ ] ^ _ ` a b c d e f g h ] ^ _ ` a b c d ijklmnopnqr s t u vwnxynxznx{|}~n€nn‚ƒ„n…†n…‡|ˆ‰nŠ‹ŒŽn…‘’“|”•n–—n˜™šnx›|œ|žŸn– n¡¢n¡£¤¥¦§¨|©ª|«¬ §­)vulkan-utils-0.4.2-Bq1dbzalRMpEOXdSsboRvYVulkan.Utils.CommandCheckVulkan.Utils.DebugVulkan.Utils.FromGLVulkan.Utils.MiscVulkan.Utils.QueueAssignmentVulkan.Utils.RequirementsVulkan.Utils.InitializationVulkan.Utils.Requirements.TH!Vulkan.Utils.ShaderQQ.InterpolateVulkan.Utils.ShaderQQVulkan.Utils.ShaderQQ.ShadercVulkan.Utils.Internal assignQueues Vulkan.Utils RequirementscheckCommandsExp$fEqDeviceOrInstanceCommand$fShowDeviceOrInstanceCommanddebugCallbackFatalPtrdebugCallbackPtr nameObjectinternalFormatpartitionOptReqpartitionOptReqIOshowBits.&&. QueueIndex$sel:unQueueIndex:QueueIndexQueueFamilyIndex($sel:unQueueFamilyIndex:QueueFamilyIndex QueueSpec%$sel:queueSpecQueuePriority:QueueSpec'$sel:queueSpecFamilyPredicate:QueueSpecisComputeQueueFamilyisGraphicsQueueFamilyisTransferQueueFamilyisTransferOnlyQueueFamilyisPresentQueueFamily$fEqQueueFamilyIndex$fOrdQueueFamilyIndex$fEnumQueueFamilyIndex$fShowQueueFamilyIndex$fEqQueueIndex$fOrdQueueIndex$fEnumQueueIndex$fShowQueueIndex Unsatisfied#$sel:unsatisfiedMinimum:Unsatisfied"$sel:unsatisfiedActual:UnsatisfiedRequirementResult SatisfiedUnattemptedPropertiesUnattemptedFeatures MissingLayerUnsatisfiedDeviceVersionUnsatisfiedInstanceVersionUnsatisfiedLayerVersionUnsatisfiedFeatureUnsatisfiedPropertyUnsatisfiedDeviceExtension!UnsatisfiedDeviceExtensionVersionUnsatisfiedInstanceExtension#UnsatisfiedInstanceExtensionVersioncheckInstanceRequirementscheckDeviceRequirementsrequirementReportprettyRequirementResult $fKnownChain:$fKnownChain[]$fDeviceFeatureChaines$fDevicePropertyChaines$fSemigroupHas$fEqUnsatisfied$fOrdUnsatisfied$fEqRequirementResult$fOrdRequirementResult#createDebugInstanceFromRequirementscreateInstanceFromRequirementscreateDeviceFromRequirementspickPhysicalDevicephysicalDeviceNamereqreqs$fShowConstraint$fFunctorConstraint$fFoldableConstraint$fTraversableConstraint $fShowRequest interpExp GLSLWarning GLSLErrorglslcompfraggeomtesctesevertcompileShaderQ compileShaderprocessValidatorMessagesShadercWarning ShadercErrorhlslprocessShadercMessages commandNames commandStringcommandCandidates accessorNames"vulkan-3.10-EJB4VI3DLYQ6Eh1XvTX6ZZ$Vulkan.Extensions.VK_EXT_debug_utilssetDebugUtilsObjectNameEXTVulkan.Core10.Enums.FormatFormatunsatisfiedConstraints noSuchThingsayErrbadQQsetBitsVulkan.Core10.HandlesQueuePhysicalDeviceDevicebaseData.Traversable Traversable!Vulkan.Core10.Enums.QueueFlagBitsQUEUE_TRANSFER_BITQUEUE_COMPUTE_BITQUEUE_GRAPHICS_BITassignselectVulkan.Core10.DeviceDeviceQueueCreateInfo createDevice GHC.MaybeNothingVulkan.Core10.ImageView$sel:a:ComponentMapping KnownChainhasknownChainNullmakeInstanceCreateInfomakeDeviceCreateInfoDeviceCreateInfogetLookupExtension catProductsData.Functor.ProductProduct"Vulkan.Core10.DeviceInitializationInstanceCreateInfoVulkan.CStruct.ExtendsextendSomeStructcheckDeviceRequestInstance Data.TuplefstGHC.IO.ExceptionIOErrorgetPhysicalDevicePropertiesVulkan.RequirementDeviceRequirementRequireDeviceFeatureghc-prim GHC.TypesBoolparsefilterCommentsGHC.BaseStringGHC.Showshow