i965: Convert if/else to switch statements in brw_queryobj.c
authorPaul Berry <stereotype441@gmail.com>
Mon, 19 Dec 2011 19:53:52 +0000 (11:53 -0800)
committerPaul Berry <stereotype441@gmail.com>
Tue, 20 Dec 2011 23:22:28 +0000 (15:22 -0800)
commitc5e17a84983d7799fd842a62daaece3d97a670be
treeb6ac916f22456b546f65c425fc04e9c078bca06e
parentf8328c998b4d68c62ba939165390c2c22c5b5740
i965: Convert if/else to switch statements in brw_queryobj.c

Previously, i965 only supported two query types: GL_TIME_ELAPSED_EXT
and GL_SAMPLES_PASSED_ARB, and it distinguished between the two using
if/else statements that compared query->Base.Target to
GL_TIME_ELAPSED_EXT.

This patch changes the if/else statements to switch statements so that
we can add more query types without having to have a chain of
else-ifs.

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