So the only way I can think to pre-scale it is this:

https://github.com/unknownbrackets/ppsspp/commit/f2b4c4a0bc0af5a957ae993bc559db27576ac52b

It means rounding the less and greater cases too.  Actually, on my GeForce card it results in a 0.8% vps improvement, but I don't know if it would solve #1700.  I'm also assuming that passing in ints will work everywhere.

I guess it could send a different uniform for the < / > case, but that seems complicated, and also the colorref might not match the alpharef in that case...

-[Unknown]