st: Choose a 2101010 format for GL_RGB/GL_RGBA with a 2_10_10_10 type.
authorEric Anholt <eric@anholt.net>
Wed, 25 Apr 2018 18:40:40 +0000 (11:40 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 26 Apr 2018 18:30:22 +0000 (11:30 -0700)
commit8adf813f83b9f54e3c9958cc7c7a485e62222e2e
treeb1c197cfe4cfbc998609c9be13041facf46a5f73
parent8aef7fccb70d64f7764a5d6346ee142417fa0b2c
st: Choose a 2101010 format for GL_RGB/GL_RGBA with a 2_10_10_10 type.

GLES's GL_EXT_texture_type_2_10_10_10_REV allows uploading this type to an
unsized internalformat, and it should be non-color-renderable.
fbobject.c's implementation of the check for color-renderable is checks
that the texture has a 2101010 mesa format, so make sure that we have
chosen a 2101010 format so that check can do what it meant to.

Fixes KHR-GLES3.packed_pixels.pbo_rectangle.rgb on vc5.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_format.c