Re: [Mesa-dev] [PATCH 1/2] i965: Fix off-by-one in query object result gathering.

2013-03-04 Thread Eric Anholt
Kenneth Graunke writes: > If we've written N pairs of values to the buffer, then last_index = N, > but the values are 0 .. N-1. Thus, we need to use <, not <=. > > This worked anyway because we fill the buffer with zeroes, so we just > added an extra (0 - 0) to our results. This series is: Rev

[Mesa-dev] [PATCH 1/2] i965: Fix off-by-one in query object result gathering.

2013-03-04 Thread Kenneth Graunke
If we've written N pairs of values to the buffer, then last_index = N, but the values are 0 .. N-1. Thus, we need to use <, not <=. This worked anyway because we fill the buffer with zeroes, so we just added an extra (0 - 0) to our results. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/d