diff options
author | Chris Forbes <[email protected]> | 2014-08-03 11:44:25 +1200 |
---|---|---|
committer | Chris Forbes <[email protected]> | 2014-08-15 18:53:47 +1200 |
commit | 3512c79789e3b924c4f639a157cac7b80fea16f2 (patch) | |
tree | 5c9c053283bbb051d882ea380b78327e9e4a8542 | |
parent | 35ca28816509a887538a6d0c62c96279b38ef8e4 (diff) |
i965: Add low-level support for indirect sends
This provides a reasonable place to enforce the hardware restriction
that indirect descriptors must be in a0.0
Signed-off-by: Chris Forbes <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu.h | 5 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu_emit.c | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h index 93f03454a27..5122e6336aa 100644 --- a/src/mesa/drivers/dri/i965/brw_eu.h +++ b/src/mesa/drivers/dri/i965/brw_eu.h @@ -205,6 +205,11 @@ void brw_set_sampler_message(struct brw_compile *p, unsigned simd_mode, unsigned return_format); +void brw_set_indirect_send_descriptor(struct brw_compile *p, + brw_inst *insn, + unsigned sfid, + struct brw_reg descriptor); + void brw_set_dp_read_message(struct brw_compile *p, brw_inst *insn, unsigned binding_table_index, diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 65c06eccabd..c2a40832998 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -760,6 +760,21 @@ brw_set_sampler_message(struct brw_compile *p, } } +void brw_set_indirect_send_descriptor(struct brw_compile *p, + brw_inst *insn, + unsigned sfid, + struct brw_reg descriptor) +{ + /* Only a0.0 may be used as SEND's descriptor operand. */ + assert(descriptor.file == BRW_ARCHITECTURE_REGISTER_FILE); + assert(descriptor.type == BRW_REGISTER_TYPE_UD); + assert(descriptor.nr == BRW_ARF_ADDRESS); + assert(descriptor.subnr == 0); + + brw_set_message_descriptor(p, insn, sfid, 0, 0, false, false); + brw_set_src1(p, insn, descriptor); +} + static void gen7_set_dp_scratch_message(struct brw_compile *p, brw_inst *inst, |