aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2017-10-04 16:32:05 +0300
committerTapani Pälli <[email protected]>2017-10-06 08:06:13 +0300
commit03516382844c4513a68b8e0b6ef4a0040385906a (patch)
treeca1d5800fbd85288087d04415cd66cd037c95341 /src/mesa/drivers/dri/i965/intel_mipmap_tree.c
parentc4d1a199f8379b3982a53fb18fe2b50fafd682df (diff)
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 <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102999 Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_mipmap_tree.c')
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 5b7cde82f65..670a92c1168 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -959,36 +959,15 @@ create_ccs_buf_for_image(struct brw_context *brw,
struct intel_mipmap_tree *
intel_miptree_create_for_dri_image(struct brw_context *brw,
__DRIimage *image, GLenum target,
- enum isl_colorspace colorspace,
+ mesa_format format,
bool is_winsys_image)
{
- if (image->planar_format && image->planar_format->nplanes > 1) {
- assert(colorspace == ISL_COLORSPACE_NONE ||
- colorspace == ISL_COLORSPACE_YUV);
+ if (image->planar_format && image->planar_format->nplanes > 1)
return miptree_create_for_planar_image(brw, image, target);
- }
if (image->planar_format)
assert(image->planar_format->planes[0].dri_format == image->dri_format);
- mesa_format format = image->format;
- switch (colorspace) {
- case ISL_COLORSPACE_NONE:
- /* Keep the image format unmodified */
- break;
-
- case ISL_COLORSPACE_LINEAR:
- format =_mesa_get_srgb_format_linear(format);
- break;
-
- case ISL_COLORSPACE_SRGB:
- format =_mesa_get_linear_format_srgb(format);
- break;
-
- default:
- unreachable("Inalid colorspace for non-planar image");
- }
-
if (!brw->ctx.TextureFormatSupported[format]) {
/* The texture storage paths in core Mesa detect if the driver does not
* support the user-requested format, and then searches for a