[Mesa-dev] [PATCH] i965: create validated miptree starting with the first known layer
Ilia Mirkin
imirkin at alum.mit.edu
Thu Feb 11 21:58:27 UTC 2016
This is effectively a revert of 8037c0b69 (i965: Always allocate
validated miptrees from level 0). Unfortunately the first level's images
may not be set, and there is no way to know what their size is. We were
retrieving the size of the base level's image, but using that to build a
miptree of that size for level 0.
This meant that intel_miptree_match_image would fail since the first_level
of the miptree was set to 0 but the local_width/height/depth0 were set
for the base level's dimensions.
This fixes a number of assertion failures in dEQP of the form
dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.base_level.*
For some reason the plain 2D case didn't hit the assertions in question.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: Eric Anholt <eric at anholt.net>
---
src/mesa/drivers/dri/i965/intel_tex_validate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/intel_tex_validate.c b/src/mesa/drivers/dri/i965/intel_tex_validate.c
index 2cf9c13..f2975c6 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_validate.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_validate.c
@@ -140,7 +140,7 @@ intel_finalize_mipmap_tree(struct brw_context *brw, GLuint unit)
intelObj->mt = intel_miptree_create(brw,
intelObj->base.Target,
firstImage->base.Base.TexFormat,
- 0, /* first_level */
+ validate_first_level,
validate_last_level,
width,
height,
--
2.4.10
More information about the mesa-dev
mailing list