Mesa (master): microsoft/compiler: Fix MSVC warning C4334 (32bit shift cast to 64bit)

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 20 00:48:27 UTC 2021


Module: Mesa
Branch: master
Commit: 67b5fba62ae578f4748ec9acd667d7b74644cb3c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=67b5fba62ae578f4748ec9acd667d7b74644cb3c

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Mon Apr 19 10:08:52 2021 -0700

microsoft/compiler: Fix MSVC warning C4334 (32bit shift cast to 64bit)

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Reviewed-By: Bill Kristiansen <billkris at microsoft.com>
Cc: mesa-stable at lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10331>

---

 src/microsoft/compiler/nir_to_dxil.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/microsoft/compiler/nir_to_dxil.c b/src/microsoft/compiler/nir_to_dxil.c
index 348fbe64335..efe81c1d513 100644
--- a/src/microsoft/compiler/nir_to_dxil.c
+++ b/src/microsoft/compiler/nir_to_dxil.c
@@ -4687,7 +4687,7 @@ nir_var_to_dxil_sysvalue_type(nir_variable *var, uint64_t other_stage_mask)
    case VARYING_SLOT_CLIP_DIST0:
    case VARYING_SLOT_CLIP_DIST1:
    case VARYING_SLOT_PSIZ:
-      if (!((1 << var->data.location) & other_stage_mask))
+      if (!((1ull << var->data.location) & other_stage_mask))
          return DXIL_SYSVALUE;
       FALLTHROUGH;
    default:



More information about the mesa-commit mailing list