mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 00:10:20 +01:00
i965/fs: Remove logic to keep track of MRF metadata in lower_load_payload().
MRFs cannot be read from anyway so they cannot possibly be a valid source of LOAD_PAYLOAD. Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
This commit is contained in:
parent
8e47f51a5a
commit
08b4c8f7bf
1 changed files with 13 additions and 26 deletions
|
|
@ -3112,7 +3112,7 @@ fs_visitor::lower_load_payload()
|
|||
bool progress = false;
|
||||
|
||||
int vgrf_to_reg[alloc.count];
|
||||
int reg_count = 16; /* Leave room for MRF */
|
||||
int reg_count = 0;
|
||||
for (unsigned i = 0; i < alloc.count; ++i) {
|
||||
vgrf_to_reg[i] = reg_count;
|
||||
reg_count += alloc.sizes[i];
|
||||
|
|
@ -3126,15 +3126,8 @@ fs_visitor::lower_load_payload()
|
|||
memset(metadata, 0, sizeof(metadata));
|
||||
|
||||
foreach_block_and_inst_safe (block, fs_inst, inst, cfg) {
|
||||
int dst_reg;
|
||||
if (inst->dst.file == GRF) {
|
||||
dst_reg = vgrf_to_reg[inst->dst.reg];
|
||||
} else {
|
||||
/* MRF */
|
||||
dst_reg = inst->dst.reg;
|
||||
}
|
||||
|
||||
if (inst->dst.file == MRF || inst->dst.file == GRF) {
|
||||
const int dst_reg = vgrf_to_reg[inst->dst.reg];
|
||||
bool force_sechalf = inst->force_sechalf &&
|
||||
!inst->force_writemask_all;
|
||||
bool toggle_sechalf = inst->dst.width == 16 &&
|
||||
|
|
@ -3180,26 +3173,20 @@ fs_visitor::lower_load_payload()
|
|||
inst->src[i].reg_offset;
|
||||
mov->force_sechalf = metadata[src_reg].force_sechalf;
|
||||
mov->force_writemask_all = metadata[src_reg].force_writemask_all;
|
||||
metadata[dst_reg] = metadata[src_reg];
|
||||
}
|
||||
|
||||
if (dst.file == GRF) {
|
||||
const int dst_reg = vgrf_to_reg[dst.reg];
|
||||
const bool force_writemask = mov->force_writemask_all;
|
||||
metadata[dst_reg].force_writemask_all = force_writemask;
|
||||
metadata[dst_reg].force_sechalf = mov->force_sechalf;
|
||||
if (dst.width * type_sz(dst.type) > 32) {
|
||||
if (metadata[src_reg].force_writemask_all) {
|
||||
metadata[dst_reg + 1] = metadata[src_reg];
|
||||
} else {
|
||||
assert((!metadata[src_reg].written ||
|
||||
!metadata[src_reg].force_sechalf) &&
|
||||
(!metadata[src_reg + 1].written ||
|
||||
metadata[src_reg + 1].force_sechalf));
|
||||
metadata[dst_reg + 1] = metadata[src_reg + 1];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
metadata[dst_reg].force_writemask_all = false;
|
||||
metadata[dst_reg].force_sechalf = false;
|
||||
if (dst.width == 16) {
|
||||
metadata[dst_reg + 1].force_writemask_all = false;
|
||||
metadata[dst_reg + 1].force_sechalf = true;
|
||||
assert(!mov->force_sechalf);
|
||||
metadata[dst_reg + 1].force_writemask_all = force_writemask;
|
||||
metadata[dst_reg + 1].force_sechalf = !force_writemask;
|
||||
}
|
||||
}
|
||||
|
||||
inst->insert_before(block, mov);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue