egl, wayland: RGB565 format support on Back-buffer
egl, wayland: RGB565 format support on Back-buffer

In current code, color format is always hardcoded to
__DRI_IMAGE_FORMAT_ARGB8888 when buffer or DRI image is
allocated in function calls, get_back_bo and dri2_get_buffers,
regardless of current target's color format. This problem
may leads to incorrect render pitch calculation, which
eventually ends up with wrong offset of pixels in
the frame buffer when the image is in different color format
from dri surf's, especially with different bpp. (e.g. RGB565-16bpp)

Attached code patch simply adds RGB565 and XRGB8888 cases to two
functions noted above to resolve the issue.

v2: added a case of XRGB8888, format and bpp selection is done
    via switch-case (not "if-else" anymore)

Signed-off-by: Vivek Kasireddy <7c35ed360060af3ecb9cc53d85d27e92e2f5dc59@intel.com>
Signed-off-by: Dongwon Kim <6f57eff984fc435f216ec53a6b54c5a2170a0e25@intel.com>
Reviewed-by: Kristian Høgsberg <ca9b5b1e27d4fa7f4ba6848bdd08ca52cfd6330c@bitplanet.net>
Cc: "10.5" <59f39c0db42d4479a46b02d4d2bc11120e37bb44@lists.freedesktop.org>

metora/MesaGLSLCompiler,metora/MesaGLSLCompiler,metora/MesaGLSLCompiler