Skip to content

extensions/khr/acceleration_structure: Make some arguments optional for VK_KHR_opacity_micromap#1041

Merged
MarijnS95 merged 1 commit into
masterfrom
as-null
May 20, 2026
Merged

extensions/khr/acceleration_structure: Make some arguments optional for VK_KHR_opacity_micromap#1041
MarijnS95 merged 1 commit into
masterfrom
as-null

Conversation

@MarijnS95
Copy link
Copy Markdown
Collaborator

Depends on #1041

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.

Copy link
Copy Markdown
Collaborator

@Ralith Ralith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@MarijnS95 MarijnS95 merged commit a9a1fb1 into master May 20, 2026
20 checks passed
@MarijnS95 MarijnS95 deleted the as-null branch May 20, 2026 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants