Vulkan 1.4.325 was released on Friday with one new extension in tow: VK_KHR_shader_untyped_pointers for untyped pointers.
VK_KHR_shader_untyped_pointers adds Vulkan support for the SPIR-V SPV_KHR_untyped_pointers extension to provide untyped pointers as an alternative to strongly-typed pointers:
“It provides an alternative to strongly-typed pointers. Untyped pointers allow shader authors to reinterpret data accessed through memory and atomic instructions versus the data type declared in the variable without extra conversion instructions. Untyped pointers also provide an efficient translation from templated load/store operations in high-level languages and simplify shaders that support operations, but not storage, on smaller data types (e.g. 16-bit floating-point types).”
The untyped pointers Vulkan extension was worked on by Google, Arm, LunarG, and AMD engineers. The SPIR-V registry describes the SPV_KHR_untyped_pointers extension in turn as:
“This extension introduces support for untyped pointers. It allows for the declaration and use of pointers that do not specify the type of data they point to. It also allows memory, atomic and other instructions to reinterpret data differently than the declared type of the variables they are used with. For example, loading a vector of floating-point values from a variable with a declared type of an array of integers. It provides an equivalent set of functionality to type-punning via pointer casting in high-level languages.”
Besides the new VK_KHR_shader_untyped_pointers extension, the other changes in the spec update come down to basic fixes as outlined in the Vulkan 1.4.325 commit.
Following Vulkan 1.4.325 going public Mesa’s NVK and ANV drivers added support for VK_KHR_shader_untyped_pointers. Still pending is the RADV merge request for its support but presumably will land in the coming days.