Mesa (master): intel/fs: work around gen12 lower-precision source modifier limitation
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Aug 10 20:42:37 UTC 2020
Module: Mesa
Branch: master
Commit: cf52b40fb0bf53816ca4bb90e31ecd146fbcb533
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf52b40fb0bf53816ca4bb90e31ecd146fbcb533
Author: Mark Janes <markjanes at swizzler.org>
Date: Fri Aug 7 13:11:08 2020 -0700
intel/fs: work around gen12 lower-precision source modifier limitation
GEN:BUG:1604601757 prevents source modifiers for multiplication of
lower precision integers.
lower_mul_dword_inst() splits 32x32 multiplication into 32x16, and
needs to eliminate source modifiers in this case.
Closes: #3329
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
---
src/intel/compiler/brw_fs.cpp | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index a89c53ea5a5..dbf7391baef 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -3930,7 +3930,20 @@ fs_visitor::lower_mul_dword_inst(fs_inst *inst, bblock_t *block)
high.offset = inst->dst.offset % REG_SIZE;
if (devinfo->gen >= 7) {
- if (inst->src[1].abs)
+ /* From GEN:BUG:1604601757:
+ *
+ * "When multiplying a DW and any lower precision integer, source modifier
+ * is not supported."
+ *
+ * An unsupported negate modifier on src[1] would ordinarily be
+ * lowered by the subsequent lower_regioning pass. In this case that
+ * pass would spawn another dword multiply. Instead, lower the
+ * modifier first.
+ */
+ const bool source_mods_unsupported = (devinfo->gen >= 12);
+
+ if (inst->src[1].abs || (inst->src[1].negate &&
+ source_mods_unsupported))
lower_src_modifiers(this, block, inst, 1);
if (inst->src[1].file == IMM) {
More information about the mesa-commit
mailing list