From: Alyssa Rosenzweig Date: Tue, 1 Jun 2021 00:08:57 +0000 (-0400) Subject: asahi: Set levels in texture descriptor X-Git-Tag: upstream/21.2.3~2671 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4ae53334f1dfc1ed5c5d1225ab400d4cb8355f8;p=platform%2Fupstream%2Fmesa.git asahi: Set levels in texture descriptor Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index 5e5da9b..5267b81 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -386,6 +386,9 @@ agx_create_sampler_view(struct pipe_context *pctx, util_format_compose_swizzles(desc->swizzle, view_swizzle, out_swizzle); + if (state->u.tex.first_level != 0) + unreachable("todo: nonzero first level"); + /* Pack the descriptor into GPU memory */ agx_pack(so->desc->ptr.cpu, TEXTURE, cfg) { cfg.layout = agx_translate_layout(rsrc->modifier); @@ -396,6 +399,7 @@ agx_create_sampler_view(struct pipe_context *pctx, cfg.swizzle_a = agx_channel_from_pipe(out_swizzle[3]); cfg.width = texture->width0; cfg.height = texture->height0; + cfg.levels = state->u.tex.last_level + 1; cfg.srgb = (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB); cfg.unk_1 = rsrc->bo->ptr.gpu; cfg.unk_2 = false;