[Mesa-dev] [PATCH v2 09/14] etnaviv: HALTI0 indicates extended pe formats
Christian Gmeiner
christian.gmeiner at gmail.com
Tue May 1 14:48:38 UTC 2018
Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Reviewed-by: Wladimir J. van der Laan
---
src/gallium/drivers/etnaviv/etnaviv_screen.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index e3a3a9c51c..35e6e8944c 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -516,6 +516,17 @@ gpu_supports_texure_format(struct etna_screen *screen, uint32_t fmt,
return true;
}
+static bool
+gpu_supports_pe_format(struct etna_screen *screen, uint32_t fmt)
+{
+ bool supported = true;
+
+ if (fmt >= RS_FORMAT_R16F)
+ supported = VIV_FEATURE(screen, chipMinorFeatures1, HALTI0);
+
+ return supported;
+}
+
static boolean
etna_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
@@ -534,7 +545,12 @@ etna_screen_is_format_supported(struct pipe_screen *pscreen,
return FALSE;
if (usage & PIPE_BIND_RENDER_TARGET) {
- if (translate_pe_format(format) != ETNA_NO_MATCH) {
+ uint32_t fmt = translate_pe_format(format);
+
+ if (!gpu_supports_pe_format(screen, fmt))
+ fmt = ETNA_NO_MATCH;
+
+ if (fmt != ETNA_NO_MATCH) {
/* Validate MSAA; number of samples must be allowed, and render target
* must have MSAA'able format. */
if (sample_count > 1) {
--
2.17.0
More information about the mesa-dev
mailing list