i965: Unify query object BO reallocation code.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 26 Feb 2013 07:17:57 +0000 (23:17 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 2 Mar 2013 06:09:04 +0000 (22:09 -0800)
commit981a22b62bc7f8e50ba8bcb0a7f329c25bd53c8d
tree8d1a209ae1ab62ead0720780a517d620b1708a7c
parent90feda81de3c608d5a6041246fc010904a3afa81
i965: Unify query object BO reallocation code.

If we haven't allocated a BO yet, we need to do that.  Or, if there
isn't enough room to write another pair of values, we need to gather up
the existing results and start a new one.  This is simple enough.

However, the old code was awkwardly split into two blocks, with a
write_depth_count() placed in the middle.  The new depth count isn't
relevant to gathering the old BO's data, so that can go after the
reallocation is done.  With the two blocks adjacent, we can merge them.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_queryobj.c