summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2015-06-03 21:24:18 +0300
committerFrancisco Jerez <[email protected]>2015-06-09 13:56:06 +0300
commit7624f8410f64a7ce0ba125a2025904c70610c076 (patch)
tree7ddd735b7c9df5371e220e4a663cecc2ad7a05f5 /src/mesa/drivers/dri
parent239dfc5410d98f3b31a06652ceff13d9858c1f9b (diff)
i965: Define consistent interface to enable instruction conditional modifiers.
v2: Use set_ prefix. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_ir_fs.h11
-rw-r--r--src/mesa/drivers/dri/i965/brw_ir_vec4.h11
2 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_ir_fs.h b/src/mesa/drivers/dri/i965/brw_ir_fs.h
index 660bab2c466..07af0082d9d 100644
--- a/src/mesa/drivers/dri/i965/brw_ir_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_ir_fs.h
@@ -293,4 +293,15 @@ set_predicate(enum brw_predicate pred, fs_inst *inst)
return set_predicate_inv(pred, false, inst);
}
+/**
+ * Write the result of evaluating the condition given by \p mod to a flag
+ * register.
+ */
+static inline fs_inst *
+set_condmod(enum brw_conditional_mod mod, fs_inst *inst)
+{
+ inst->conditional_mod = mod;
+ return inst;
+}
+
#endif
diff --git a/src/mesa/drivers/dri/i965/brw_ir_vec4.h b/src/mesa/drivers/dri/i965/brw_ir_vec4.h
index b9a5a251914..96d1cfbeb93 100644
--- a/src/mesa/drivers/dri/i965/brw_ir_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_ir_vec4.h
@@ -212,6 +212,17 @@ set_predicate(enum brw_predicate pred, vec4_instruction *inst)
return set_predicate_inv(pred, false, inst);
}
+/**
+ * Write the result of evaluating the condition given by \p mod to a flag
+ * register.
+ */
+inline vec4_instruction *
+set_condmod(enum brw_conditional_mod mod, vec4_instruction *inst)
+{
+ inst->conditional_mod = mod;
+ return inst;
+}
+
} /* namespace brw */
#endif