diff options
author | José Fonseca <[email protected]> | 2014-11-25 23:03:02 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2014-11-26 20:25:12 +0000 |
commit | a0ddc547779585b308feb70777f1f95f12c00a81 (patch) | |
tree | f5aede3f8ccec16783853ea653c2e7230d1f4672 /src/gallium/auxiliary/gallivm | |
parent | aef3a01d579214664cf2da58b0e4e1daf325a37e (diff) |
draw,gallivm,llvmpipe: Avoid implicit casts of 32-bit shifts to 64-bits.
Addresses MSVC warnings "result of 32-bit shift implicitly converted to
64 bits (was 64-bit shift intended?)", which can often be symptom of
bugs, but in these cases were all benign.
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_arit.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_sample.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index 87da355239c..cd05f111f19 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c @@ -932,7 +932,7 @@ lp_build_mul_norm(struct gallivm_state *gallivm, * half = sgn(ab) * 0.5 * (2 ** n) = sgn(ab) * (1 << (n - 1)) */ - half = lp_build_const_int_vec(gallivm, wide_type, 1 << (n - 1)); + half = lp_build_const_int_vec(gallivm, wide_type, 1LL << (n - 1)); if (wide_type.sign) { LLVMValueRef minus_half = LLVMBuildNeg(builder, half, ""); LLVMValueRef sign = lp_build_shr_imm(&bld, ab, wide_type.width - 1); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c index 85c0d4ed6f8..8cee994ee6d 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c @@ -1641,7 +1641,7 @@ lp_build_cube_lookup(struct lp_build_sample_context *bld, LLVMValueRef ma, mai, signma, signmabit, imahalfpos; LLVMValueRef posHalf = lp_build_const_vec(gallivm, coord_bld->type, 0.5); LLVMValueRef signmask = lp_build_const_int_vec(gallivm, intctype, - 1 << (intctype.width - 1)); + 1LL << (intctype.width - 1)); LLVMValueRef signshift = lp_build_const_int_vec(gallivm, intctype, intctype.width -1); LLVMValueRef facex = lp_build_const_int_vec(gallivm, intctype, PIPE_TEX_FACE_POS_X); |