st/mesa: Prefer 5551 formats for GL_UNSIGNED_SHORT_5_5_5_1.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 13 Sep 2019 00:30:28 +0000 (17:30 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 16 Sep 2019 20:17:23 +0000 (13:17 -0700)
commitfbad42bbb9d80abc538c698ca413255968eabda4
tree6135b15d1e41de442ea2fd922629a7fb7a656fe3
parentffabcbba606eacb8c955bf9e0424be8ca242b53f
st/mesa: Prefer 5551 formats for GL_UNSIGNED_SHORT_5_5_5_1.

Previously, internalformat GL_RGBA and type GL_UNSIGNED_SHORT_5_5_5_1
was promoted to RGBA8888 as the table entry with the 5551 formats
is listed below the 8888 entry, and it also doesn't have GL_RGBA as
a possible internalformat.

Using actual 5551 fixes the following dEQP-EGL test:
- dEQP-EGL.functional.image.modify.tex_rgb5_a1_tex_subimage_rgba8

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/state_tracker/st_format.c