Add per-instance InstanceFlags YAML field and front-CCW test#1287
Merged
Conversation
95481aa to
a9e34bd
Compare
Introduces AccelerationStructureInstanceFlags with bit values that intentionally match D3D12_RAYTRACING_INSTANCE_FLAGS, VkGeometryInstance- FlagBitsKHR, and MTLAccelerationStructureInstanceOptions so backends can pass the value through unchanged. YAML exposes the field as a bitset list (e.g. `InstanceFlags: [TriangleCullDisable, ForceOpaque]`). The covering test sets TriangleFrontCounterclockwise on one of two instances and verifies CommittedTriangleFrontFace() flips against the same BLAS. Part of the inline-RT test coverage epic (llvm#1258). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
a9e34bd to
b3800bf
Compare
manon-traverse
approved these changes
Jun 19, 2026
EmilioLaiso
approved these changes
Jun 24, 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.
Depends on #1245, #1286
Summary
Introduces
AccelerationStructureInstanceFlagswith bit values that intentionally matchD3D12_RAYTRACING_INSTANCE_FLAGS,VkGeometryInstanceFlagBitsKHR, andMTLAccelerationStructureInstanceOptionsso the value passes straight through each backend's instance fill with a singlestatic_cast. YAML exposes the field as a bitset list (e.g.InstanceFlags: [TriangleCullDisable, ForceOpaque]).The covering test (
Feature/InlineRT/instance-flags.test) setsTriangleFrontCounterclockwiseon one of two instances of the same single-triangle BLAS and verifiesCommittedTriangleFrontFace()flips — same world-space ray, same vertices, only the per-instance flag changes.Part of the inline-RT test coverage epic (#1258).
Test plan
Local on an NVIDIA RTX 3060:
offloader)offloader.exe)offloader.exe)offloader.exe)CI (RT-capable runners):
RaytracingTier 1.2)VK_KHR_ray_tracing_pipeline)supportsRaytracing)