Mesa (staging/21.3): intel/fs/xehp: Teach SWSB pass about the exec pipeline of FS_OPCODE_PACK_HALF_2x16_SPLIT.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Dec 12 22:36:42 UTC 2021


Module: Mesa
Branch: staging/21.3
Commit: c646b1df12fa831290c38a6020ecba0bea74bd8c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c646b1df12fa831290c38a6020ecba0bea74bd8c

Author: Francisco Jerez <currojerez at riseup.net>
Date:   Mon Nov 29 23:45:50 2021 -0800

intel/fs/xehp: Teach SWSB pass about the exec pipeline of FS_OPCODE_PACK_HALF_2x16_SPLIT.

This virtual instruction is translated into multiple half float
physical instructions, even though its destination is typically of
integer type, which prevents the software scoreboard pass from
inferring the correct execution pipeline for the virtual instruction
on XeHP+ platforms.  Teach the SWSB lowering pass about this
inconsistency between the IR and physical instruction types.

Fixes among other tests:

dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packhalf2x16_compute

Fixes: d4537770bbf ("intel/fs: Add helper functions inferring sync and exec pipeline of an instruction.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5685
Reported-by: Tapani Pälli <tapani.palli at intel.com>
Tested-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Reviewed-by: Caio Oliveira <caio.oliveira at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14002>
(cherry picked from commit de55fd358fa4b3e3620145c71557090403b8ec6c)

---

 .pick_status.json                        | 2 +-
 src/intel/compiler/brw_fs_scoreboard.cpp | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 4fd776ff615..966c95f2797 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1102,7 +1102,7 @@
         "description": "intel/fs/xehp: Teach SWSB pass about the exec pipeline of FS_OPCODE_PACK_HALF_2x16_SPLIT.",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "d4537770bbf6c78d49dc71abe2f79099448339eb"
     },
diff --git a/src/intel/compiler/brw_fs_scoreboard.cpp b/src/intel/compiler/brw_fs_scoreboard.cpp
index 4176f54c908..7b0d2101cb8 100644
--- a/src/intel/compiler/brw_fs_scoreboard.cpp
+++ b/src/intel/compiler/brw_fs_scoreboard.cpp
@@ -122,6 +122,8 @@ namespace {
       else if (inst->opcode == SHADER_OPCODE_BROADCAST &&
                !devinfo->has_64bit_float && type_sz(t) >= 8)
          return TGL_PIPE_INT;
+      else if (inst->opcode == FS_OPCODE_PACK_HALF_2x16_SPLIT)
+         return TGL_PIPE_FLOAT;
       else if (type_sz(inst->dst.type) >= 8 || type_sz(t) >= 8 ||
                is_dword_multiply)
          return TGL_PIPE_LONG;



More information about the mesa-commit mailing list