summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv/etnaviv_resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_resource.c')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_resource.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c
index b03681cc5c0..6cd5eca2930 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_resource.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c
@@ -204,8 +204,7 @@ static bool is_rs_align(struct etna_screen *screen,
/* Create a new resource object, using the given template info */
struct pipe_resource *
etna_resource_alloc(struct pipe_screen *pscreen, unsigned layout,
- enum etna_resource_addressing_mode mode, uint64_t modifier,
- const struct pipe_resource *templat)
+ uint64_t modifier, const struct pipe_resource *templat)
{
struct etna_screen *screen = etna_screen(pscreen);
struct etna_resource *rsc;
@@ -299,7 +298,6 @@ etna_resource_alloc(struct pipe_screen *pscreen, unsigned layout,
rsc->base.nr_samples = nr_samples;
rsc->layout = layout;
rsc->halign = halign;
- rsc->addressing_mode = mode;
pipe_reference_init(&rsc->base.reference, 1);
@@ -340,13 +338,11 @@ etna_resource_create(struct pipe_screen *pscreen,
{
struct etna_screen *screen = etna_screen(pscreen);
- /* Figure out what tiling and address mode to use -- for now, assume that
- * texture cannot be linear. there is a capability LINEAR_TEXTURE_SUPPORT
- * (supported on gc880 and gc2000 at least), but not sure how it works.
+ /* Figure out what tiling to use -- we always use tiled layouts,
+ * except for scanout/dmabuf (which don't go through this path)
* Buffers always have LINEAR layout.
*/
unsigned layout = ETNA_LAYOUT_LINEAR;
- enum etna_resource_addressing_mode mode = ETNA_ADDRESSING_MODE_TILED;
if (etna_resource_sampler_only(templat)) {
/* The buffer is only used for texturing, so create something
@@ -390,7 +386,7 @@ etna_resource_create(struct pipe_screen *pscreen,
layout = ETNA_LAYOUT_LINEAR;
/* modifier is only used for scanout surfaces, so safe to use LINEAR here */
- return etna_resource_alloc(pscreen, layout, mode, DRM_FORMAT_MOD_LINEAR, templat);
+ return etna_resource_alloc(pscreen, layout, DRM_FORMAT_MOD_LINEAR, templat);
}
enum modifier_priority {
@@ -470,8 +466,7 @@ etna_resource_create_modifiers(struct pipe_screen *pscreen,
*/
tmpl.bind |= PIPE_BIND_SCANOUT;
- return etna_resource_alloc(pscreen, modifier_to_layout(modifier),
- ETNA_ADDRESSING_MODE_TILED, modifier, &tmpl);
+ return etna_resource_alloc(pscreen, modifier_to_layout(modifier), modifier, &tmpl);
}
static void
@@ -550,8 +545,6 @@ etna_resource_from_handle(struct pipe_screen *pscreen,
rsc->seqno = 1;
rsc->layout = modifier_to_layout(handle->modifier);
rsc->halign = TEXTURE_HALIGN_FOUR;
- rsc->addressing_mode = ETNA_ADDRESSING_MODE_TILED;
-
level->width = tmpl->width0;
level->height = tmpl->height0;