Skip to content

dri: Use RGB internal formats for RGBX formats

Sviatoslav Peleshko requested to merge GL/mesa:fix_rgbx_internal_format into main

What does this MR do and why?

I found this while investigating #9429 (closed). We import B10G10R10X2 EGL image with internal type GL_RGB10_A2 that has base type GL_RGBA, while the base type of B10G10R10X2 itself is GL_RGB.

Then, when we're copying from it with glCopyTexSubImage2D, the base type comparison in st_can_copyteximage_using_blit fails, and we take slow fallback path.

These formats do not actually contain alpha channel, so I believe their internal formats should reflect that (see similar changes in !5034 (merged), !6095 (merged)).

Fixes: bf576772 ("dri_util: add driImageFormatToSizedInternalGLFormat function") Closes: #9429 (closed) Signed-off-by: Sviatoslav Peleshko sviatoslav.peleshko@globallogic.com

Edited by Sviatoslav Peleshko

Merge request reports