Mesa (master): svga: Prefer accelerated blits over cpu copy region

Thomas Hellstrom thomash at kemper.freedesktop.org
Fri Jun 16 08:50:33 UTC 2017


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

Author: Thomas Hellstrom <thellstrom at vmware.com>
Date:   Wed Apr 26 23:58:47 2017 -0700

svga: Prefer accelerated blits over cpu copy region

This reduces the number of cpu copy_region fallbacks on a Nvidia system
running the piglit command

./publish/bin/piglit run  -1 -t copy -t blit tests/quick

from 64789 to 780

Previously this has caused a regression in piglit test
spec@!opengl 1.0 at gl-1.0-scissor-copypixels, but I'm currently not able to
reproduce that regression.

Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Charmaine Lee <charmainel at vmware.com>

---

 src/gallium/drivers/svga/svga_pipe_blit.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_pipe_blit.c b/src/gallium/drivers/svga/svga_pipe_blit.c
index 3d7196dddd..ef5aeee9a1 100644
--- a/src/gallium/drivers/svga/svga_pipe_blit.c
+++ b/src/gallium/drivers/svga/svga_pipe_blit.c
@@ -669,14 +669,12 @@ svga_blit(struct pipe_context *pipe,
    if (try_copy_region(svga, blit))
       goto done;
 
-   /* FIXME: Ideally, we should call try_blit() before try_cpu_copy_region(),
-    * however that breaks piglit test gl-1.0-scissor-copypixels.
-    */
-   if (try_cpu_copy_region(svga, blit))
+   if (try_blit(svga, blit))
       goto done;
 
-   if (try_blit(svga, blit))
+   if (!try_cpu_copy_region(svga, blit))
       debug_printf("svga: Blit failed.\n");
+   
 done:
    SVGA_STATS_TIME_POP(sws);  /* SVGA_STATS_TIME_BLIT */
    (void) sws;




More information about the mesa-commit mailing list