svga: fix incorrect round-down arithmetic
authorBrian Paul <brianp@vmware.com>
Mon, 19 Oct 2015 14:41:37 +0000 (08:41 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 19 Oct 2015 14:54:42 +0000 (08:54 -0600)
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 <sroland@vmware.com>
src/gallium/drivers/svga/svga_state_constants.c

index 75592d3..c93d2a5 100644 (file)
@@ -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;
          }
       }