Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/commit/
947c828d5cbffe9640ac63103a6223112eeff27f
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7691
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Oleksii Bozhenko <oleksii.bozhenko@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20206>
for (int i = 0; i < scan_inst->sources; i++) {
if (scan_inst->src[i].file == VGRF &&
scan_inst->src[i].nr == inst->src[0].nr &&
- scan_inst->src[i].offset / REG_SIZE ==
- inst->src[0].offset / REG_SIZE) {
+ regions_overlap(
+ scan_inst->src[i], scan_inst->size_read(i),
+ inst->src[0], inst->size_read(0))) {
if (scan_inst->opcode != BRW_OPCODE_MOV ||
!scan_inst->saturate ||
scan_inst->src[0].abs ||