summaryrefslogtreecommitdiffstats
path: root/src/intel/compiler
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2018-06-02 15:08:18 -0700
committerFrancisco Jerez <[email protected]>2018-07-09 23:46:58 -0700
commit6f81e2b9943c3d2f42b96e1c158e253ba0283784 (patch)
tree9e30f68b69b458b7f3c45d672ff5a95b557bb80e /src/intel/compiler
parentb3cce4c1308748c6a0de833ff0ddf07e62ade6b7 (diff)
intel/eu: Get rid of the return value of brw_send_indirect_message().
The return value is not used anymore. This allows simplifying the code slightly, and in addition it should frustrate anybody's attempts to continue using the obsolete piecemeal approach to construct a message descriptor in combination with brw_send_indirect_message(). Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/compiler')
-rw-r--r--src/intel/compiler/brw_eu.h8
-rw-r--r--src/intel/compiler/brw_eu_emit.c17
2 files changed, 5 insertions, 20 deletions
diff --git a/src/intel/compiler/brw_eu.h b/src/intel/compiler/brw_eu.h
index 884f1fbaabe..3824ab2ec6a 100644
--- a/src/intel/compiler/brw_eu.h
+++ b/src/intel/compiler/brw_eu.h
@@ -394,13 +394,9 @@ void brw_urb_WRITE(struct brw_codegen *p,
/**
* Send message to shared unit \p sfid with a possibly indirect descriptor \p
* desc. If \p desc is not an immediate it will be transparently loaded to an
- * address register using an OR instruction. The returned instruction can be
- * passed as argument to the usual brw_set_*_message() functions in order to
- * specify any additional descriptor bits -- If \p desc is an immediate this
- * will be the SEND instruction itself, otherwise it will be the OR
- * instruction.
+ * address register using an OR instruction.
*/
-struct brw_inst *
+void
brw_send_indirect_message(struct brw_codegen *p,
unsigned sfid,
struct brw_reg dst,
diff --git a/src/intel/compiler/brw_eu_emit.c b/src/intel/compiler/brw_eu_emit.c
index 00e255461e1..2346d1a966c 100644
--- a/src/intel/compiler/brw_eu_emit.c
+++ b/src/intel/compiler/brw_eu_emit.c
@@ -2418,7 +2418,7 @@ void brw_urb_WRITE(struct brw_codegen *p,
swizzle);
}
-struct brw_inst *
+void
brw_send_indirect_message(struct brw_codegen *p,
unsigned sfid,
struct brw_reg dst,
@@ -2428,20 +2428,12 @@ brw_send_indirect_message(struct brw_codegen *p,
{
const struct gen_device_info *devinfo = p->devinfo;
struct brw_inst *send;
- int setup;
dst = retype(dst, BRW_REGISTER_TYPE_UW);
assert(desc.type == BRW_REGISTER_TYPE_UD);
- /* We hold on to the setup instruction (the SEND in the direct case, the OR
- * in the indirect case) by its index in the instruction store. The
- * pointer returned by next_insn() may become invalid if emitting the SEND
- * in the indirect case reallocs the store.
- */
-
if (desc.file == BRW_IMMEDIATE_VALUE) {
- setup = p->nr_insn;
send = next_insn(p, BRW_OPCODE_SEND);
brw_set_desc(p, send, desc.ud | desc_imm);
@@ -2455,10 +2447,9 @@ brw_send_indirect_message(struct brw_codegen *p,
brw_set_default_predicate_control(p, BRW_PREDICATE_NONE);
/* Load the indirect descriptor to an address register using OR so the
- * caller can specify additional descriptor bits with the usual
- * brw_set_*_message() helper functions.
+ * caller can specify additional descriptor bits with the desc_imm
+ * immediate.
*/
- setup = p->nr_insn;
brw_OR(p, addr, desc, brw_imm_ud(desc_imm));
brw_pop_insn_state(p);
@@ -2473,8 +2464,6 @@ brw_send_indirect_message(struct brw_codegen *p,
brw_set_dest(p, send, dst);
brw_set_src0(p, send, retype(payload, BRW_REGISTER_TYPE_UD));
brw_inst_set_sfid(devinfo, send, sfid);
-
- return &p->store[setup];
}
static void