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>
if (glarray->InstanceDivisor) {
if (brw->num_instances) {
start = offset + glarray->StrideB * brw->baseinstance;
- range = (glarray->StrideB * ((brw->num_instances /
- glarray->InstanceDivisor) - 1) +
+ range = (glarray->StrideB * ((brw->num_instances - 1) /
+ glarray->InstanceDivisor) +
glarray->_ElementSize);
}
} else {