hrydgard/ppsspp — pull request #6942 by unknownbrackets (2014-09-24 07:08:14+00:00)
Title: gles: Avoid pow(<= 0, 0) entirely, undefined

Should work on more driver versions. Fixes #6941 (or I'm pretty sure anyway.)

Initially just did isnan(), but thought better of it in case of other GPUs or drivers giving different results. Turns out here, `dot%i` was < 0 *and* `u_matspecular.a` was 0. Moved the max up (pow(positive, X) can't return a negative number) and compared both with 0.

I'm hoping it's no more expensive than the two compares and nots were before.

-[Unknown]