Skip to content

WIP: anv: Implement VK_EXT_shader_image_atomic_int64

This MR implements the new VK_EXT_shader_image_atomic_int64 extension on Intel. There are a number of factors which make the implementation complex and potentially fragile. It's currently marked WIP and is likely to remain so until I'm convinced that it's a good idea to land it.

The implementation is gross and terrible because we don't have typed int64 atomics or even surface-based int64 atomics so we have to emulate it by putting the base address in the descriptor UBO and doing the address calculations in the shader. Fortunately, we've already got most of the code for that lying around from the bad-old-days on Gen7-8 where we had to use untyped instructions for some storage image ops. Unfortunately, the code we have for that only works on linear images and legacy X/Y tiling. If we want to enable other tiling formats such as Yf/Ys, we'll either have to restrict storage images to X/Y or expand the shader tiling calculations to Yf/Ys which would be pretty nuts because. Unfortunately, this has the potential to tie our hands a bit when it comes to implementation options going forward.

Merge request reports