From 16b9f87104be16e4726f42970bd13655c7e3c857 Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Fri, 1 Apr 2022 15:06:36 -0700 Subject: [PATCH] intel/compiler: on MTL, DF instructions run in the math pipe Adjust the scoreboard code to take that into account. Fixes at least: - dEQP-VK.glsl.builtin.precision_double.refract.compute.vec3 - dEQP-VK.glsl.builtin.precision_double.matrixcompmult.compute.mat4 v2: use intel_device_info_is_mtl() (Curro, Jordan) Reviewed-by: Francisco Jerez Signed-off-by: Paulo Zanoni Part-of: --- src/intel/compiler/brw_fs_scoreboard.cpp | 7 ++++++- src/intel/compiler/brw_ir_fs.h | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/brw_fs_scoreboard.cpp b/src/intel/compiler/brw_fs_scoreboard.cpp index 34c2f537317..f4e9915fc88 100644 --- a/src/intel/compiler/brw_fs_scoreboard.cpp +++ b/src/intel/compiler/brw_fs_scoreboard.cpp @@ -1003,6 +1003,11 @@ namespace { const ordered_address jp = p ? ordered_address(p, jps[ip].jp[IDX(p)]) : ordered_address(); const bool is_ordered = ordered_unit(devinfo, inst, IDX(TGL_PIPE_ALL)); + const bool uses_math_pipe = + inst->is_math() || + (intel_device_info_is_mtl(devinfo) && + (get_exec_type(inst) == BRW_REGISTER_TYPE_DF || + inst->dst.type == BRW_REGISTER_TYPE_DF)); /* Track any source registers that may be fetched asynchronously by this * instruction, otherwise clear the dependency in order to avoid @@ -1011,7 +1016,7 @@ namespace { for (unsigned i = 0; i < inst->sources; i++) { const dependency rd_dep = (inst->is_payload(i) || - inst->is_math()) ? dependency(TGL_SBID_SRC, ip, exec_all) : + uses_math_pipe) ? dependency(TGL_SBID_SRC, ip, exec_all) : is_ordered ? dependency(TGL_REGDIST_SRC, jp, exec_all) : dependency::done; diff --git a/src/intel/compiler/brw_ir_fs.h b/src/intel/compiler/brw_ir_fs.h index 525e5917821..d6d6d3e25bd 100644 --- a/src/intel/compiler/brw_ir_fs.h +++ b/src/intel/compiler/brw_ir_fs.h @@ -548,7 +548,10 @@ is_send(const fs_inst *inst) static inline bool is_unordered(const intel_device_info *devinfo, const fs_inst *inst) { - return is_send(inst) || inst->is_math(); + return is_send(inst) || inst->is_math() || + (intel_device_info_is_mtl(devinfo) && + (get_exec_type(inst) == BRW_REGISTER_TYPE_DF || + inst->dst.type == BRW_REGISTER_TYPE_DF)); } /**