summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_state_constants.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-10-19 08:41:37 -0600
committerBrian Paul <[email protected]>2015-10-19 08:54:42 -0600
commit530eb39c71d2f42ef5d6c556aff77c322434f4e2 (patch)
tree188f2d7b5f5275cc737daaafac511b24e51d4343 /src/gallium/drivers/svga/svga_state_constants.c
parent6f3954618b0fe273af76af79ce9ec56566b79b2a (diff)
svga: fix incorrect round-down arithmetic
Spotted by Roland. Luckily, this code should never really be hit since the const buffer size and offset should already be multiples of 16. I could probably add more assertions to that effect, but let's just fix the arithmetic for now. Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_state_constants.c')
-rw-r--r--src/gallium/drivers/svga/svga_state_constants.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_state_constants.c b/src/gallium/drivers/svga/svga_state_constants.c
index 75592d3bf8b..c93d2a5e565 100644
--- a/src/gallium/drivers/svga/svga_state_constants.c
+++ b/src/gallium/drivers/svga/svga_state_constants.c
@@ -718,7 +718,7 @@ emit_consts_vgpu10(struct svga_context *svga, unsigned shader)
/* round down to mulitple of 16 (this may cause rendering problems
* but should avoid a device error).
*/
- size &= ~16;
+ size &= ~15;
}
}