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

Author: Alyssa Rosenzweig <[email protected]>
Date:   Sat Mar  4 11:36:41 2023 -0500

asahi: Mark PIPE_FORMAT_NONE "supported"

Kinda silly but fixes
dEQP-GLES31.functional.state_query.integer.max_framebuffer_samples_* which
queries the number of samples of a NONE format, required for
ARB_framebuffer_no_attachments to make sense.

Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21710>

---

 src/gallium/drivers/asahi/agx_pipe.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/asahi/agx_pipe.c 
b/src/gallium/drivers/asahi/agx_pipe.c
index 1643ec080f5..e6ef7975df0 100644
--- a/src/gallium/drivers/asahi/agx_pipe.c
+++ b/src/gallium/drivers/asahi/agx_pipe.c
@@ -1620,6 +1620,13 @@ agx_is_format_supported(struct pipe_screen *pscreen, 
enum pipe_format format,
    if (MAX2(sample_count, 1) != MAX2(storage_sample_count, 1))
       return false;
 
+   if ((usage & PIPE_BIND_VERTEX_BUFFER) && !agx_vbo_supports_format(format))
+      return false;
+
+   /* For framebuffer_no_attachments, fake support for "none" images */
+   if (format == PIPE_FORMAT_NONE)
+      return true;
+
    if (usage & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW)) {
       enum pipe_format tex_format = format;
 
@@ -1639,9 +1646,6 @@ agx_is_format_supported(struct pipe_screen *pscreen, enum 
pipe_format format,
          return false;
    }
 
-   if ((usage & PIPE_BIND_VERTEX_BUFFER) && !agx_vbo_supports_format(format))
-      return false;
-
    if (usage & PIPE_BIND_DEPTH_STENCIL) {
       switch (format) {
       /* natively supported

Reply via email to