vtn: Support scoped control barriers for OpenCL too
authorJesse Natalie <jenatali@microsoft.com>
Mon, 12 Apr 2021 02:13:44 +0000 (19:13 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Apr 2021 03:40:23 +0000 (03:40 +0000)
commit70aefe3449e8aa70480cd6ec2f67052496615e46
treea07adc3b88320ad4699e4fedbe8643781ae015b9
parentf9b527a9a501bf15c33957ac7ae431d996aea606
vtn: Support scoped control barriers for OpenCL too

The current handling for SPIR-V memory semantics is very specific to
the wording in the SPIR-V spec, which breaks its handling of OpenCL
(compared to what we had working downstream before merging upstream).

Update/relax the logic here to support CL's barrier(CLK_GLOBAL_MEM_FENCE);

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10165>
src/compiler/spirv/spirv_to_nir.c