teximage-colors: fix bogus precision assumptions and other issues

Some formats had some "implied" precision which relied on the driver picking a
specific hw format (e.g. RGB4 and RGB5 both relied on driver picking 565).
These tests will now be skipped (for the exact test).
Others didn't have any implied precision but relied on driver picking a format
with at least 8 bits even though the internal format only implied 4.
Also, the exact tests for srgb8 and srgb8_alpha8 were failing too due to using
GL_BYTE instead of GL_UNSIGNED_BYTE.
With these fixes the only tests llvmpipe is failing seem to be the exact
GL_RGB8_SNORM and GL_RGB16_SNORM ones (1, 2 or 4 channels work and the errors
seem to be one bit so maybe triggers some conversion somewhere using different
signed conversion formula).

v2: fix indentation

Reviewed-by: Brian Paul <brianp@vmware.com>
Revuewed-by: Jason Exstrand <jason.ekstrand@intel.com>
1 file changed