iris: Use READ_ONCE and WRITE_ONCE for snapshots_landed

Suggested by Chris Wilson, if only to make it obvious to the human
readers that these are volatile reads.  It may also be necessary for
the compiler in a few cases.
This commit is contained in:
Kenneth Graunke
2019-02-07 08:42:50 -08:00
parent 18e31a9b31
commit 9376799bd6
3 changed files with 8 additions and 7 deletions

View File

@@ -33,6 +33,9 @@
struct iris_bo;
#define READ_ONCE(x) (*(volatile __typeof__(x) *)&(x))
#define WRITE_ONCE(x, v) *(volatile __typeof__(x) *)&(x) = (v)
#define IRIS_MAX_TEXTURE_SAMPLERS 32
#define IRIS_MAX_SOL_BUFFERS 4