mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 21:30:23 +01:00
i965/eu: Take into account the target cache argument in brw_set_dp_read_message.
brw_set_dp_read_message() was setting the data cache as send message SFID on Gen7+ hardware, ignoring the target cache specified by the caller. Some of the callers were passing a bogus target cache value as argument relying on brw_set_dp_read_message not to take it into account. Fix them too. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
8a2f19a777
commit
29eb8059fd
2 changed files with 18 additions and 4 deletions
|
|
@ -756,7 +756,15 @@ brw_set_dp_read_message(struct brw_codegen *p,
|
|||
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;
|
||||
|
|
@ -2204,6 +2212,9 @@ brw_oword_block_read_scratch(struct brw_codegen *p,
|
|||
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);
|
||||
|
|
@ -2238,7 +2249,7 @@ brw_oword_block_read_scratch(struct brw_codegen *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);
|
||||
|
|
|
|||
|
|
@ -1140,6 +1140,10 @@ generate_scratch_read(struct brw_codegen *p,
|
|||
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.
|
||||
*/
|
||||
|
|
@ -1151,8 +1155,7 @@ generate_scratch_read(struct brw_codegen *p,
|
|||
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 */);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue