mesa: Don't compare unsigned for < 0
authorMatt Turner <mattst88@gmail.com>
Fri, 7 Jul 2017 01:48:03 +0000 (18:48 -0700)
committerMatt Turner <mattst88@gmail.com>
Mon, 21 Aug 2017 21:45:44 +0000 (14:45 -0700)
commit384e27174d0c4c96279d51a037ea36618d51a851
treed8bb140e4d81c353cb3c79f41ff77634408a2bf4
parent4e97084591c206338af4425c33edb833de348816
mesa: Don't compare unsigned for < 0

The INTEL_performance_query spec says

   "Performance counter id 0 is reserved as an invalid counter."

GLuint counterid_to_index(GLuint counterid) just returns counterid - 1,
so with unsigned overflow rules, it will generate 0xFFFFFFFF given an
input of 0. 0xFFFFFFFF will trigger the counterIndex >= queryNumCounters
check, so the code worked as is. It just contained a useless comparison.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/main/performance_query.c