vulkan-utils-0.4: Utils for the vulkan package
Safe HaskellNone
LanguageHaskell2010

Vulkan.Utils.Requirements.TH

Synopsis

Documentation

req :: QuasiQuoter Source #

Parse a requirement and produce an appropriate DeviceRequirement

DeviceVersionRequirements are specified by in the form major.minor[.patch]

DeviceFeatureRequirements are specified in the form name.<member name> and produce a RequireDeviceFeature which checks and sets this feature.

DevicePropertyRequirements are specified like feature requirements except with an additional description of the constraint. This may be any of

  • myFunctioName: To check with an in-scope function taking the property type and returning Bool
  • > 123: To indicate a minimum bound on a integral property
  • >= 123: To indicate an inclusive minimum bound on a integral property
  • & SOMETHING_BIT: To indicate that the specified bit must be present in the bitmask value

DeviceExtensionRequirements are specified in the form name version. name must start with VK_. The version will be compared against the specVersion field of the ExtensionProperties record.

  • Names may be qualified.
  • The separator between the type and member can be any of . :: : -> or any amount of space
>>> let r = [req|PhysicalDeviceRayTracingPipelineFeaturesKHR.rayTracingPipeline|]
>>> featureName r
"PhysicalDeviceRayTracingPipelineFeaturesKHR.rayTracingPipeline"
>>> let r = [req|PhysicalDeviceVulkan11Features.multiview|]
>>> featureName r
"PhysicalDeviceVulkan11Features.multiview"
>>> let r = [req|PhysicalDeviceMultiviewFeatures.multiview|]
>>> featureName r
"PhysicalDeviceMultiviewFeatures.multiview"

reqs :: QuasiQuoter Source #

Like reqs except that this parses a list of newline separated requirements

It ignores

  • Blank lines
  • Lines beginning with -- or #