[Mesa-dev] [PATCH v2 13/14] etnaviv: expose float formats only if GPU supports it

Christian Gmeiner christian.gmeiner at gmail.com
Tue May 1 14:48:42 UTC 2018


Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Reviewed-by: Wladimir J. van der Laan <laanwj at gmail.com>
---
 src/gallium/drivers/etnaviv/etnaviv_screen.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index 35e6e8944c..132b0ba5c8 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -501,6 +501,10 @@ gpu_supports_texure_format(struct etna_screen *screen, uint32_t fmt,
        */
       if (util_format_is_etc(format))
          supported = VIV_FEATURE(screen, chipMinorFeatures2, HALTI1);
+
+      /* At the moment we do not differ between half-float and float. */
+      if (util_format_is_float(format))
+          supported = VIV_FEATURE(screen, chipMinorFeatures1, HALF_FLOAT);
    }
 
    if (fmt & ASTC_FORMAT) {
-- 
2.17.0



More information about the mesa-dev mailing list