diff options
author | Jason Ekstrand <[email protected]> | 2017-07-31 13:33:45 -0700 |
---|---|---|
committer | Daniel Stone <[email protected]> | 2017-08-08 09:32:20 +0100 |
commit | be0e13e49f0709b59cdf0f8618bac156bd8f3efd (patch) | |
tree | 0648a84da437a813ecb1d76aba8349b54879c831 /src/mesa/drivers | |
parent | da154786ce3a8f6a18ecfd238f1ade05d011c10c (diff) |
i965: Only call create_for_planar_image for multiple planes
Before, we ended up always calling miptree_create_for_planar_image in
almost all cases because most images have image->planar_format != NULL.
This commit makes us only take that path if we have a multi-planar
format.
Reviewed-by: Daniel Stone <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index 61a9c0c6627..7194111721b 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -885,12 +885,15 @@ intel_miptree_create_for_dri_image(struct brw_context *brw, enum isl_colorspace colorspace, bool is_winsys_image) { - if (image->planar_format && image->planar_format->nplanes > 0) { + if (image->planar_format && image->planar_format->nplanes > 1) { assert(colorspace == ISL_COLORSPACE_NONE || colorspace == ISL_COLORSPACE_YUV); 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: |