Mesa (staging/22.0): microsoft/compiler: Only treat tess level location as special if it's a patch constant

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 8 05:53:10 UTC 2022


Module: Mesa
Branch: staging/22.0
Commit: 68242654f80b9f24156175128e1afa9352878a59
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=68242654f80b9f24156175128e1afa9352878a59

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Wed Feb  2 12:39:14 2022 -0800

microsoft/compiler: Only treat tess level location as special if it's a patch constant

Fixes: a550c059 ("microsoft/compiler: For load_input from DS, use loadPatchConstant")
Reviewed-by: Bill Kristiansen <billkris at microsoft.com>
Reviewed-By: Sil Vilerino <sivileri at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>
(cherry picked from commit ce6dbbabf9371a66ce52eba81e6ab394a2a6f7d1)

---

 .pick_status.json                    |  2 +-
 src/microsoft/compiler/nir_to_dxil.c | 10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 1c00d5a3a3d..4a99292c56b 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1066,7 +1066,7 @@
         "description": "microsoft/compiler: Only treat tess level location as special if it's a patch constant",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "a550c059c735667266533258a25c0953c58adb3f"
     },
diff --git a/src/microsoft/compiler/nir_to_dxil.c b/src/microsoft/compiler/nir_to_dxil.c
index 166ff2da232..17864fb7aae 100644
--- a/src/microsoft/compiler/nir_to_dxil.c
+++ b/src/microsoft/compiler/nir_to_dxil.c
@@ -3094,8 +3094,9 @@ emit_store_output_via_intrinsic(struct ntd_context *ctx, nir_intrinsic_instr *in
     * generation, so muck with them here too.
     */
    nir_io_semantics semantics = nir_intrinsic_io_semantics(intr);
-   bool is_tess_level = semantics.location == VARYING_SLOT_TESS_LEVEL_INNER ||
-                        semantics.location == VARYING_SLOT_TESS_LEVEL_OUTER;
+   bool is_tess_level = is_patch_constant &&
+                        (semantics.location == VARYING_SLOT_TESS_LEVEL_INNER ||
+                         semantics.location == VARYING_SLOT_TESS_LEVEL_OUTER);
 
    const struct dxil_value *row = NULL;
    const struct dxil_value *col = NULL;
@@ -3198,8 +3199,9 @@ emit_load_input_via_intrinsic(struct ntd_context *ctx, nir_intrinsic_instr *intr
     * generation, so muck with them here too.
     */
    nir_io_semantics semantics = nir_intrinsic_io_semantics(intr);
-   bool is_tess_level = semantics.location == VARYING_SLOT_TESS_LEVEL_INNER ||
-                        semantics.location == VARYING_SLOT_TESS_LEVEL_OUTER;
+   bool is_tess_level = is_patch_constant &&
+                        (semantics.location == VARYING_SLOT_TESS_LEVEL_INNER ||
+                         semantics.location == VARYING_SLOT_TESS_LEVEL_OUTER);
 
    const struct dxil_value *row = NULL;
    const struct dxil_value *comp = NULL;



More information about the mesa-commit mailing list