[Mesa-dev] [PATCH 02/23] intel/eu: Define helper to specify the descriptor immediates of a SEND instruction.
Francisco Jerez
currojerez at riseup.net
Tue Jun 12 02:25:54 UTC 2018
---
src/intel/compiler/brw_eu.h | 9 +++++++++
src/intel/compiler/brw_eu_emit.c | 17 +++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/src/intel/compiler/brw_eu.h b/src/intel/compiler/brw_eu.h
index 0f07eeb3d6d..5a396339fde 100644
--- a/src/intel/compiler/brw_eu.h
+++ b/src/intel/compiler/brw_eu.h
@@ -600,6 +600,15 @@ void brw_math_invert( struct brw_codegen *p,
void brw_set_src1(struct brw_codegen *p, brw_inst *insn, struct brw_reg reg);
+void brw_set_desc_ex(struct brw_codegen *p, brw_inst *insn,
+ unsigned desc, unsigned ex_desc);
+
+static inline void
+brw_set_desc(struct brw_codegen *p, brw_inst *insn, unsigned desc)
+{
+ brw_set_desc_ex(p, insn, desc, 0);
+}
+
void brw_set_uip_jip(struct brw_codegen *p, int start_offset);
enum brw_conditional_mod brw_negate_cmod(uint32_t cmod);
diff --git a/src/intel/compiler/brw_eu_emit.c b/src/intel/compiler/brw_eu_emit.c
index d3246edde44..ab9af718152 100644
--- a/src/intel/compiler/brw_eu_emit.c
+++ b/src/intel/compiler/brw_eu_emit.c
@@ -401,6 +401,23 @@ brw_set_message_descriptor(struct brw_codegen *p,
}
}
+/**
+ * Specify the descriptor and extended descriptor immediate for a SEND(C)
+ * message instruction.
+ */
+void
+brw_set_desc_ex(struct brw_codegen *p, brw_inst *inst,
+ unsigned desc, unsigned ex_desc)
+{
+ const struct gen_device_info *devinfo = p->devinfo;
+ brw_inst_set_src1_file_type(devinfo, inst,
+ BRW_IMMEDIATE_VALUE, BRW_REGISTER_TYPE_D);
+ brw_inst_set_send_desc(devinfo, inst, desc);
+ if (devinfo->gen >= 9 && (brw_inst_opcode(devinfo, inst) == BRW_OPCODE_SEND ||
+ brw_inst_opcode(devinfo, inst) == BRW_OPCODE_SENDC))
+ brw_inst_set_send_ex_desc(devinfo, inst, ex_desc);
+}
+
static void brw_set_math_message( struct brw_codegen *p,
brw_inst *inst,
unsigned function,
--
2.16.1
More information about the mesa-dev
mailing list