diff options
author | Jason Ekstrand <[email protected]> | 2018-11-14 22:38:23 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-02-01 16:10:57 -0600 |
commit | 79724a07562dae79f00005b61bda4664287989ee (patch) | |
tree | 99117906d9d30c626f1ff1971326eb2453b0cae8 /src | |
parent | f02914a991a19de6a54e45d760eb9de8f4bbae46 (diff) |
intel/fs: Properly handle 64-bit types in LOAD_PAYLOAD
By just assigning dst.type to src[i].type, we ensure that the offset at
the end of the loop actually offsets it by the right number of
registers. Otherwise, we'll get into a case where we copy with a Q type
and then offset with a D type and things get out of sync.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/compiler/brw_fs.cpp | 8 | ||||
-rw-r--r-- | src/intel/compiler/brw_fs_cse.cpp | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 8dd3b94fbd5..303b1c1b272 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -3799,8 +3799,12 @@ fs_visitor::lower_load_payload() } for (uint8_t i = inst->header_size; i < inst->sources; i++) { - if (inst->src[i].file != BAD_FILE) - ibld.MOV(retype(dst, inst->src[i].type), inst->src[i]); + if (inst->src[i].file != BAD_FILE) { + dst.type = inst->src[i].type; + ibld.MOV(dst, inst->src[i]); + } else { + dst.type = BRW_REGISTER_TYPE_UD; + } dst = offset(dst, ibld, 1); } diff --git a/src/intel/compiler/brw_fs_cse.cpp b/src/intel/compiler/brw_fs_cse.cpp index bd917baaa6d..6efa111b1a4 100644 --- a/src/intel/compiler/brw_fs_cse.cpp +++ b/src/intel/compiler/brw_fs_cse.cpp @@ -216,6 +216,7 @@ create_copy_instr(const fs_builder &bld, fs_inst *inst, fs_reg src, bool negate) src.offset += REG_SIZE; } for (int i = inst->header_size; i < inst->sources; i++) { + src.type = inst->src[i].type; payload[i] = src; src = offset(src, bld, 1); } |