Skip to content

dzn: Support buffer_device_address

Jesse Natalie requested to merge jenatali/mesa:dzn-bda into main

This works similarly to the CL compiler, where a 64-bit address is decomposed into a 32-bit index and offset. But unlike CL, where the index is into a per-kernel array of bound buffers, for Vulkan it points into the global device-wide descriptor heap.

For all global deref chains that terminate in a load/store/atomic, create a parallel deref chain that begins by decomposing the pointer to a vec2, followed by a load_vulkan_descriptor, and then an SSBO deref chain. Any instance where the original deref chain was used for something else will remain as global derefs, so also run lower_explicit_io for global to produce appropriate pointer math.

Edited by Jesse Natalie

Merge request reports