summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv/etnaviv_texture.c
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2017-04-18 13:34:50 +0200
committerChristian Gmeiner <[email protected]>2017-04-22 17:49:29 +0200
commit9da0cd56c3f95081bd4cc7efe87d2b475019b17d (patch)
tree258524215afa47a3f4658b3c83692a18ad44c944 /src/gallium/drivers/etnaviv/etnaviv_texture.c
parent53e39f6df47fcfc19f36e425c0f880a9b1a2a7d6 (diff)
etnaviv: Supertiled texture support on gc3000
Support supertiled textures on hardware that has the appropriate feature flag SUPERTILED_TEXTURE. Most of the scaffolding was already in place in etna_layout_multiple: case ETNA_LAYOUT_SUPER_TILED: *paddingX = 64; *paddingY = 64; *halign = TEXTURE_HALIGN_SUPER_TILED; So this is just a matter of allowing it. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_texture.c')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_texture.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_texture.c b/src/gallium/drivers/etnaviv/etnaviv_texture.c
index 93b077b5045..3a842381ac2 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_texture.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_texture.c
@@ -129,12 +129,18 @@ etna_resource_sampler_compatible(struct etna_resource *res)
if (util_format_is_compressed(res->base.format))
return true;
- /* The sampler (as we currently know it) only accepts tiled layouts */
+ struct etna_screen *screen = etna_screen(res->base.screen);
+ /* This GPU supports texturing from supertiled textures? */
+ if (res->layout == ETNA_LAYOUT_SUPER_TILED && VIV_FEATURE(screen, chipMinorFeatures2, SUPERTILED_TEXTURE))
+ return true;
+
+ /* TODO: LINEAR_TEXTURE_SUPPORT */
+
+ /* Otherwise, only support tiled layouts */
if (res->layout != ETNA_LAYOUT_TILED)
return false;
/* If we have HALIGN support, we can allow for the RS padding */
- struct etna_screen *screen = etna_screen(res->base.screen);
if (VIV_FEATURE(screen, chipMinorFeatures1, TEXTURE_HALIGN))
return true;