Mesa (master): nir: Add the alias NIR_MEMORY_ACQ_REL

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Feb 24 19:49:56 UTC 2020


Module: Mesa
Branch: master
Commit: 6ff898a6530e19815e2877f5a5da54f7e6746cfa
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6ff898a6530e19815e2877f5a5da54f7e6746cfa

Author: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
Date:   Thu Jan  9 10:03:12 2020 -0800

nir: Add the alias NIR_MEMORY_ACQ_REL

This will help upcoming C++ code that will have to combine those two
semantics.  In C++ it is not possible to do this without a cast or
adding an operator| to the enum.  Since having the short form will
also be convient to C, we picked the former solution.

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3913>

---

 src/compiler/nir/nir.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index d43e3f45f66..9591285f28f 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -1448,6 +1448,7 @@ typedef enum {
    /* Memory ordering. */
    NIR_MEMORY_ACQUIRE        = 1 << 0,
    NIR_MEMORY_RELEASE        = 1 << 1,
+   NIR_MEMORY_ACQ_REL        = NIR_MEMORY_ACQUIRE | NIR_MEMORY_RELEASE,
 
    /* Memory visibility operations. */
    NIR_MEMORY_MAKE_AVAILABLE = 1 << 3,



More information about the mesa-commit mailing list