intel/fs: Stop using brw_dp_read/write_desc in Gen7+ only code
Those helpers exist primarily to sort out some of the weirdness around Gen4-6 dataport access. On Gen5 and earlier, everything was called "dataport" and, instead of the SFID we have today there was a "target cache" parameter in the descriptor. There are also some bits that moved around on various gens depending on read vs. write. Starting with Gen6, most things which target one of the data cache SFIDs should use brw_dp_desc() instead. v2: Drop backward comment (Ken) Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7455>
This commit is contained in:

committed by
Marge Bot

parent
2e7656ae2f
commit
34c560ae95
@@ -909,10 +909,9 @@ fs_reg_alloc::emit_unspill(const fs_builder &bld, fs_reg dst,
|
||||
unspill_inst->send_is_volatile = true;
|
||||
unspill_inst->sfid = GFX7_SFID_DATAPORT_DATA_CACHE;
|
||||
unspill_inst->desc =
|
||||
brw_dp_read_desc(devinfo, GFX8_BTI_STATELESS_NON_COHERENT,
|
||||
BRW_DATAPORT_OWORD_BLOCK_DWORDS(reg_size * 8),
|
||||
BRW_DATAPORT_READ_MESSAGE_OWORD_BLOCK_READ,
|
||||
BRW_DATAPORT_READ_TARGET_RENDER_CACHE);
|
||||
brw_dp_desc(devinfo, GFX8_BTI_STATELESS_NON_COHERENT,
|
||||
BRW_DATAPORT_READ_MESSAGE_OWORD_BLOCK_READ,
|
||||
BRW_DATAPORT_OWORD_BLOCK_DWORDS(reg_size * 8));
|
||||
} else if (devinfo->ver >= 7 && spill_offset < (1 << 12) * REG_SIZE) {
|
||||
/* The Gfx7 descriptor-based offset is 12 bits of HWORD units.
|
||||
* Because the Gfx7-style scratch block read is hardwired to BTI 255,
|
||||
@@ -966,10 +965,9 @@ fs_reg_alloc::emit_spill(const fs_builder &bld, fs_reg src,
|
||||
spill_inst->send_is_volatile = false;
|
||||
spill_inst->sfid = GFX7_SFID_DATAPORT_DATA_CACHE;
|
||||
spill_inst->desc =
|
||||
brw_dp_write_desc(devinfo, GFX8_BTI_STATELESS_NON_COHERENT,
|
||||
BRW_DATAPORT_OWORD_BLOCK_DWORDS(reg_size * 8),
|
||||
GFX6_DATAPORT_WRITE_MESSAGE_OWORD_BLOCK_WRITE,
|
||||
false /* send_commit_msg */);
|
||||
brw_dp_desc(devinfo, GFX8_BTI_STATELESS_NON_COHERENT,
|
||||
GFX6_DATAPORT_WRITE_MESSAGE_OWORD_BLOCK_WRITE,
|
||||
BRW_DATAPORT_OWORD_BLOCK_DWORDS(reg_size * 8));
|
||||
} else {
|
||||
spill_inst = bld.emit(SHADER_OPCODE_GFX4_SCRATCH_WRITE,
|
||||
bld.null_reg_f(), src);
|
||||
|
Reference in New Issue
Block a user