summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r--src/compiler/nir/nir.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index d25aa7491ed..0b950862334 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -2133,8 +2133,19 @@ typedef struct nir_shader {
* access plus one
*/
unsigned num_inputs, num_uniforms, num_outputs, num_shared;
+
+ /* temporary, tracking for which derefs instructions have been lowered
+ * to deref chains
+ */
+ unsigned lowered_derefs;
} nir_shader;
+#define nir_assert_lowered_derefs(shader, mask) \
+ assert(((shader)->lowered_derefs & (mask)) == (mask))
+
+#define nir_assert_unlowered_derefs(shader, mask) \
+ assert(!((shader)->lowered_derefs & (mask)))
+
static inline nir_function_impl *
nir_shader_get_entrypoint(nir_shader *shader)
{
@@ -2681,6 +2692,7 @@ enum nir_lower_deref_flags {
nir_lower_atomic_counter_derefs = (1 << 3),
nir_lower_atomic_derefs = (1 << 4),
nir_lower_image_derefs = (1 << 5),
+ nir_lower_all_derefs = (1 << 6) - 1,
};
bool nir_lower_deref_instrs(nir_shader *shader,