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_texture.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_texture.c')
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_texture.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_texture.c b/src/gallium/drivers/etnaviv/etnaviv_texture.c index 954daea7ba5..b8ebab60822 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_texture.c +++ b/src/gallium/drivers/etnaviv/etnaviv_texture.c @@ -36,6 +36,8 @@ #include "util/u_inlines.h" #include "util/u_memory.h" +#include <drm_fourcc.h> + static void * etna_create_sampler_state(struct pipe_context *pipe, const struct pipe_sampler_state *ss) @@ -187,7 +189,8 @@ etna_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc, templat.bind &= ~(PIPE_BIND_DEPTH_STENCIL | PIPE_BIND_RENDER_TARGET | PIPE_BIND_BLENDABLE); res->texture = - etna_resource_alloc(pctx->screen, ETNA_LAYOUT_TILED, &templat); + etna_resource_alloc(pctx->screen, ETNA_LAYOUT_TILED, + DRM_FORMAT_MOD_LINEAR, &templat); } if (!res->texture) { |