summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv/etnaviv_screen.c
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2017-11-01 18:19:02 +0100
committerChristian Gmeiner <[email protected]>2017-11-06 21:30:54 +0100
commit93ba3f29bbfd996dea5ecd053501800c11fc7f1c (patch)
tree0201d4cf5e47b2af8e46ab36824e804e17e3c212 /src/gallium/drivers/etnaviv/etnaviv_screen.c
parentf1e1c60ff69dc54f3db00afa16237ff04dd32096 (diff)
etnaviv: ASTC texture support
Add ASTC texture support for hardware that supports this (currently only GC3000 on i.MX6qp is known to have this). Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_screen.c')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_screen.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index bb789e69edc..b0c4b7ba471 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -500,6 +500,10 @@ gpu_supports_texure_format(struct etna_screen *screen, uint32_t fmt,
supported = VIV_FEATURE(screen, chipMinorFeatures2, HALTI1);
}
+ if (fmt & ASTC_FORMAT) {
+ supported = screen->specs.tex_astc;
+ }
+
if (!supported)
return false;
@@ -789,6 +793,8 @@ etna_get_specs(struct etna_screen *screen)
if (screen->specs.single_buffer)
DBG("etnaviv: Single buffer mode enabled with %d pixel pipes\n", screen->specs.pixel_pipes);
+ screen->specs.tex_astc = VIV_FEATURE(screen, chipMinorFeatures4, TEXTURE_ASTC);
+
return true;
fail: