docs(vulkan-rt): document dynamic descriptor_heap-index hit-shader fault (#23) #24
No reviewers
Labels
No labels
claude:done
claude:in-progress
claude:ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Catcrafts/Crafter.Graphics!24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/issue-23"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Documents the NVIDIA driver fault from #23: indexing a
layout(descriptor_heap)array with a runtime (non-constant) index inside a ray-tracing hit shader device-losts (VK_ERROR_DEVICE_LOST) on driver610.43.02, for both SSBO and sampled-image descriptors. A constant/spec-constant index is fine, and the same dynamic pattern works in fragment shaders — so it is an RT-stage-specific driver fault, the same family as #7/#15 and #21/#22.Why documentation, not a transparent workaround
The AS-read fault (#15) is worked around transparently only because an acceleration structure has a device-address path (
OpConvertUToAccelerationStructureKHR) and there is exactly one TLAS. Neither holds here:buffer_reference, but a per-mesh array selected bygl_InstanceCustomIndexEXTwould need the engine to maintain/bind an address-table buffer and a SPIR-V rewrite far larger than the single-TLAS case — and it would still leave the texture half broken.So the engine cannot paper over this; the resolution is the documented-limitation path (the precedent set by #7).
Changes
buffer_referenceat a spec-constant slot; onetexture2DArrayindexed by layer) rather than selecting a descriptor dynamically. This is exactly what the WebGPU path already does (bucketed texture arrays + a single buffer). Sponza's closest-hit already readsalbedo[albedoSlot]through a spec constant for precisely this reason.Testing
crafter-build test→PushConstantRewritepasses. Change is documentation-only (markdown), so no runtime behavior changes.Resolves #23