[Mesa-dev] [PATCH 05/29] i965: Define consistent interface to enable instruction conditional modifiers.
Francisco Jerez
currojerez at riseup.net
Sat May 2 08:29:32 PDT 2015
---
src/mesa/drivers/dri/i965/brw_ir_fs.h | 11 +++++++++++
src/mesa/drivers/dri/i965/brw_ir_vec4.h | 11 +++++++++++
2 files changed, 22 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_ir_fs.h b/src/mesa/drivers/dri/i965/brw_ir_fs.h
index 9453b5d..db021a5 100644
--- a/src/mesa/drivers/dri/i965/brw_ir_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_ir_fs.h
@@ -290,4 +290,15 @@ exec_predicate(enum brw_predicate pred, fs_inst *inst)
return exec_predicate_inv(pred, false, inst);
}
+/**
+ * Write the result of evaluating the condition given by \p mod to a flag
+ * register.
+ */
+static inline fs_inst *
+exec_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 60dc8c1..a90c49d 100644
--- a/src/mesa/drivers/dri/i965/brw_ir_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_ir_vec4.h
@@ -223,6 +223,17 @@ exec_predicate(enum brw_predicate pred, vec4_instruction *inst)
{
return exec_predicate_inv(pred, false, inst);
}
+
+/**
+ * Write the result of evaluating the condition given by \p mod to a flag
+ * register.
+ */
+inline vec4_instruction *
+exec_condmod(enum brw_conditional_mod mod, vec4_instruction *inst)
+{
+ inst->conditional_mod = mod;
+ return inst;
+}
} /* namespace brw */
#endif
--
2.3.5
More information about the mesa-dev
mailing list