diff options
author | Lucas Stach <[email protected]> | 2017-06-22 15:14:31 +0200 |
---|---|---|
committer | Lucas Stach <[email protected]> | 2017-07-19 16:26:50 +0200 |
commit | 58c3ce071c28b2d132cb15e309b3168953d957bd (patch) | |
tree | 3e17f70ae68082b36a2b1703f4753a7ba9813bf6 /src/gallium/drivers/etnaviv/etnaviv_transfer.c | |
parent | d06cfaf4fc21d45d09045af9ea2a248ef3968767 (diff) |
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 <[email protected]>
Reviewed-by: Christian Gmeiner <[email protected]>
Reviewed-by: Daniel Stone <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_transfer.c')
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_transfer.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 <drm_fourcc.h> + /* 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; |