Skip to content

Add per-instance InstanceFlags YAML field and front-CCW test#1287

Merged
EmilioLaiso merged 1 commit into
llvm:mainfrom
Traverse-Research:inlinert-instance-flags
Jun 24, 2026
Merged

Add per-instance InstanceFlags YAML field and front-CCW test#1287
EmilioLaiso merged 1 commit into
llvm:mainfrom
Traverse-Research:inlinert-instance-flags

Conversation

@MarijnS95

@MarijnS95 MarijnS95 commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Depends on #1245, #1286

Summary

Introduces AccelerationStructureInstanceFlags with bit values that intentionally match D3D12_RAYTRACING_INSTANCE_FLAGS, VkGeometryInstanceFlagBitsKHR, and MTLAccelerationStructureInstanceOptions so the value passes straight through each backend's instance fill with a single static_cast. YAML exposes the field as a bitset list (e.g. InstanceFlags: [TriangleCullDisable, ForceOpaque]).

The covering test (Feature/InlineRT/instance-flags.test) sets TriangleFrontCounterclockwise on one of two instances of the same single-triangle BLAS and verifies CommittedTriangleFrontFace() 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:

  • Linux Vulkan (native offloader)
  • Linux D3D12 (Wine + vkd3d-proton + cross-compiled offloader.exe)
  • Windows Vulkan (native offloader.exe)
  • Windows D3D12 (native offloader.exe)

CI (RT-capable runners):

  • windows-nvidia D3D12 (RaytracingTier 1.2)
  • windows-intel VK (VK_KHR_ray_tracing_pipeline)
  • macOS Metal (supportsRaytracing)

@MarijnS95 MarijnS95 marked this pull request as draft June 4, 2026 16:11
@MarijnS95 MarijnS95 force-pushed the inlinert-instance-flags branch 2 times, most recently from 95481aa to a9e34bd Compare June 11, 2026 13:48
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>
@EmilioLaiso EmilioLaiso force-pushed the inlinert-instance-flags branch from a9e34bd to b3800bf Compare June 19, 2026 07:51
@EmilioLaiso EmilioLaiso marked this pull request as ready for review June 19, 2026 07:52
@EmilioLaiso EmilioLaiso merged commit a446ce7 into llvm:main Jun 24, 2026
26 checks passed
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.

4 participants