unsigned sfid;
if (devinfo->gen >= 7) {
- sfid = GEN7_SFID_DATAPORT_DATA_CACHE;
+ if (target_cache == BRW_DATAPORT_READ_TARGET_RENDER_CACHE)
+ sfid = GEN6_SFID_DATAPORT_RENDER_CACHE;
+ else if (target_cache == BRW_DATAPORT_READ_TARGET_DATA_CACHE)
+ sfid = GEN7_SFID_DATAPORT_DATA_CACHE;
+ else if (target_cache == BRW_DATAPORT_READ_TARGET_SAMPLER_CACHE)
+ sfid = GEN6_SFID_DATAPORT_SAMPLER_CACHE;
+ else
+ unreachable("Invalid target cache");
+
} else if (devinfo->gen == 6) {
if (target_cache == BRW_DATAPORT_READ_TARGET_RENDER_CACHE)
sfid = GEN6_SFID_DATAPORT_RENDER_CACHE;
num_regs == 2 ? BRW_DATAPORT_OWORD_BLOCK_4_OWORDS :
num_regs == 4 ? BRW_DATAPORT_OWORD_BLOCK_8_OWORDS : 0);
assert(msg_control);
+ const unsigned target_cache = devinfo->gen >= 7 ?
+ BRW_DATAPORT_READ_TARGET_DATA_CACHE :
+ BRW_DATAPORT_READ_TARGET_RENDER_CACHE;
{
brw_push_insn_state(p);
brw_scratch_surface_idx(p),
msg_control,
BRW_DATAPORT_READ_MESSAGE_OWORD_BLOCK_READ, /* msg_type */
- BRW_DATAPORT_READ_TARGET_RENDER_CACHE,
+ target_cache,
1, /* msg_length */
true, /* header_present */
rlen);
else
msg_type = BRW_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ;
+ const unsigned target_cache = devinfo->gen >= 7 ?
+ BRW_DATAPORT_READ_TARGET_DATA_CACHE :
+ BRW_DATAPORT_READ_TARGET_RENDER_CACHE;
+
/* Each of the 8 channel enables is considered for whether each
* dword is written.
*/
brw_set_dp_read_message(p, send,
brw_scratch_surface_idx(p),
BRW_DATAPORT_OWORD_DUAL_BLOCK_1OWORD,
- msg_type,
- BRW_DATAPORT_READ_TARGET_RENDER_CACHE,
+ msg_type, target_cache,
2, /* mlen */
true, /* header_present */
1 /* rlen */);