- Depends on documentation having been built in
Vulkan-Docs - Outputs the
vulkansource to a directory calledout- I usually symlink this to
../src
- I usually symlink this to
- For faster iteration documentation generation can be disabled by setting
doLoadDocstoFalseinvk/Main.hs
To generate the docs in Vulkan-Docs, note that this requires quite a recent
nixpkgs with he and escape-string-regexp (One with
NixOS/nixpkgs#86773 merged):
cd Vulkan-Docs
nix-shell -p python3 python3Packages.pyparsing asciidoctor gnumake nodejs nodePackages.he nodePackages.escape-string-regexp --run "./makeAllExts refpages generated"- Depends on documentation having been built in
../VulkanMemoryAllocator/VulkanMemoryAllocator - Outputs the
VulkanMemoryAllocatorsource to a directory calledout-vma- I usually symlink this to
../VulkanMemoryAllocator/src
- I usually symlink this to
I usually run the generators with ghci $(HIE_BIOS_OUTPUT=/dev/stdout ./flags.sh $(pwd)/vk/Main.hs) vk/Main.hs +RTS -N16
To generate the docbook documentation required by vma:
In an environment with doxygen (nix-shell -p doxygen), in the
VulkanMemoryAllocator/VulkanMemoryAllocator directory.
sed -i -e 's|^GENERATE_DOCBOOK.*|GENERATE_DOCBOOK=YES|' \
-e 's|^BRIEF_MEMBER_DESC.*|BRIEF_MEMBER_DESC=NO|' \
-e 's|^PREDEFINED *=|PREDEFINED = VMA_STATS_STRING_ENABLED=1 |' \
-e 's|^PREDEFINED *=|PREDEFINED = VMA_EXTENDS_VK_STRUCT(s)=s |' \
-e 's|@CMAKE_SOURCE_DIR@/||' \
Doxyfile
nix-shell -p doxygen --run 'doxygen Doxyfile'The docbook documentation will be in docs/docbook.
-
OpenXR bindings, the spec looks very similar to the vulkan spec: https://github.com/KhronosGroup/OpenXR-Docs
-
List instead of vector? Most of the arrays passed to vulkan (in my code at least) are just a single element. All of them are less than 5 or 6 elements I think. The marshaling code doesn't need O(1) random access, perhaps lists would be more convenient.
-
pay attention to
noautovalidity, At the moment this is ignored, but it's a hint that there's something slightly non-standard happening.- Additionally anything which is
returnedonly=trueshould never appear in a negative position
- Additionally anything which is
-
Neaten zero writing, we write some unnecessary zero bytes already set by calloc.
-
We sometimes use calloc where alloc would do, when passing in space for "out" parameters for instance
-
non-optional arrays/structs can be allocated at the same time as their parent struct, no need for two allocations
-
Unions should probably not use tuple when storing several values,
VkClearColorValuefor instance -
Add tests to make sure that
allocaEmptyCStruct peekCStructalways works, and is equal tozero. -
Make
PFN_vkVoidFunctionnot aFunPtras it can't be called without casting anyway. -
Groups of
lifted actions which don't return anything can be grouped under onelift: -
If we move to peeking and poking ByteArrays using
RecordDotSyntaxit would be nice to have alternative virtual members for using nicer types than tuples for vectors and matricies. For example it would be nice to uselinearsMat34to setVkAccelerationStructureInstanceKHR::transform. -
Don't peek the same value for every bitfield component
-
Use
selectionandselectorattributes in the xml to generate theUnionDiscriminatortable automatically. -
Replace
AabbswithAABBs -
Elide union tag
- Parse header files (this is already done for VMA, so the code is more or less written)
- Integrate these definitions in
parseSpec
The complication is that lots of the structs there use bitfields, so proper support for them needs to be done...
At the moment the extensions are disabled in Bespoke.hs
During development unfinished bits not to forget are listed here.
- src/Vulkan/Core10/Pipeline.hs attachmentCount, is the optional marking here correct?
-
Handle levels
- They are all "session"
-
Bespoke vulkan types should be just in sizes
-
Remove vulkan stuff from bespokeSizes
- Would be nice to generate it automatically, but it's fine as it is
-
Fix runAsciidoctor
-
These are passed as pointers ,(see Bespoke.MarshalParams.isPassAsPointerType')
-
VkInstanceCreateInfo,VkAllocationCallbacks,VkDeviceCreateInfo -
LARGE_INTEGER -
timespec
-
-
remove XR.RenderParams.vulkanNameOverrides
-
check
-
XrCompositionLayerBaseHeader(the 'type' member doesn't have a single value) -
XrEventDataBuffer->varying -
XrSpatialGraphNodeSpaceCreateInfoMSFT->nodeId -
XrSpatialGraphNodeSpaceCreateInfoMSFT -
XrEventDataBuffer -
xrCreateInstance: Unable to find ref named cmds -
xrResultToString: Unhandled ByteString conversion to Ptr NonConst Char -
xrStructureTypeToString: Unhandled ByteString conversion to Ptr NonConst Char -
xrPathToString: Getting the unpreserved haskell type for char. This case should be implemented if this char is not better represented by a bytestring -
xrCreateSwapchainAndroidSurfaceKHR: Unable to get size for TypeNamejobject -
xrGetInputSourceLocalizedName: Getting the unpreserved haskell type for char. This case should be implemented if this char is not better represented by a bytestring -
xrGetVulkanInstanceExtensionsKHR: Getting the unpreserved haskell type for char. This case should be implemented if this char is not better represented by a bytestring -
xrGetVulkanDeviceExtensionsKHR: Getting the unpreserved haskell type for char. This case should be implemented if this char is not better represented by a bytestring -
xrCreateVulkanInstanceKHR: Unable to get size for TypeNameVkResult -
xrCreateVulkanDeviceKHR: Unable to get size for TypeNameVkResult -
xrCreateSpatialAnchorFromPerceptionAnchorMSFT: Unable to get size for TypeNameIUnknown
-
-
Check we have all of
-
NULL_SYSTEM_ID -
NULL_PATH -
SUCCEEDED -
FAILED -
UNQUALIFIED_SUCCESS -
NO_DURATION -
INFINITE_DURATION -
MIN_HAPTIC_DURATION -
FREQUENCY_UNSPECIFIED -
MAX_EVENT_DATA_SIZE -
MAY_ALIAS- no need
-
-
Make Vulkan integration optional, have a module which either defines opaque handles or reexports types from
vulkan -
make Xr stuff in
bespokeModules -
dual-use commands have a different style in OpenXR... they're wrong now
-
xrEnumerateApiLayerProperties -
xrEnumerateInstanceExtensionProperties -
xrEnumerateSwapchainFormats -
xrEnumerateReferenceSpaces -
xrEnumerateViewConfigurations -
xrEnumerateEnvironmentBlendModes -
xrEnumerateViewConfigurationViews -
xrLocateViews -
xrPathToString -
xrEnumerateBoundSourcesForAction -
xrGetInputSourceLocalizedName -
xrGetVulkanInstanceExtensionsKHR -
xrGetVulkanDeviceExtensionsKHR -
xrLoadControllerModelMSFT- Should return a bytestring or storable vector
-
xrEnumerateDisplayRefreshRatesFB -
xrEnumerateColorSpacesFB
-
-
Implement OpenXR's polymorphic types
-
change
\CFloat a -> atocoerce @CFloat @Float -
Put modules under
OpenXRinstead ofVulkan -
OpenXR brackets
-
Remove uses of WildCardT
-
Remove or improve special handling for
CompositionLayerBaseHeader- Wait for KhronosGroup/OpenXR-Docs#67
-
Remove or improve special handling for
enumerateSwapchainImages -
Remove uses of
schemeTypeNegativeWithContextinRender.Command(there are TODOs) in the code. -
Some structs have an in-out purpose, see https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#buffer-size-parameters
- affects at least xrGetVisibilityMaskKHR and a few extension functions.
- Look at every use of "CapacityInput" or "CountOutput"
-
Fix or remove
XR_EXT_conformance_automation- Annoying to fix because it passes structs by value so would need a C shim
-
Expose XR_CURRENT_API_VERSION
-
Auto update functionality for OpenXR
- optionalness on VkWriteDescriptorSetAccelerationStructureKHR->pAccelerationStructures
- VkAccelerationStructureVersionKHR
- VkAccelerationStructureInstanceKHR
- VkAccelerationStructureBuildGeometryInfoKHR
- VkAccelerationStructureBuildGeometryInfoKHR->pGeometries (esp optionalness)
- VkAccelerationStructureBuildGeometryInfoKHR->ppGeometries (esp optionalness)
- (this maps to the same name as pGeometries!)
- This has been removed from the Haskell bindings
- VkAccelerationStructureCreateInfoKHR->offset
- VkAccelerationStructureVersionInfoKHR->pVersionData
- vkCmdBuildAccelerationStructuresIndirectKHR,
- The
Ptr Word32type has leaked through, this should beVector (Vector Word32) - Fix this non-critical issue
- It's correct now, but it doesn't check the length of the array
- The
- vkCmdBuildAccelerationStructuresKHR, vkBuildAccelerationStructuresKHR
- This is still incorrect as one can't pass multiple
AccelerationStructureBuildRangeInfoKHR's perAccelerationStructureBuildGeometryInfoKHR. It's no more broken than before though. - Fixed, although there's no length checking
- This is still incorrect as one can't pass multiple
- vkGetAccelerationStructureBuildSizesKHR
- It's correct, but it doesn't check the length of the
maxPrimitiveCountarray like it would with a sibling array of same length
- It's correct, but it doesn't check the length of the
- pNext is now optional, this breaks the Zero instances
Optional TODOs:
- cmdTraceRaysKHR is not using the storable instance of StridedDeviceAddressRegionKHR
- same for destroyAccelerationStructureKHR not using allocation callbacks
- These are due to the
indirectStructcase of thenormalpoker - This is no problem, commands have to allocate structs on the stack anyway
- likewise for
pokeCStructofRayTracingPipelineCreateInfoKHR{..}- This one is because we're not looking past pointers when checking for direct dependents
- Fixed
- Documentation on bracketing functions still mentions the "first" argument, this should be chagned to "last"
- AccelerationStructureGeometryAabbsDataKHR could use a simple poke for its DeviceOrHostAddressConstKHR (is this true for the union in AccelerationStructureGeometryKHR too)
- Now is the time to remove the top level tuple from TransformMatrixKHR
- Check VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT
- VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR
- Make
buildStatsStringreturn a ByteString pHeapSizeLimitlengthVmaDefragmentationPassInfo::pMoves
-
chaoticbob/SPIRV-Reflect
-
ValveSoftware/openvr
-
cgltf