Module: Mesa
Branch: main
Commit: e481c1269c36efae6fad9e3c60af9c66cc8bbf74
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e481c1269c36efae6fad9e3c60af9c66cc8bbf74

Author: Lucas Stach <l.st...@pengutronix.de>
Date:   Tue Jan  9 17:31:03 2024 +0100

etnaviv: disable 64bpp render/sampler formats

Vivante hardware handles 64bpp render targets and samplers in a odd way
by splitting the buffer and using a pair of texture samplers or a pair
of MRT outputs to access those resources. This isn't implemented in the
driver right now, so we should not advertise support for those formats.

CC: mesa-stable
Signed-off-by: Lucas Stach <l.st...@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmei...@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26982>

---

 src/gallium/drivers/etnaviv/etnaviv_screen.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c 
b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index 8f8e7c8d428..801562602fe 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -458,6 +458,11 @@ gpu_supports_texture_format(struct etna_screen *screen, 
uint32_t fmt,
 {
    bool supported = true;
 
+   /* Requires split sampler support, which the driver doesn't support, yet. */
+   if (!util_format_is_compressed(format) &&
+       util_format_get_blocksizebits(format) > 32)
+      return false;
+
    if (fmt == TEXTURE_FORMAT_ETC1)
       supported = VIV_FEATURE(screen, chipFeatures, ETC1_TEXTURE_COMPRESSION);
 
@@ -500,6 +505,10 @@ gpu_supports_render_format(struct etna_screen *screen, 
enum pipe_format format,
    if (fmt == ETNA_NO_MATCH)
       return false;
 
+   /* Requires split target support, which the driver doesn't support, yet. */
+   if (util_format_get_blocksizebits(format) > 32)
+      return false;
+
    if (sample_count > 1) {
       /* Explicitly enabled. */
       if (!DBG_ENABLED(ETNA_DBG_MSAA))

Reply via email to