microsoft/compiler: Un-lower shared/scratch to derefs
authorJesse Natalie <jenatali@microsoft.com>
Fri, 19 May 2023 17:28:08 +0000 (10:28 -0700)
committerMarge Bot <emma+marge@anholt.net>
Tue, 13 Jun 2023 00:43:36 +0000 (00:43 +0000)
commitf121d8fe12ec8e91dcb618f11023371ff3d5d6e9
tree2d7a9cae00de4f548b57d7dfc95a35e2a1265928
parent95bfee6a85ce71cfc9dedd78e6ae7a475e144dfc
microsoft/compiler: Un-lower shared/scratch to derefs

Derefs have index-based access semantics, which means we don't need
custom intrinsics to encode an index instead of a byte offset.

Remove the "masked" store intrinsics and just emit the pair of atomics
directly. This massively reduces duplication between scratch, shared,
and constant, while also moving more things into nir so more optimizations
can be done.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23173>
src/compiler/nir/nir_intrinsics.py
src/gallium/drivers/d3d12/d3d12_compiler.cpp
src/microsoft/clc/clc_compiler.c
src/microsoft/compiler/dxil_module.c
src/microsoft/compiler/dxil_module.h
src/microsoft/compiler/dxil_nir.c
src/microsoft/compiler/dxil_nir.h
src/microsoft/compiler/nir_to_dxil.c
src/microsoft/spirv_to_dxil/dxil_spirv_nir.c