Mesa (main): intel/compiler: Deprecate ld2dms and use ld2dms_w instead

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Nov 23 07:08:05 UTC 2021


Module: Mesa
Branch: main
Commit: 31e3e32625e6332608a3b5ed18d2e4df82a8c27d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=31e3e32625e6332608a3b5ed18d2e4df82a8c27d

Author: Topi Pohjolainen <topi.pohjolainen at intel.com>
Date:   Tue Jul  7 23:23:36 2020 -0700

intel/compiler: Deprecate ld2dms and use ld2dms_w instead

Reviewed-by: Sagar Ghuge <sagar.ghuge at intel.com>
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11766>

---

 src/intel/compiler/brw_fs_nir.cpp | 29 +++++++++++++++++++++++++----
 1 file changed, 25 insertions(+), 4 deletions(-)

diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp
index 1d533d233df..dc13de3f058 100644
--- a/src/intel/compiler/brw_fs_nir.cpp
+++ b/src/intel/compiler/brw_fs_nir.cpp
@@ -3334,9 +3334,23 @@ fs_visitor::emit_non_coherent_fb_read(const fs_builder &bld, const fs_reg &dst,
     * message just in case the framebuffer uses 16x multisampling, it should
     * be equivalent to the normal CMS fetch for lower multisampling modes.
     */
-   const opcode op = !wm_key->multisample_fbo ? SHADER_OPCODE_TXF_LOGICAL :
-                     devinfo->ver >= 9 ? SHADER_OPCODE_TXF_CMS_W_LOGICAL :
-                     SHADER_OPCODE_TXF_CMS_LOGICAL;
+   opcode op;
+   if (wm_key->multisample_fbo) {
+      /* On SKL+ use the wide CMS message just in case the framebuffer uses 16x
+       * multisampling, it should be equivalent to the normal CMS fetch for
+       * lower multisampling modes.
+       *
+       * On Gfx12HP, there is only CMS_W variant available.
+       */
+      if (devinfo->verx10 >= 125)
+         op = SHADER_OPCODE_TXF_CMS_W_GFX12_LOGICAL;
+      else if (devinfo->ver >= 9)
+         op = SHADER_OPCODE_TXF_CMS_W_LOGICAL;
+      else
+         op = SHADER_OPCODE_TXF_CMS_LOGICAL;
+   } else {
+      op = SHADER_OPCODE_TXF_LOGICAL;
+   }
 
    /* Emit the instruction. */
    fs_reg srcs[TEX_LOGICAL_NUM_SRCS];
@@ -6200,7 +6214,14 @@ fs_visitor::nir_emit_texture(const fs_builder &bld, nir_tex_instr *instr)
       opcode = SHADER_OPCODE_TXF_LOGICAL;
       break;
    case nir_texop_txf_ms:
-      if ((key_tex->msaa_16 & (1 << sampler)))
+      /* On Gfx12HP there is only CMS_W available. From the Bspec: Shared
+       * Functions - 3D Sampler - Messages - Message Format:
+       *
+       *   ld2dms REMOVEDBY(GEN:HAS:1406788836)
+       */
+      if (devinfo->verx10 >= 125)
+         opcode = SHADER_OPCODE_TXF_CMS_W_GFX12_LOGICAL;
+      else if ((key_tex->msaa_16 & (1 << sampler)))
          opcode = SHADER_OPCODE_TXF_CMS_W_LOGICAL;
       else
          opcode = SHADER_OPCODE_TXF_CMS_LOGICAL;



More information about the mesa-commit mailing list