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/drivers | |
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/drivers')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup_tri.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_fs.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c index 900df71ad3b..a2f55ed3a1e 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c @@ -760,8 +760,8 @@ lp_setup_bin_triangle( struct lp_setup_context *setup, for (i = 0; i < nr_planes; i++) { int64_t planeout = cx[i] + eo[i]; int64_t planepartial = cx[i] + ei[i] - 1; - out |= (planeout >> 63); - partial |= (planepartial >> 63) & (1<<i); + out |= (int) (planeout >> 63); + partial |= ((int) (planepartial >> 63)) & (1<<i); } if (out) { diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 0fc3686ba13..a68b2749d9f 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -174,10 +174,10 @@ generate_quad_mask(struct gallivm_state *gallivm, for (i = 0; i < fs_type.length / 4; i++) { unsigned j = 2 * (i % 2) + (i / 2) * 8; - bits[4*i + 0] = LLVMConstInt(i32t, 1 << (j + 0), 0); - bits[4*i + 1] = LLVMConstInt(i32t, 1 << (j + 1), 0); - bits[4*i + 2] = LLVMConstInt(i32t, 1 << (j + 4), 0); - bits[4*i + 3] = LLVMConstInt(i32t, 1 << (j + 5), 0); + bits[4*i + 0] = LLVMConstInt(i32t, 1ULL << (j + 0), 0); + bits[4*i + 1] = LLVMConstInt(i32t, 1ULL << (j + 1), 0); + bits[4*i + 2] = LLVMConstInt(i32t, 1ULL << (j + 4), 0); + bits[4*i + 3] = LLVMConstInt(i32t, 1ULL << (j + 5), 0); } mask = LLVMBuildAnd(builder, mask, LLVMConstVector(bits, fs_type.length), ""); |