[Mesa-dev] [PATCH v2] i965: don't fail to shift height images for levels.

Jason Ekstrand jason at jlekstrand.net
Tue Aug 23 16:28:01 UTC 2016


This smells like fish... I'm going to have a look.

On Tue, Aug 23, 2016 at 8:29 AM, Antia Puentes <apuentes at igalia.com> wrote:

> From: Dave Airlie <airlied at redhat.com>
>
> This fixes one subtest of:
> GL44-CTS.shader_image_size.advanced-nonMS-fs-int
>
> I've no idea why this wouldn't be scaled up here,
> and I've no idea what else will break, but I might
> as well open for discussion.
>
> v2: Only shift height if the texture is not an 1D_ARRAY,
> it fixes assertion in GL44-CTS.texture_view.gettexparameter
> due to the original patch (Antia).
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> Signed-off-by: Antia Puentes <apuentes at igalia.com>
> ---
>
> I have not taken a deep look to the test so take this with a grain of salt.
> As I said in a previous email, this patch raises an assertion in
> GL44-CTS.texture_view.gettexparameter:
>
> "glcts: intel_mipmap_tree.c:368: intel_miptree_create_layout: Assertion
> `height0 = 1' failed."
>
> Looking at the code surrounding the assertion, we have:
>
>    if (target == GL_TEXTURE_1D_ARRAY)
>          assert(height0 == 1);
>
> which suggests that we should avoid shifting the height at least for
> TEXTURE_1D_ARRAYs. Sending a second version of the patch.
>
>  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 958f8bd..120e7e0 100644
> --- a/src/mesa/drivers/dri/i965/intel_tex_image.c
> +++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
> @@ -49,7 +49,7 @@ intel_miptree_create_for_teximage(struct brw_context
> *brw,
>     /* Figure out image dimensions at start level. */
>     for (i = intelImage->base.Base.Level; i > 0; i--) {
>        width <<= 1;
> -      if (height != 1)
> +      if (intelObj->base.Target != GL_TEXTURE_1D_ARRAY)
>           height <<= 1;
>        if (intelObj->base.Target == GL_TEXTURE_3D)
>           depth <<= 1;
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160823/5ea7821e/attachment.html>


More information about the mesa-dev mailing list