UPSTREAM: i965: Preserve the internal format of the dri image

Since the OpenGLES API is strict about the internal format matching
the for many operations, we need to preserve it.

See _mesa_es3_error_check_format_and_type in
src/mesa/main/glformats.c.

Fixes ES2-CTS.gtf.GL2ExtensionTests.egl_image.egl_image
Fixes CTS failures of dEQP-EGL.functional.image.modify.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96351
Reported-by: Mark Janes <mark.a.janes@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Kristian Hgsberg <krh@bitplanet.net>
Cc: Chad Versace <chad.versace@intel.com>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Chad Versace <chad.versace@intel.com>
(cherry picked from commit c36a363a2d305a987ef2ea843fe9fc860b576eed)

BUG=b:31591743
TEST=Run CTS tests of dEQP-EGL.functional.image.modify on cave

Change-Id: I6a2a9a310997101a0e625abebfee233c4991cce1
Signed-off-by: Nataraj Deshpande <nataraj.deshpande@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/387127
Commit-Ready: Zhuo-hao Lee <zhuo-hao.lee@intel.com>
Tested-by: Zhuo-hao Lee <zhuo-hao.lee@intel.com>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
1 file changed