i965/draw: Properly handle rounding when dividing by InstanceDivisor
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 18 May 2016 20:05:48 +0000 (13:05 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 24 May 2016 02:12:34 +0000 (19:12 -0700)
commitd5b4ab2c5f700087ac09238e3cf8252aa3d31d54
tree2a3d032cec8044e7dc88a7e585b5092ec735e796
parentad42ab473cb327e9f0498bda9d92cccc4279a0e8
i965/draw: Properly handle rounding when dividing by InstanceDivisor

The old code always divided rounded down and then subtracted 1.  What we
wanted was to divide rounded up and then subtract 1 which is equivalent to
subtracting 1 and then dividing rounded down.

Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_draw_upload.c