summaryrefslogtreecommitdiffstats
path: root/src/intel/compiler/brw_eu_emit.c
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2018-06-02 13:48:42 -0700
committerFrancisco Jerez <[email protected]>2018-07-09 23:46:57 -0700
commitd0f589a55b51242f80c299187511db7f1b041712 (patch)
tree6a6be9c20ffb99897b13b24e0d4706d15403729a /src/intel/compiler/brw_eu_emit.c
parentf55884cad38516c2f6c62065c614a764c0a6f15e (diff)
intel/eu: Define helper to specify the descriptor immediates of a SEND instruction.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_eu_emit.c')
-rw-r--r--src/intel/compiler/brw_eu_emit.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_eu_emit.c b/src/intel/compiler/brw_eu_emit.c
index 46e34d3ba9a..5ac1498f0fc 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,