freedreno/a5xx: add texture MIPLVLS
authorRob Clark <robdclark@gmail.com>
Mon, 9 Jan 2017 16:21:23 +0000 (11:21 -0500)
committerRob Clark <robdclark@gmail.com>
Wed, 11 Jan 2017 00:40:00 +0000 (19:40 -0500)
Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/a5xx/fd5_texture.c

index 47b07b8cd4ef08492c350be36cd3095acff079f9..127cf33ba00deb77b0ccff2f2771ba37efea5078 100644 (file)
@@ -257,13 +257,13 @@ fd5_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc,
                        A5XX_TEX_CONST_2_PITCH(elements * rsc->cpp);
                so->offset = cso->u.buf.offset;
        } else {
-//             unsigned miplevels;
+               unsigned miplevels;
 
                lvl = fd_sampler_first_level(cso);
-//             miplevels = fd_sampler_last_level(cso) - lvl;
+               miplevels = fd_sampler_last_level(cso) - lvl;
                layers = cso->u.tex.last_layer - cso->u.tex.first_layer + 1;
 
-//             so->texconst0 |= A5XX_TEX_CONST_0_MIPLVLS(miplevels);
+               so->texconst0 |= A5XX_TEX_CONST_0_MIPLVLS(miplevels);
                so->texconst1 =
                        A5XX_TEX_CONST_1_WIDTH(u_minify(prsc->width0, lvl)) |
                        A5XX_TEX_CONST_1_HEIGHT(u_minify(prsc->height0, lvl));