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);
}
}
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)) {
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));
}