panfrost: Use pack for XFB varying
[mesa.git] / src / gallium / drivers / panfrost / pan_sfbd.c
index 769fbd79e3f0ea137f5e44192587cf2c0ee50147..58d33dcddde32b488fb8360a621618e81f7f312c 100644 (file)
@@ -141,13 +141,13 @@ panfrost_sfbd_set_cbuf(
         fb->framebuffer = base;
         fb->stride = stride;
 
-        if (rsrc->layout == MALI_TEXTURE_LINEAR)
-                fb->format.block = MALI_BLOCK_LINEAR;
-        else if (rsrc->layout == MALI_TEXTURE_TILED) {
-                fb->format.block = MALI_BLOCK_TILED;
+        if (rsrc->modifier == DRM_FORMAT_MOD_LINEAR)
+                fb->format.block = MALI_BLOCK_FORMAT_LINEAR;
+        else if (rsrc->modifier == DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED) {
+                fb->format.block = MALI_BLOCK_FORMAT_TILED;
                 fb->stride *= 16;
         } else {
-                fprintf(stderr, "Invalid render layout\n");
+                fprintf(stderr, "Invalid render modifier\n");
                 assert(0);
         }
 }
@@ -163,14 +163,14 @@ panfrost_sfbd_set_zsbuf(
         unsigned level = surf->u.tex.level;
         assert(surf->u.tex.first_layer == 0);
 
-        if (rsrc->layout != MALI_TEXTURE_TILED)
-                unreachable("Invalid render layout.");
+        if (rsrc->modifier != DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED)
+                unreachable("Invalid render modifier.");
 
         fb->depth_buffer = rsrc->bo->gpu + rsrc->slices[level].offset;
         fb->depth_stride = rsrc->slices[level].stride;
 
         /* No stencil? Job done. */
-        if (!ctx->depth_stencil || !ctx->depth_stencil->stencil[0].enabled)
+        if (!ctx->depth_stencil || !ctx->depth_stencil->base.stencil[0].enabled)
                 return;
 
         if (panfrost_is_z24s8_variant(surf->format)) {
@@ -266,5 +266,5 @@ panfrost_sfbd_fragment(struct panfrost_batch *batch, bool has_draws)
                 fb.format.unk2 |= MALI_SFBD_FORMAT_MSAA_B;
         }
 
-        return panfrost_upload_transient(batch, &fb, sizeof(fb));
+        return panfrost_pool_upload(&batch->pool, &fb, sizeof(fb));
 }