Mesa (master): svga: Use utility functions to help determine whether we can use copy_region

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


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

Author: Thomas Hellstrom <thellstrom at vmware.com>
Date:   Wed Apr 12 09:28:49 2017 +0200

svga: Use utility functions to help determine whether we can use copy_region

It seems like the SVGA tests are in general more stringent than the utility
tests, but they also miss some blitter features like filters and window
rectangles, and if new blitter features are added in the future, it might
be possible that we forget adding tests for those.

So in addition to the SVGA tests, use the utility tests to restrict the
situations where we can use copy_region.

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 | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_pipe_blit.c b/src/gallium/drivers/svga/svga_pipe_blit.c
index 677d78ca71..13788fd59c 100644
--- a/src/gallium/drivers/svga/svga_pipe_blit.c
+++ b/src/gallium/drivers/svga/svga_pipe_blit.c
@@ -275,9 +275,8 @@ static bool
 can_blit_via_svga_copy_region(struct svga_context *svga,
                               const struct pipe_blit_info *blit_info)
 {
-   /* check that the blit src/dst regions are same size, no flipping, etc. */
-   if (blit_info->src.box.width != blit_info->dst.box.width ||
-       blit_info->src.box.height != blit_info->dst.box.height)
+   if (!util_can_blit_via_copy_region(blit_info, FALSE) &&
+       !util_can_blit_via_copy_region(blit_info, TRUE))
       return false;
 
    /* For depth+stencil formats, copy with mask != PIPE_MASK_ZS is not
@@ -287,9 +286,7 @@ can_blit_via_svga_copy_region(struct svga_context *svga,
       blit_info->mask != (PIPE_MASK_ZS))
      return false;
 
-   if (blit_info->alpha_blend ||
-       (svga->render_condition && blit_info->render_condition_enable) ||
-       blit_info->scissor_enable)
+   if (svga->render_condition && blit_info->render_condition_enable)
       return false;
 
    return check_blending_and_srgb_cond(svga, blit_info);




More information about the mesa-commit mailing list