[Mesa-dev] [PATCH] i965: Only magnify depth for 3D textures, not array textures.
Ilia Mirkin
imirkin at alum.mit.edu
Fri Mar 4 01:52:29 UTC 2016
On Thu, Mar 3, 2016 at 6:44 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> When BaseLevel > 0, we magnify the dimensions to fill out the size of
> miplevels [0..BaseLevel). In particular, this was magnifying depth,
> thinking that the depth doubles at each level. This is perfectly
> reasonable for 3D textures, but dead wrong for array textures.
>
> Changing the depth != 1 condition to a target == GL_TEXTURE_3D check
> should make this only happen in the appropriate cases.
>
> Fixes about 32 dEQP tests:
> - dEQP-GLES31.functional.texture.gather.*.level_{1,2}
That seems decidedly better than my attempt:
https://patchwork.freedesktop.org/patch/73398/ :)
It seems like you're hitting pretty much the same failures as I was...
I think most of my fixes have been committed but not all. It may
interest you to look over my tree at
https://github.com/imirkin/mesa/commits/oes
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> Cc: mesa-stable at lists.freedesktop.org
> ---
> src/mesa/drivers/dri/i965/intel_tex_image.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c
> index 8525902..1601edd 100644
> --- a/src/mesa/drivers/dri/i965/intel_tex_image.c
> +++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
> @@ -50,7 +50,7 @@ intel_miptree_create_for_teximage(struct brw_context *brw,
> width <<= 1;
> if (height != 1)
> height <<= 1;
> - if (depth != 1)
> + if (intelObj->base.Target == GL_TEXTURE_3D)
> depth <<= 1;
> }
>
> --
> 2.7.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list