summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Natalie <jenatali@microsoft.com>2021-04-19 10:07:40 -0700
committerEric Engestrom <eric@engestrom.ch>2021-04-20 19:42:30 +0200
commit77f6ec705a1726044db8699e5e1d3fdb29e173ea (patch)
tree611e03c8eff90e902bc943f9db7241dc0412f494 /src
parente43d870ac5ce1cfc45287267c876500fef559742 (diff)
d3d12: Fix MSVC warning C4334 (32bit shift cast to 64bit)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-By: Bill Kristiansen <billkris@microsoft.com> Cc: mesa-stable@lists.freedesktop.org Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10331> (cherry picked from commit 1a0fbca1bdf7e27e609d6fc8d7a26cd055fcc7a7)
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/d3d12/d3d12_gs_variant.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/d3d12/d3d12_gs_variant.cpp b/src/gallium/drivers/d3d12/d3d12_gs_variant.cpp
index 15820f01999..4801285dbe9 100644
--- a/src/gallium/drivers/d3d12/d3d12_gs_variant.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_gs_variant.cpp
@@ -323,7 +323,7 @@ d3d12_emit_points(struct d3d12_context *ctx, struct d3d12_gs_variant_key *key)
* EmitVertex();
*/
for (unsigned i = 0; i < emit_ctx.num_vars; ++i) {
- nir_ssa_def *index = (key->flat_varyings & (1 << emit_ctx.in[i]->data.location)) ?
+ nir_ssa_def *index = (key->flat_varyings & (1ull << emit_ctx.in[i]->data.location)) ?
nir_imm_int(b, (key->flatshade_first ? 0 : 2)) : emit_ctx.loop_index;
nir_deref_instr *in_value = nir_build_deref_array(b, nir_build_deref_var(b, emit_ctx.in[i]), index);
if (emit_ctx.in[i]->data.location == VARYING_SLOT_POS && emit_ctx.edgeflag_cmp) {
@@ -356,7 +356,7 @@ d3d12_emit_lines(struct d3d12_context *ctx, struct d3d12_gs_variant_key *key)
/* First vertex */
for (unsigned i = 0; i < emit_ctx.num_vars; ++i) {
- nir_ssa_def *index = (key->flat_varyings & (1 << emit_ctx.in[i]->data.location)) ?
+ nir_ssa_def *index = (key->flat_varyings & (1ull << emit_ctx.in[i]->data.location)) ?
nir_imm_int(b, (key->flatshade_first ? 0 : 2)) : emit_ctx.loop_index;
nir_deref_instr *in_value = nir_build_deref_array(b, nir_build_deref_var(b, emit_ctx.in[i]), index);
nir_copy_deref(b, nir_build_deref_var(b, emit_ctx.out[i]), in_value);
@@ -370,7 +370,7 @@ d3d12_emit_lines(struct d3d12_context *ctx, struct d3d12_gs_variant_key *key)
nir_ssa_def *index = next_index;
if (emit_ctx.in[i]->data.location == VARYING_SLOT_POS)
index = nir_bcsel(b, emit_ctx.edgeflag_cmp, next_index, emit_ctx.loop_index);
- else if (key->flat_varyings & (1 << emit_ctx.in[i]->data.location))
+ else if (key->flat_varyings & (1ull << emit_ctx.in[i]->data.location))
index = nir_imm_int(b, 2);
nir_copy_deref(b, nir_build_deref_var(b, emit_ctx.out[i]),
nir_build_deref_array(b, nir_build_deref_var(b, emit_ctx.in[i]), index));