mesa/formatquery: Remove tracking of number of elements in the response
authorEduardo Lima Mitev <elima@igalia.com>
Wed, 16 Dec 2015 16:32:19 +0000 (17:32 +0100)
committerEduardo Lima Mitev <elima@igalia.com>
Thu, 3 Mar 2016 14:14:05 +0000 (15:14 +0100)
commit25ee5c60dcb49e68c80eb5157769ccb655d647fa
tree91dec6d0335f55b52108e1576d3002191dc2efda
parent1f0b2ce8ec139cfb54db014949db0345461aff94
mesa/formatquery: Remove tracking of number of elements in the response

Currently, the number of integers returned in the response to
GetInternalFormativ is being tracked by a 'count' variable.
This is so only the modified elements from the temporary buffer are copied into
the original user buffer.

However, with the introduction of ARB_internalformat_query2, keeping track
of 'count' would complicate the code a lot, considering the high number of
queries.

So, we propose to forget about tracking count, and move all the 16 elements
in the temporary buffer, back to the user buffer (clamped to user buffer size
of course). This is basically a trade-off between performance and code clarity.

Reviewed-by: Dave Airlie <airlied@redhat.com>
src/mesa/main/formatquery.c