Skip to content

Require motion blur and position fetch capabilities for SER instructions - #463

Open
dgkoch wants to merge 2 commits into
KhronosGroup:mainfrom
dgkoch:dk/462-ser-capability-requirements
Open

dgkoch wants to merge 2 commits into
KhronosGroup:mainfrom
dgkoch:dk/462-ser-capability-requirements

Conversation

@dgkoch

@dgkoch dgkoch commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #462.

Several SPV_EXT_shader_invocation_reorder and SPV_NV_shader_invocation_reorder
instructions also require a capability from an interacting extension:

  • OpHitObjectGetCurrentTimeEXT / OpHitObjectGetCurrentTimeNV and the motion
    instructions require RayTracingMotionBlurNV.
  • OpHitObjectGetIntersectionTriangleVertexPositionsEXT requires
    RayTracingPositionFetchKHR.

Listing these as a second enabling capability does not express that, because
any one enabling capability is sufficient, and every hit object instruction
already needs the shader invocation reorder capability. Following the
recommendation of the Working Group, the shader invocation reorder capability
stays the only enabling capability, and each instruction description states
that the other capability must also be declared.

Commits:

  1. Fix the instructions reported in Possible missing capability/extension requirement for some instructions in SPV_EXT_shader_invocation_reorder #462 (current time, EXT and NV; triangle
    vertex positions), and add the current time instructions to the
    SPV_NV_ray_tracing_motion_blur interactions so those sections list every
    dependent instruction.
  2. Express the existing motion instructions (3 EXT, 4 NV) the same way. They
    previously listed RayTracingMotionBlurNV as an alternative enabling
    capability and referred to the extension in their descriptions.

Companion changes:

▎ GenAI disclosure: Draft assisted by Claude (claude-opus-5-5, Anthropic, commercial SaaS — Claude Code CLI).

🤖 Generated with Claude Code

dgkoch and others added 2 commits October 28, 2026 13:19
OpHitObjectGetCurrentTimeEXT and OpHitObjectGetCurrentTimeNV need
SPV_NV_ray_tracing_motion_blur, and
OpHitObjectGetIntersectionTriangleVertexPositionsEXT needs
SPV_KHR_ray_tracing_position_fetch. Neither requirement was expressed as a
capability, and the current time instructions were missing from the
motion blur interactions.

Listing a second enabling capability would not express this, because
multiple enabling capabilities mean that any one of them is sufficient.
Instead, keep the shader invocation reorder capability as the enabling
capability and state in each instruction description that the
RayTracingMotionBlurNV or RayTracingPositionFetchKHR capability must also
be declared. Add the current time instructions to the
SPV_NV_ray_tracing_motion_blur interactions so those sections list every
instruction that depends on the interacting extension.

Fixes KhronosGroup#462

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SER motion instructions listed both the shader invocation reorder
capability and RayTracingMotionBlurNV as enabling capabilities. Because
any one enabling capability is sufficient, and every hit object
instruction already needs the shader invocation reorder capability,
that did not require RayTracingMotionBlurNV. The descriptions instead
referred to the SPV_NV_ray_tracing_motion_blur extension.

List only the shader invocation reorder capability, and state in each
description that the RayTracingMotionBlurNV capability must also be
declared, matching the current time instructions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alan-baker pushed a commit to KhronosGroup/SPIRV-Tools that referenced this pull request Oct 30, 2026
#7007)

Enforces the requirements clarified in KhronosGroup/SPIRV-Registry#463
(KhronosGroup/SPIRV-Registry#462):

- The SER motion instructions and OpHitObjectGetCurrentTime{NV,EXT}
require
  the RayTracingMotionBlurNV capability.
- OpHitObjectGetIntersectionTriangleVertexPositionsEXT requires the
  RayTracingPositionFetchKHR capability.

These were never enforced. The grammar listed some of them as additional
enabling capabilities, but any one enabling capability is sufficient,
and
the hit object type already requires the shader invocation reorder
capability.

The check is done up front in the NV and EXT reorder passes, in the same
style as the existing OpHitObjectRecordFromQueryEXT / RayQueryKHR check.
OpHitObjectRecordHitMotionNV, OpHitObjectRecordHitWithIndexMotionNV and
OpHitObjectRecordMissMotionNV weren't otherwise handled in the NV pass.

Tests: the existing tests that use these instructions now declare the
required capability and also check the new error when it's missing. A
test
for OpHitObjectGetCurrentTimeNV is added.

This doesn't depend on the SPIRV-Headers change
(KhronosGroup/SPIRV-Headers#643). test_val_rstuvw passes against the
currently pinned headers, and all validator test suites pass against the
updated grammar.

▎ GenAI disclosure: Draft assisted by Claude (claude-opus-5-5,
Anthropic, commercial SaaS — Claude Code CLI).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Possible missing capability/extension requirement for some instructions in SPV_EXT_shader_invocation_reorder

1 participant