Crafter.Graphics/implementations
catbot 950059c86e fix(vulkan-rt): work around NVIDIA descriptor-heap AS-read device-loss (#15)
Reading an acceleration structure through VK_EXT_descriptor_heap aborts
with VK_ERROR_DEVICE_LOST on NVIDIA 610.43.02 — a brand-new-extension
driver fault isolated in #7 (engine setup is correct and validation-clean;
images/buffers through the same heap work, and both traceRayEXT and inline
rayQuery fault identically on the AS read).

An acceleration structure can equally be reached by its device address via
OpConvertUToAccelerationStructureKHR, which reads no descriptor and so never
touches the faulting heap path. glslang has no GLSL spelling for that
conversion, so VulkanShader rewrites the compiled SPIR-V at module-load
time: every `OpLoad %accelStruct <heap-ptr>` becomes a load of the TLAS
device address from a synthesized push-constant block followed by the
convert. RTPass pushes the active frame's TLAS address into that push
constant. User GLSL and example code are unchanged; acceleration structures
still bind into the heap normally.

The workaround is gated on Device::workaroundDescriptorHeapAS (true only on
the NVIDIA proprietary driver) and confined to one fenced block in
Crafter.Graphics-ShaderVulkan.cppm plus the RTPass push and the shaderInt64
feature toggle — delete those once a fixed NVIDIA driver ships and the heap
AS read becomes the direct path again.

Verified: VulkanTriangle ray-traces correctly on native NVIDIA (RTX 4090),
validation-layer-clean, no device loss. The SPIR-V rewrite was independently
validated with spirv-val on both the VulkanTriangle and Sponza raygen
modules.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 01:59:54 +00:00
..
Crafter.Graphics-Clipboard.cpp clipboard 2026-05-19 00:45:22 +02:00
Crafter.Graphics-ComputeShader.cpp UI rewrite 3rd attempt 2026-05-02 21:08:20 +02:00
Crafter.Graphics-Device.cpp fix(vulkan-rt): work around NVIDIA descriptor-heap AS-read device-loss (#15) 2026-06-03 01:59:54 +00:00
Crafter.Graphics-Dom.cpp browser DOM support 2026-05-18 02:07:48 +02:00
Crafter.Graphics-Font.cpp new UI system 2026-05-01 23:35:37 +02:00
Crafter.Graphics-FontAtlas.cpp webgpu support 2026-05-18 04:58:52 +02:00
Crafter.Graphics-Gamepad.cpp browser DOM support 2026-05-18 02:07:48 +02:00
Crafter.Graphics-Input.cpp new input system 2026-05-12 00:24:48 +02:00
Crafter.Graphics-InputField.cpp new input system 2026-05-12 00:24:48 +02:00
Crafter.Graphics-Mesh-WebGPU.cpp feat(webgpu-rt): emit intersection/any-hit dispatch + build AABB BVH 2026-06-02 22:09:20 +00:00
Crafter.Graphics-Mesh.cpp new input system 2026-05-12 00:24:48 +02:00
Crafter.Graphics-PipelineRTWebGPU.cpp feat(webgpu-rt): emit intersection/any-hit dispatch + build AABB BVH 2026-06-02 22:09:20 +00:00
Crafter.Graphics-RenderingElement3D-WebGPU.cpp webgpu improvements 2026-05-24 13:32:08 +02:00
Crafter.Graphics-RenderingElement3D.cpp update 2026-05-05 23:49:29 +02:00
Crafter.Graphics-Router.cpp browser DOM support 2026-05-18 02:07:48 +02:00
Crafter.Graphics-ShaderBindingTableWebGPU.cpp webgpu triangle 2026-05-18 18:43:30 +02:00
Crafter.Graphics-UI-Shared.cpp webgpu support 2026-05-18 04:58:52 +02:00
Crafter.Graphics-UI-WebGPU.cpp webgpu improvements 2026-05-24 13:32:08 +02:00
Crafter.Graphics-UI.cpp custom shader webgpu 2026-05-18 05:39:17 +02:00
Crafter.Graphics-UIComponents.cpp update 2026-05-03 02:45:38 +02:00
Crafter.Graphics-WebGPUComputeShader.cpp webgpu triangle 2026-05-18 18:43:30 +02:00
Crafter.Graphics-Window.cpp fix(vulkan): clear startup validation errors on native triangle 2026-05-31 20:59:10 +00:00