summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2017-11-15 09:56:38 -0500
committerRob Clark <[email protected]>2017-11-16 08:44:19 -0500
commit2878af74dd3629aaa292de75f7d12f153ab1ad86 (patch)
tree70365e70ee7a564b62b675c362ab52cb8c1b9479
parent8d48671492412e04c18651a779cabacf30ed0afe (diff)
freedreno/a5xx: ARB_framebuffer_no_attachments support
Signed-off-by: Rob Clark <[email protected]>
-rw-r--r--src/gallium/drivers/freedreno/a5xx/fd5_screen.c5
-rw-r--r--src/gallium/drivers/freedreno/freedreno_gmem.c5
-rw-r--r--src/gallium/drivers/freedreno/freedreno_screen.c2
3 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_screen.c b/src/gallium/drivers/freedreno/a5xx/fd5_screen.c
index 96f83ed3340..2816c361549 100644
--- a/src/gallium/drivers/freedreno/a5xx/fd5_screen.c
+++ b/src/gallium/drivers/freedreno/a5xx/fd5_screen.c
@@ -73,6 +73,11 @@ fd5_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) &&
(fd5_pipe2depth(format) != (enum a5xx_depth_format)~0) &&
(fd5_pipe2tex(format) != (enum a5xx_tex_fmt)~0)) {
diff --git a/src/gallium/drivers/freedreno/freedreno_gmem.c b/src/gallium/drivers/freedreno/freedreno_gmem.c
index 9c534c4f26e..fef76733abf 100644
--- a/src/gallium/drivers/freedreno/freedreno_gmem.c
+++ b/src/gallium/drivers/freedreno/freedreno_gmem.c
@@ -397,6 +397,11 @@ fd_gmem_render_tiles(struct fd_batch *batch)
} else if (!(fd_mesa_debug & FD_DBG_NOBYPASS)) {
sysmem = true;
}
+
+ /* For ARB_framebuffer_no_attachments: */
+ if ((pfb->nr_cbufs == 0) && !pfb->zsbuf) {
+ sysmem = true;
+ }
}
fd_reset_wfi(batch);
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index 0061b200596..62dfd2651c3 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -295,7 +295,6 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL:
case PIPE_CAP_GENERATE_MIPMAP:
case PIPE_CAP_SURFACE_REINTERPRET_BLOCKS:
- case PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT:
case PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR:
case PIPE_CAP_CULL_DISTANCE:
case PIPE_CAP_PRIMITIVE_RESTART_FOR_PATCHES:
@@ -330,6 +329,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
return 0;
case PIPE_CAP_DRAW_INDIRECT:
+ case PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT:
if (is_a5xx(screen))
return 1;
return 0;