EGL allows this, since you basically never want the depth/stencil across a
swap, and it lets you save memory bandwidth on renderers like ours.

Improves the framerate of 5 seconds of es2gears by 0.405017% +/-
0.0743318% (n=482).
---

This was a smaller effect than I was expecting of this change, but I guess the
ridiculous overhead I have of validating shaders per draw call in the kernel
is a bigger deal than this bandwidth cost.

src/gallium/drivers/vc4/vc4_context.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/vc4/vc4_context.c 
b/src/gallium/drivers/vc4/vc4_context.c
index d4a9eec..341accd 100644
--- a/src/gallium/drivers/vc4/vc4_context.c
+++ b/src/gallium/drivers/vc4/vc4_context.c
@@ -381,6 +381,9 @@ vc4_pipe_flush(struct pipe_context *pctx, struct 
pipe_fence_handle **fence,
 {
         struct vc4_context *vc4 = vc4_context(pctx);
 
+        if (flags & PIPE_FLUSH_INVALIDATE_ANCILLARY)
+                vc4->resolve &= ~(PIPE_CLEAR_DEPTH | PIPE_CLEAR_STENCIL);
+
         vc4_flush(pctx);
 
         if (fence) {
-- 
2.1.3

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to