i965: pass wanted format to intel_miptree_create_for_dri_image
authorTapani Pälli <tapani.palli@intel.com>
Wed, 4 Oct 2017 13:32:05 +0000 (16:32 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Fri, 6 Oct 2017 05:06:13 +0000 (08:06 +0300)
commit03516382844c4513a68b8e0b6ef4a0040385906a
treeca1d5800fbd85288087d04415cd66cd037c95341
parentc4d1a199f8379b3982a53fb18fe2b50fafd682df
i965: pass wanted format to intel_miptree_create_for_dri_image

Change b3a44ae7a4 caused regressions on Android where DRI and renderbuffer
can disagree on the format being used. This patch removes the colorspace
parameter and instead we pass renderbuffer format. For non-winsys images we
still do srgb/linear modification in same manner as change b3a44ae7a4 wanted
but take format from renderbuffer instead of DRI image.

This patch fixes regressions seen with following test sets:

   dEQP-EGL.functional.color_clears*
   dEQP-EGL.functional.render*

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102999
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/intel_fbo.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.h
src/mesa/drivers/dri/i965/intel_tex_image.c