mesa/st: Handle all 10 bpc types in st_choose_format
Only GL_UNSIGNED_INT_2_10_10_10_REV was handled, add GL_UNSIGNED_INT_10_10_10_2 & GL_UNSIGNED_INT_10_10_10_2_OES. This makes sure that if the Gallium driver doesn't support the exact corresponding format, another 10 bpc format is tried before an 8 bpc one as a fallback. Fixes the mutter test cogl-test-offscreen-texture-formats with iris. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21021>
This commit is contained in:
@@ -1210,7 +1210,9 @@ st_choose_format(struct st_context *st, GLenum internalFormat,
|
||||
* formats are not color-renderable. Mesa's check for making those
|
||||
* non-color-renderable is based on our chosen format being 2101010.
|
||||
*/
|
||||
if (type == GL_UNSIGNED_INT_2_10_10_10_REV) {
|
||||
if (type == GL_UNSIGNED_INT_2_10_10_10_REV ||
|
||||
type == GL_UNSIGNED_INT_10_10_10_2 ||
|
||||
type == GL_UNSIGNED_INT_10_10_10_2_OES) {
|
||||
if (internalFormat == GL_RGB)
|
||||
internalFormat = GL_RGB10;
|
||||
else if (internalFormat == GL_RGBA)
|
||||
|
||||
Reference in New Issue
Block a user