summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv/etnaviv_screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_screen.c')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_screen.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index 0781fec5881..129b0cd6c77 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -472,9 +472,19 @@ gpu_supports_texure_format(struct etna_screen *screen, uint32_t fmt,
if (fmt >= TEXTURE_FORMAT_DXT1 && fmt <= TEXTURE_FORMAT_DXT4_DXT5)
supported = VIV_FEATURE(screen, chipFeatures, DXT_TEXTURE_COMPRESSION);
- if (fmt & EXT_FORMAT)
+ if (fmt & EXT_FORMAT) {
supported = VIV_FEATURE(screen, chipMinorFeatures1, HALTI0);
+ /* ETC1 is checked above, as it has its own feature bit. ETC2 is
+ * supported with HALTI0, however that implementation is buggy in hardware.
+ * The blob driver does per-block patching to work around this. As this
+ * is currently not implemented by etnaviv, enable it for HALTI1 (GC3000)
+ * only.
+ */
+ if (util_format_is_etc(format))
+ supported = VIV_FEATURE(screen, chipMinorFeatures2, HALTI1);
+ }
+
if (!supported)
return false;