Summary
A minimal native Vulkan 1.4 compute application consistently returns VK_ERROR_DEVICE_LOST when an inline ray query uses an acceleration structure obtained from ResourceHeapEXT data.
The shader loads a raw 64-bit TLAS address from the resource heap, converts it with OpConvertUToAccelerationStructureKHR, and passes it to OpRayQueryInitializeKHR. This is a native Vulkan C++ reproduction with no Direct3D translation layer or game engine.
Reproducer: repository · tested commit
An earlier revision omitted the Vulkan shaderInt64 feature required by OpCapability Int64. That application-side issue is fixed in the revision above. The corrected revision still loses the device with Khronos validation and synchronization validation enabled, all implicit layers disabled, and no reported VUID or synchronization hazard.
Environment
- OS: Windows 11 Pro 64-bit, build 26200
- GPU: NVIDIA GeForce RTX 4070 Ti SUPER (
0x10de:0x2705) - NVIDIA driver: 610.74
- Device Vulkan API: 1.4.341
- Vulkan SDK: 1.4.350.0
VK_EXT_descriptor_heaprevision: 1- Slang: 2026.13
Expected and actual behavior
The dispatch should complete and report the expected triangle hit. Instead, submitting the dispatch and waiting for completion returns VK_ERROR_DEVICE_LOST:
GPU: NVIDIA GeForce RTX 4070 Ti SUPER, API 1.4.341
Driver: NVIDIA (610.74)
AS source=raw TLAS address + Slang OpConvertUToAccelerationStructureKHR, shaderStride=0x8
Dispatching Slang descriptor-heap AS ray query...
REPRODUCED: VK_ERROR_DEVICE_LOST
The executable deliberately returns process code 0, so the console message is the authoritative result.
Reproduction
The workload may reset an affected GPU. Please close GPU-sensitive work before running it.
git clone https://github.com/qian-o/VulkanRayQueryTriangle.git
cd VulkanRayQueryTriangle
git checkout 86ff48c50ac6848ec80261744ff6aeb2dbe55d11
cmake -S . -B build
cmake --build build --config Release
$env:VK_INSTANCE_LAYERS = "VK_LAYER_KHRONOS_validation"
$env:VK_LOADER_LAYERS_DISABLE = "~implicit~"
$env:VK_LAYER_VALIDATE_SYNC = "1"
.\build\Release\vulkan_descriptor_heap_ray_query_repro.exe
With VK_LOADER_LAYERS_DISABLE=~implicit~, the audited call chain contained only VK_LAYER_KHRONOS_validation followed by the NVIDIA ICD.
Shader evidence
CMake builds the shader with Slang 2026.13. spirv-val --target-env vulkan1.4 succeeds without diagnostics.
Relevant SPIR-V:
OpCapability RayQueryKHR
OpCapability Int64
OpCapability UntypedPointersKHR
OpCapability DescriptorHeapEXT
OpDecorate %_runtimearr_ulong ArrayStride 8
OpDecorate %slang_resourceHeap BuiltIn ResourceHeapEXT
%58 = OpUntypedAccessChainKHR %_ptr_UniformConstant %_runtimearr_ulong %slang_resourceHeap %54
%60 = OpLoad %ulong %58
%62 = OpConvertUToAccelerationStructureKHR %61 %60
OpRayQueryInitializeKHR %query %62 %uint_0 %uint_255 %98 %99 %100 %101
Validation and host audit
- The application checks and enables every required feature, including
shaderInt64,descriptorHeap,shaderUntypedPointers,rayQuery,accelerationStructure, andbufferDeviceAddress. - Both decorated shader resources have descriptor-heap mappings, and the pipeline uses the required null layout.
- The raw TLAS address is stored immediately after the implementation-reserved heap range with the 8-byte stride generated by Slang.
- Acceleration-structure addresses, scratch alignment, lifetimes, and BLAS-to-TLAS-to-compute barriers were audited.
- Khronos validation plus synchronization validation reports no VUID, synchronization hazard, or shader diagnostic.
- The failure persists with all third-party implicit layers disabled.
The known application-side issue is therefore fixed, and the remaining evidence points to an NVIDIA Vulkan driver issue involving VK_EXT_descriptor_heap, a raw acceleration-structure address, OpConvertUToAccelerationStructureKHR, and an inline ray query.
Request
Please reproduce this on an NVIDIA driver build and investigate why the dispatch loses the device. If an Nsight, Aftermath, crash-dump, or driver-internal capture is needed, please specify the preferred procedure.