mesa: Don't put sRGB formats in the array format table.
authorEric Anholt <eric@anholt.net>
Fri, 15 Nov 2019 01:41:27 +0000 (17:41 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 15 Nov 2019 20:32:17 +0000 (20:32 +0000)
commitbc2b14a4a344774da4f62e7b8e53a64c389ccb5a
tree5ef0954ee06631b4894c58803b4e76830c164c06
parente5b06008f15fd916c53b1f7be2353ac6ecfbbc8f
mesa: Don't put sRGB formats in the array format table.

sRGB vs unorm was the only conflict case being guarded against in this
function.  Before the PIPE_FORMAT conversion, we always listed the
unorm before the sRGB in the enums, but PIPE_FORMAT_A8B8G8R8_SRGB
happens to be before _UNORM.  We always want the unorm result here.

Fixes: 807a800d8c3e ("mesa: Redefine MESA_FORMAT_* in terms of PIPE_FORMAT_*.")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/formats.c