Module: Mesa Branch: master Commit: 0ba053b34c29106817568996ac53b41029cf4e4c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0ba053b34c29106817568996ac53b41029cf4e4c
Author: Nicolai Hähnle <nicolai.haeh...@amd.com> Date: Fri Jun 24 16:35:36 2016 +0200 st/mesa: an incomplete texture may have a zero-size first image Fixes a regression introduced by commit 42624ea83 which triggered an assertion in dEQP-GLES2.functional.texture.completeness.cube.not_positive_level_0 While stImage must have a non-zero size as verified by the caller, we also look at the size of the base image in an attempt to make a better guess at the level0 size (this is important when the base image size is odd). However, the base image may have a zero size even when it exists. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96629 Cc: 12.0 <mesa-sta...@lists.freedesktop.org> Reviewed-by: Ilia Mirkin <imir...@alum.mit.edu> --- src/mesa/state_tracker/st_cb_texture.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 088ac9e..1474d97 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -472,6 +472,9 @@ guess_and_alloc_texture(struct st_context *st, */ firstImage = _mesa_base_tex_image(&stObj->base); if (firstImage && + firstImage->Width2 > 0 && + firstImage->Height2 > 0 && + firstImage->Depth2 > 0 && guess_base_level_size(stObj->base.Target, firstImage->Width2, firstImage->Height2, _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit