const char *const restr = (access & ACCESS_RESTRICT) ? "restrict " : "";
const char *const ronly = (access & ACCESS_NON_WRITEABLE) ? "readonly " : "";
const char *const wonly = (access & ACCESS_NON_READABLE) ? "writeonly " : "";
- fprintf(fp, "%s%s%s%s%s", coher, volat, restr, ronly, wonly);
+ const char *const reorder = (access & ACCESS_CAN_REORDER) ? "reorderable " : "";
+ fprintf(fp, "%s%s%s%s%s%s", coher, volat, restr, ronly, wonly, reorder);
#define FORMAT_CASE(x) case x: fprintf(stderr, #x " "); break
switch (var->data.image.format) {
/** The access may use a non-uniform buffer or image index */
ACCESS_NON_UNIFORM = (1 << 5),
+
+ /* This has the same semantics as NIR_INTRINSIC_CAN_REORDER, only to be
+ * used with loads. In other words, it means that the load can be
+ * arbitrarily reordered, or combined with other loads to the same address.
+ * It is implied by ACCESS_NON_WRITEABLE together with ACCESS_RESTRICT, and
+ * a lack of ACCESS_COHERENT and ACCESS_VOLATILE.
+ */
+ ACCESS_CAN_REORDER = (1 << 6),
};
/**