diff options
author | Brian Paul <[email protected]> | 2018-03-30 11:06:50 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-03-30 14:33:33 -0600 |
commit | 84be45fc20b27bb388e5f66f8e03a3f74cef7f9b (patch) | |
tree | 1e81b2b66c39a4ee485d053f25d0109f8dfa4493 /src/compiler | |
parent | 31d91f019b58ca362c05db1fd0c75fedd169cd7b (diff) |
nir/spirv: fix MSVC warning in vtn_align_u32()
Fixes warning that "negation of an unsigned value results in an
unsigned value".
Reviewed-by: Neil Roberts <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/spirv/vtn_private.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h index d8a00f99b97..269de922258 100644 --- a/src/compiler/spirv/vtn_private.h +++ b/src/compiler/spirv/vtn_private.h @@ -732,7 +732,7 @@ void vtn_handle_decoration(struct vtn_builder *b, SpvOp opcode, static inline uint32_t vtn_align_u32(uint32_t v, uint32_t a) { - assert(a != 0 && a == (a & -a)); + assert(a != 0 && a == (a & -((int32_t) a))); return (v + a - 1) & ~(a - 1); } |