i965: Don't use GCC extension for ?: with only two operands.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 24 Jun 2015 06:57:31 +0000 (23:57 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 30 Jun 2015 05:21:02 +0000 (22:21 -0700)
commit21b7c58b8a0cbf18c9ed90c260f01d00fefe0db2
tree19d3302b1ca60c5e46255e907ccaac8a175aa1d8
parente22e0de0d7c3a412bdd53c6d53825b7646624e3d
i965: Don't use GCC extension for ?: with only two operands.

From the "apparently I don't know C" files...GCC apparently supports:

    x ?: y

which is equivalent to

    x ? x : y

except that it doesn't cause side-effects to occur twice.  See:
https://gcc.gnu.org/onlinedocs/gcc/Conditionals.html#Conditionals

This was confusing and looked like a typo.  It doesn't really buy us
anything, so just write the obvious code in normal C.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
src/mesa/drivers/dri/i965/intel_fbo.c