st/glsl_to_tgsi: make samplers_used an uint32_t (v2)
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 6 Apr 2016 21:21:28 +0000 (16:21 -0500)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 7 Apr 2016 18:15:05 +0000 (13:15 -0500)
commit84c4d069ac7be1dece2f5eeed277089a79e6acbf
tree1c8c6f377e521b533fe07b8e5358b0b301de3cab
parent4bfcc86bf977ac18465c7be0a0fa14354b18d7c6
st/glsl_to_tgsi: make samplers_used an uint32_t (v2)

It is used as a bitfield, so it seems cleaner to keep it unsigned.

The literal 1 is a (signed) int, and shifting into the sign bit is undefined
in C, so change occurences of 1 to 1u.

v2: add an assert for bitfield size and use 1u << idx

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com> (v1)
Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1)
src/mesa/state_tracker/st_glsl_to_tgsi.cpp