i965/fs: Fix lower_load_payload() to take into account non-zero reg_offset.
Fixes metadata guess when instructions in the program specify a destination register with non-zero reg_offset and when the payload of a LOAD_PAYLOAD spans several registers. Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
This commit is contained in:
@@ -3127,7 +3127,7 @@ fs_visitor::lower_load_payload()
|
|||||||
|
|
||||||
foreach_block_and_inst_safe (block, fs_inst, inst, cfg) {
|
foreach_block_and_inst_safe (block, fs_inst, inst, cfg) {
|
||||||
if (inst->dst.file == GRF) {
|
if (inst->dst.file == GRF) {
|
||||||
const int dst_reg = vgrf_to_reg[inst->dst.reg];
|
const int dst_reg = vgrf_to_reg[inst->dst.reg] + inst->dst.reg_offset;
|
||||||
bool force_sechalf = inst->force_sechalf &&
|
bool force_sechalf = inst->force_sechalf &&
|
||||||
!inst->force_writemask_all;
|
!inst->force_writemask_all;
|
||||||
bool toggle_sechalf = inst->dst.width == 16 &&
|
bool toggle_sechalf = inst->dst.width == 16 &&
|
||||||
@@ -3176,7 +3176,7 @@ fs_visitor::lower_load_payload()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dst.file == GRF) {
|
if (dst.file == GRF) {
|
||||||
const int dst_reg = vgrf_to_reg[dst.reg];
|
const int dst_reg = vgrf_to_reg[dst.reg] + dst.reg_offset;
|
||||||
const bool force_writemask = mov->force_writemask_all;
|
const bool force_writemask = mov->force_writemask_all;
|
||||||
metadata[dst_reg].force_writemask_all = force_writemask;
|
metadata[dst_reg].force_writemask_all = force_writemask;
|
||||||
metadata[dst_reg].force_sechalf = mov->force_sechalf;
|
metadata[dst_reg].force_sechalf = mov->force_sechalf;
|
||||||
|
Reference in New Issue
Block a user