From d5d8bb1dbbb04907c8c00680ba334b38bb06b9e2 Mon Sep 17 00:00:00 2001 From: Oleksii Bozhenko Date: Wed, 7 Dec 2022 19:27:45 +0200 Subject: [PATCH] brw: fix saturate propagation region overlap range Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/commit/947c828d5cbffe9640ac63103a6223112eeff27f Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7691 Reviewed-by: Lionel Landwerlin Reviewed-by: Matt Turner Reviewed-by: Ian Romanick Signed-off-by: Oleksii Bozhenko Part-of: --- src/intel/compiler/brw_fs_saturate_propagation.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/brw_fs_saturate_propagation.cpp b/src/intel/compiler/brw_fs_saturate_propagation.cpp index 50c3fc19f3b..50b05dd92b8 100644 --- a/src/intel/compiler/brw_fs_saturate_propagation.cpp +++ b/src/intel/compiler/brw_fs_saturate_propagation.cpp @@ -126,8 +126,9 @@ opt_saturate_propagation_local(const fs_live_variables &live, bblock_t *block) 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 ||