summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_texture.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2019-04-29 13:17:41 +1000
committerDave Airlie <[email protected]>2019-05-03 15:23:04 +1000
commit512a31a41299758f0f60d0452b8c9e8c02238189 (patch)
tree7615894398d16e9827bf40f284ad6432b88072ed /src/gallium/drivers/r600/r600_texture.c
parent18973a450ed986a0f56aa35b14c8e9fd9260f168 (diff)
util/bitset: fix bitset range mask calculations.
The MASK macro is used in the RANGE macro, and it should return the pre-bitset word mask for the (b) value. i.e. BITSET_MASK(0) should be undefined since it's meaningless. BITSET_MASK(31) should give 0x7fffffff BITSET_MASK(32) should give 0xffffffff BITSET_MASK(33) should give 0x00000001 BITSET_MASK(64) should give 0xffffffff However then BITSET_RANGE ends up broken for cases where it's (b) value is the 0,32,64 value as in that case the lower mask would be 0 not 0xffffffff. This fixes the unit tests that I've added, and my code that uses bitsets. Reviewed-by: Jason Ekstrand <[email protected]> Fixes: bb38cadb1c5f2 "More GLSL code" Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_texture.c')
0 files changed, 0 insertions, 0 deletions