From 58c3ce071c28b2d132cb15e309b3168953d957bd Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Thu, 22 Jun 2017 15:14:31 +0200 Subject: etnaviv: implement resource creation with modifier This allows to create buffers with a specific tiling layout, which is primarily used by GBM to allocate the EGL back buffers with the correct tiling/modifier for use with the scanout engines. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner Reviewed-by: Daniel Stone --- src/gallium/drivers/etnaviv/etnaviv_transfer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/etnaviv/etnaviv_transfer.c') diff --git a/src/gallium/drivers/etnaviv/etnaviv_transfer.c b/src/gallium/drivers/etnaviv/etnaviv_transfer.c index 27e1be19579..6c1edd48354 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_transfer.c +++ b/src/gallium/drivers/etnaviv/etnaviv_transfer.c @@ -39,6 +39,8 @@ #include "util/u_surface.h" #include "util/u_transfer.h" +#include + /* Compute offset into a 1D/2D/3D buffer of a certain box. * This box must be aligned to the block width and height of the * underlying format. */ @@ -203,7 +205,8 @@ etna_transfer_map(struct pipe_context *pctx, struct pipe_resource *prsc, templ.nr_samples = 0; templ.bind = PIPE_BIND_RENDER_TARGET; - trans->rsc = etna_resource_alloc(pctx->screen, ETNA_LAYOUT_LINEAR, &templ); + trans->rsc = etna_resource_alloc(pctx->screen, ETNA_LAYOUT_LINEAR, + DRM_FORMAT_MOD_LINEAR, &templ); if (!trans->rsc) { slab_free(&ctx->transfer_pool, trans); return NULL; -- cgit v1.2.3