Skip to content
  • Matt Turner's avatar
    mesa: Don't compare unsigned for < 0 · 384e2717
    Matt Turner authored
    
    
    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: default avatarJordan Justen <jordan.l.justen@intel.com>
    384e2717