Mesa (main): freedreno: Stop exposing MSAA image load/store on desktop GL.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 19 00:13:26 UTC 2021


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

Author: Emma Anholt <emma at anholt.net>
Date:   Wed Nov 17 15:15:19 2021 -0800

freedreno: Stop exposing MSAA image load/store on desktop GL.

GLES doesn't support it, and blob VK doesn't support it.  We could
theoretically lower it, but don't bother since it's not required.  Fixes
various piglit image load/store tests.

Suggested-by: Ilia Mirkin <imirkin at alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13852>

---

 src/gallium/drivers/freedreno/a5xx/fd5_screen.c | 5 +++++
 src/gallium/drivers/freedreno/a6xx/fd6_screen.c | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_screen.c b/src/gallium/drivers/freedreno/a5xx/fd5_screen.c
index bf54f37bf6d..c8e38e80993 100644
--- a/src/gallium/drivers/freedreno/a5xx/fd5_screen.c
+++ b/src/gallium/drivers/freedreno/a5xx/fd5_screen.c
@@ -90,6 +90,11 @@ fd5_screen_is_format_supported(struct pipe_screen *pscreen,
                          PIPE_BIND_COMPUTE_RESOURCE);
    }
 
+   if (usage & PIPE_BIND_SHADER_IMAGE) {
+      if (sample_count > 1)
+         return false;
+   }
+
    /* For ARB_framebuffer_no_attachments: */
    if ((usage & PIPE_BIND_RENDER_TARGET) && (format == PIPE_FORMAT_NONE)) {
       retval |= usage & PIPE_BIND_RENDER_TARGET;
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_screen.c b/src/gallium/drivers/freedreno/a6xx/fd6_screen.c
index 9a2a88c9d5e..1085c16d08d 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_screen.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_screen.c
@@ -89,6 +89,11 @@ fd6_screen_is_format_supported(struct pipe_screen *pscreen,
       retval |= usage & (PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_SHADER_IMAGE);
    }
 
+   if (usage & PIPE_BIND_SHADER_IMAGE) {
+      if (sample_count > 1)
+         return false;
+   }
+
    if ((usage &
         (PIPE_BIND_RENDER_TARGET | PIPE_BIND_DISPLAY_TARGET |
          PIPE_BIND_SCANOUT | PIPE_BIND_SHARED | PIPE_BIND_COMPUTE_RESOURCE)) &&



More information about the mesa-commit mailing list