asahi: Set cfg.levels for linear framebuffers
authorAsahi Lina <lina@asahilina.net>
Tue, 8 Nov 2022 15:35:00 +0000 (10:35 -0500)
committerMarge Bot <emma+marge@anholt.net>
Thu, 17 Nov 2022 02:47:10 +0000 (02:47 +0000)
Otherwise we will crash in GenXML, which does not specify a default here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19606>

src/gallium/drivers/asahi/agx_state.c

index e843613..9e4803e 100644 (file)
@@ -804,6 +804,7 @@ agx_set_framebuffer_state(struct pipe_context *pctx,
 
          if (tex->layout.tiling == AIL_TILING_LINEAR) {
             cfg.stride = ail_get_linear_stride_B(&tex->layout, level) - 4;
+            cfg.levels = 1;
          } else {
             cfg.unk_tiled = true;
             cfg.levels = tex->base.last_level + 1;