[Mesa-dev] [PATCH 12/16] svga: try blitting with copy region in more cases

Brian Paul brianp at vmware.com
Tue Jun 28 23:52:16 UTC 2016


We previously could do blits with util_resource_copy_region() when doing
'loose' format checking.  Also do blits with util_resource_copy_region()
when the blit src/dst formats (not the underlying resources) exactly
match.  Needed for GL_ARB_copy_image.
---
 src/gallium/drivers/svga/svga_pipe_blit.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/svga/svga_pipe_blit.c b/src/gallium/drivers/svga/svga_pipe_blit.c
index ad54dc5..4a01c8e 100644
--- a/src/gallium/drivers/svga/svga_pipe_blit.c
+++ b/src/gallium/drivers/svga/svga_pipe_blit.c
@@ -294,7 +294,13 @@ svga_blit(struct pipe_context *pipe,
       return;
    }
 
-   if (util_try_blit_via_copy_region(pipe, blit_info)) {
+   if (util_can_blit_via_copy_region(blit_info, TRUE) ||
+       util_can_blit_via_copy_region(blit_info, FALSE)) {
+      util_resource_copy_region(pipe, blit_info->dst.resource,
+                                blit_info->dst.level,
+                                blit_info->dst.box.x, blit_info->dst.box.y,
+                                blit_info->dst.box.z, blit_info->src.resource,
+                                blit_info->src.level, &blit_info->src.box);
       return; /* done */
    }
 
-- 
1.9.1



More information about the mesa-dev mailing list