diff options
author | Eric Anholt <[email protected]> | 2012-12-18 12:03:49 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-12-22 13:46:04 -0800 |
commit | 46386816a77c6e5751a0685776c0a6320f46f8fe (patch) | |
tree | 23b39e02e3c6e447a1e356a23adb840d15f17a51 /src/mesa | |
parent | 3b99d094c99566e92a05d2a2d22a83939305c30b (diff) |
i965: Fix validation of ETC miptrees.
When comparing to the teximage's format, we have to look at the
format-the-mt-was-created-for not the format-actually-stored-in-the-mt.
Improves glbenchmark 2.1 offscreen test performance 159% +/- 17% (n=3).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54582
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c index 609682769f2..901d0ea2910 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c @@ -604,12 +604,14 @@ intel_miptree_match_image(struct intel_mipmap_tree *mt, if (target_to_target(image->TexObject->Target) != mt->target) return false; - if (image->TexFormat != mt->format && - !(image->TexFormat == MESA_FORMAT_S8_Z24 && - mt->format == MESA_FORMAT_X8_Z24 && - mt->stencil_mt)) { + gl_format mt_format = mt->format; + if (mt->format == MESA_FORMAT_X8_Z24 && mt->stencil_mt) + mt_format = MESA_FORMAT_S8_Z24; + if (mt->etc_format != MESA_FORMAT_NONE) + mt_format = mt->etc_format; + + if (image->TexFormat != mt_format) return false; - } intel_miptree_get_dimensions_for_image(image, &width, &height, &depth); |