dri_util: Update internal_format to GL_RGB8 for MESA_FORMAT_R8G8B8X8_UNORM
authorNataraj Deshpande <nataraj.deshpande@intel.com>
Wed, 13 May 2020 21:32:13 +0000 (14:32 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 21 May 2020 01:52:46 +0000 (01:52 +0000)
commit02a1f95386b43bf46cd1c8297d0955242f554fa2
treef47cb822fbdd81a2bd50e8c5d4d2c6eaea7663ad
parent13fc03f4c0e709f6d1a8d811f9bc8a0c8c42943c
dri_util: Update internal_format to GL_RGB8 for MESA_FORMAT_R8G8B8X8_UNORM

The commit helps to resolve GL_INVALID_OPERATION error returned
during CTS test when Android format RGBX8888 fallback to RGBA8888
and then set color with glTexSubImage2D(format=GL_RGB).

Fixes android.hardware.nativehardware.cts.AHardwareBufferNativeTests:
 #SingleLayer_ColorTest_GpuSampledImageCanBeSampled_R8G8B8X8_UNORM

Cc: <mesa-stable@lists.freedesktop.org>
Fixes: bf576772ab4d ("dri_util: add driImageFormatToSizedInternalGLFormat function")
Signed-off-by: Nataraj Deshpande <nataraj.deshpande@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5034>
src/mesa/drivers/dri/common/dri_util.c