vtn: add support for atomic flag test/set/clear
authorDave Airlie <airlied@redhat.com>
Tue, 24 Nov 2020 20:34:42 +0000 (06:34 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 6 Aug 2021 01:11:04 +0000 (11:11 +1000)
commitcf39c3e1e3bef8e209187a8d75d46a722033fcdc
tree22bded5a2364b5fb50d3bfd63081bb4638ccd2b6
parentcd265a9868e5694cf162873a33afcac2acad093e
vtn: add support for atomic flag test/set/clear

This adds support for SpvOpAtomicFlag operations.

This is just a simple implementation that lowers
Clear to Store 0
and
TestAndSet to Cas (0, -1)

There are likely platforms/hw that will want to
lower this all the way through NIR and into their
backend, but this will do for now.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12229>
src/compiler/spirv/spirv_to_nir.c