diff options
author | Ilia Mirkin <[email protected]> | 2016-08-13 15:45:35 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-08-16 21:56:16 -0400 |
commit | 0b5f40b881d149d6c960d4ff8f69b58596cf9660 (patch) | |
tree | 4a6fd665476e59d87ef5c09a046217a64cf95d23 /src/gallium/drivers/nouveau/codegen | |
parent | 4d436c011fd9f7ebcadbaebef05090d2056e9d48 (diff) |
nv50/ir: properly clear upper bits of a bitset fill
Found by inspection. In practice, val is always == 0, so this never got
triggered.
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_util.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_util.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_util.cpp index 682c5690624..1daf778e934 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_util.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_util.cpp @@ -297,8 +297,8 @@ void BitSet::fill(uint32_t val) unsigned int i; for (i = 0; i < (size + 31) / 32; ++i) data[i] = val; - if (val) - data[i] &= ~(0xffffffff << (size % 32)); // BE ? + if (val && i) + data[i - 1] &= (1 << (size % 32)) - 1; } void BitSet::setOr(BitSet *pA, BitSet *pB) |