Repository navigation
Declare motion blur and position fetch capabilities for hit object ops - #4503
Merged
arcady-lunarg merged 1 commit intoOct 28, 2026
Merged
Conversation
The shader invocation reorder motion instructions and
OpHitObjectGetCurrentTime{NV,EXT} require the RayTracingMotionBlurNV
capability, and OpHitObjectGetIntersectionTriangleVertexPositionsEXT
requires the RayTracingPositionFetchKHR capability, but only the shader
invocation reorder capability was declared for them.
Declare the extra capability and its extension when emitting these
instructions, update the affected hitobject-allops results, and add tests
for the current time and vertex position queries, which were not
previously covered.
See KhronosGroup/SPIRV-Registry#462.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
arcady-lunarg
approved these changes
Oct 28, 2026
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.
The shader invocation reorder motion instructions (OpHitObjectTraceRayMotion{NV,EXT},
OpHitObjectRecordHitMotionNV, OpHitObjectRecordHitWithIndexMotionNV,
OpHitObjectRecordMissMotion{NV,EXT}, OpHitObjectTraceMotionReorderExecuteEXT) and
OpHitObjectGetCurrentTime{NV,EXT} require the RayTracingMotionBlurNV capability, and
OpHitObjectGetIntersectionTriangleVertexPositionsEXT requires RayTracingPositionFetchKHR
(KhronosGroup/SPIRV-Registry#462, clarified in KhronosGroup/SPIRV-Registry#463).
glslang only declared the shader invocation reorder capability for them.
This change declares the extra capability and its SPIR-V extension when emitting these
instructions, the same way OpTraceRayMotionNV is already handled. It updates the
affected spv.{ext,nv}.hitobject-allops results, and adds tests for the current time
and triangle vertex position queries, which weren't covered before.
KhronosGroup/SPIRV-Tools#7007 adds spirv-val checks for these requirements. Without
this change, the hitobject-allops tests fail validation against it, which is why that
PR's shaderc smoketest currently fails.
Possible follow-up (not in this PR): the GLSL extension specs are loose here.
GLSL_EXT_shader_invocation_reorder and GLSL_NV_shader_invocation_reorder say the motion
functions are allowed only when GLSL_NV_ray_tracing_motion_blur is "present"/"supported",
hitObjectGetCurrentTime{EXT,NV} has no such requirement, and
hitObjectGetIntersectionTriangleVertexPositionsEXT doesn't mention
GLSL_EXT_ray_tracing_position_fetch. glslang currently gates all of these only on the
shader invocation reorder GLSL extension. With this change the generated SPIR-V is
correct either way. Whether the front end should also require the motion blur or
position fetch GLSL extension depends on a GLSL spec clarification.
▎ GenAI disclosure: Draft assisted by Claude (claude-opus-5-5, Anthropic, commercial SaaS — Claude Code CLI).
🤖 Generated with Claude Code