extensions/khr/acceleration_structure: Make some arguments optional for VK_KHR_opacity_micromap#1041
Conversation
Jasper-Bekkers
approved these changes
May 9, 2026
Ralith
approved these changes
May 9, 2026
Collaborator
Ralith
left a comment
There was a problem hiding this comment.
Another option would be to handle 0-length slices specially. I think I lean slightly towards the approach you've already taken, because (ignoring the assert) it probably compiles down to an unconditional load, which is cute.
…or `VK_KHR_opacity_micromap` The new KHR Opacity Micromap extension leverages existing `vk::AccelerationStructureKHR` objects and related building functions (as opposed to defining bespoke types and commands in the EXT), but makes some input arguments to the existing Acceleration Structure commands optional. These need to be adjusted in our high-level wrapper to accommodate for these requirements: - `max_primitive_counts` in `get_acceleration_structure_build_sizes_khr()`; - `build_range_infos` in `cmd_build_acceleration_structures()`. Note that `build_range_infos` in `build_acceleration_structures()` is not affected, because Opacity Micromaps are limited to device-builds. See the VUID changes in KhronosGroup/Vulkan-Headers@0e9de56 for more details.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #1041
The new KHR Opacity Micromap extension leverages existing
vk::AccelerationStructureKHRobjects and related building functions (as opposed to defining bespoke types and commands in the EXT), but makes some input arguments to the existing Acceleration Structure commands optional. These need to be adjusted in our high-level wrapper to accommodate for these requirements:max_primitive_countsinget_acceleration_structure_build_sizes_khr();build_range_infosincmd_build_acceleration_structures().Note that
build_range_infosinbuild_acceleration_structures()is not affected, because Opacity Micromaps are limited to device-builds.See the VUID changes in KhronosGroup/Vulkan-Headers@0e9de56 for more details.