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

Author: Ilia Mirkin <imir...@alum.mit.edu>
Date:   Sun Nov 19 16:36:08 2017 -0500

freedreno/a4xx: add ARB_framebuffer_no_attachments support

Signed-off-by: Ilia Mirkin <imir...@alum.mit.edu>
Reviewed-by: Rob Clark <robdcl...@gmail.com>

---

 docs/features.txt                                | 4 ++--
 src/gallium/drivers/freedreno/a4xx/fd4_screen.c  | 5 +++++
 src/gallium/drivers/freedreno/freedreno_screen.c | 2 +-
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/docs/features.txt b/docs/features.txt
index 59f7a18070..01cd133ef0 100644
--- a/docs/features.txt
+++ b/docs/features.txt
@@ -172,7 +172,7 @@ GL 4.3, GLSL 4.30 -- all DONE: i965/gen8+, nvc0, radeonsi
   GL_KHR_debug                                          DONE (all drivers)
   GL_ARB_explicit_uniform_location                      DONE (all drivers that 
support GLSL)
   GL_ARB_fragment_layer_viewport                        DONE (i965, nv50, 
r600, llvmpipe, softpipe)
-  GL_ARB_framebuffer_no_attachments                     DONE (freedreno/a5xx, 
i965, r600, softpipe)
+  GL_ARB_framebuffer_no_attachments                     DONE (freedreno, i965, 
r600, softpipe)
   GL_ARB_internalformat_query2                          DONE (all drivers)
   GL_ARB_invalidate_subdata                             DONE (all drivers)
   GL_ARB_multi_draw_indirect                            DONE (freedreno, i965, 
r600, llvmpipe, softpipe, swr)
@@ -244,7 +244,7 @@ GLES3.1, GLSL ES 3.1 -- all DONE: i965/hsw+, nvc0, radeonsi
   GL_ARB_compute_shader                                 DONE (freedreno/a5xx, 
i965/gen7+, softpipe)
   GL_ARB_draw_indirect                                  DONE (freedreno, 
i965/gen7+, r600, llvmpipe, softpipe, swr)
   GL_ARB_explicit_uniform_location                      DONE (all drivers that 
support GLSL)
-  GL_ARB_framebuffer_no_attachments                     DONE (freedreno/a5xx, 
i965/gen7+, r600, softpipe)
+  GL_ARB_framebuffer_no_attachments                     DONE (freedreno, 
i965/gen7+, r600, softpipe)
   GL_ARB_program_interface_query                        DONE (all drivers)
   GL_ARB_shader_atomic_counters                         DONE (freedreno/a5xx, 
i965/gen7+, r600, softpipe)
   GL_ARB_shader_image_load_store                        DONE (freedreno/a5xx, 
i965/gen7+, r600, softpipe)
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_screen.c 
b/src/gallium/drivers/freedreno/a4xx/fd4_screen.c
index 6006bb96b3..1b81f8db2f 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_screen.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_screen.c
@@ -75,6 +75,11 @@ fd4_screen_is_format_supported(struct pipe_screen *pscreen,
                                PIPE_BIND_SHARED);
        }
 
+       /* For ARB_framebuffer_no_attachments: */
+       if ((usage & PIPE_BIND_RENDER_TARGET) && (format == PIPE_FORMAT_NONE)) {
+               retval |= usage & PIPE_BIND_RENDER_TARGET;
+       }
+
        if ((usage & PIPE_BIND_DEPTH_STENCIL) &&
                        (fd4_pipe2depth(format) != (enum a4xx_depth_format)~0) 
&&
                        (fd4_pipe2tex(format) != (enum a4xx_tex_fmt)~0)) {
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c 
b/src/gallium/drivers/freedreno/freedreno_screen.c
index 3fa28e3f31..aea56a180a 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -338,7 +338,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum 
pipe_cap param)
                return 0;
 
        case PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT:
-               if (is_a5xx(screen))
+               if (is_a4xx(screen) || is_a5xx(screen))
                        return 1;
                return 0;
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to