feat(vk): call shapes for the acceleration-structure commands the interposer lacks
NVIDIA Streamline's interposer exports none of VK_KHR_acceleration_structure's commands, so ray tracing looks each up per device with vkGetDeviceProcAddr and calls it through a pointer: create (four pointers -> result), destroy (device, handle, allocator), build sizes (device, type, info, counts, sizes), the command-buffer build (buffer, count, infos, ranges) and the device address (device, info -> u64). Both runtimes assemble; nothing uses them yet. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
00ebd6df77
commit
a868378b99
3 changed files with 71 additions and 0 deletions
|
|
@ -190,3 +190,35 @@ entry:
|
|||
call void %fn(ptr %a0, i32 %a1, i32 %a2, i32 %a3)
|
||||
ret void
|
||||
}
|
||||
|
||||
; ---- acceleration structures: commands the Streamline interposer does not export --------------------
|
||||
; vkCreateAccelerationStructureKHR(device, info, allocator, out) -> VkResult
|
||||
define i32 @lsl_call_pppp(ptr %fn, ptr %a0, ptr %a1, ptr %a2, ptr %a3) {
|
||||
entry:
|
||||
%r = call i32 %fn(ptr %a0, ptr %a1, ptr %a2, ptr %a3)
|
||||
ret i32 %r
|
||||
}
|
||||
; vkDestroyAccelerationStructureKHR(device, handle, allocator)
|
||||
define void @lsl_call_plp(ptr %fn, ptr %a0, i64 %a1, ptr %a2) {
|
||||
entry:
|
||||
call void %fn(ptr %a0, i64 %a1, ptr %a2)
|
||||
ret void
|
||||
}
|
||||
; vkGetAccelerationStructureBuildSizesKHR(device, buildType, info, maxPrimitiveCounts, sizes)
|
||||
define void @lsl_call_pippp(ptr %fn, ptr %a0, i32 %a1, ptr %a2, ptr %a3, ptr %a4) {
|
||||
entry:
|
||||
call void %fn(ptr %a0, i32 %a1, ptr %a2, ptr %a3, ptr %a4)
|
||||
ret void
|
||||
}
|
||||
; vkCmdBuildAccelerationStructuresKHR(commandBuffer, infoCount, infos, buildRangeInfos)
|
||||
define void @lsl_call_pipp(ptr %fn, ptr %a0, i32 %a1, ptr %a2, ptr %a3) {
|
||||
entry:
|
||||
call void %fn(ptr %a0, i32 %a1, ptr %a2, ptr %a3)
|
||||
ret void
|
||||
}
|
||||
; vkGetAccelerationStructureDeviceAddressKHR(device, info) -> VkDeviceAddress
|
||||
define i64 @lsl_call_pp_l(ptr %fn, ptr %a0, ptr %a1) {
|
||||
entry:
|
||||
%r = call i64 %fn(ptr %a0, ptr %a1)
|
||||
ret i64 %r
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue