summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-06-28 17:13:57 -0600
committerBrian Paul <[email protected]>2016-06-30 14:32:08 -0600
commit4a54514958789a823054322051dd1c0864df5721 (patch)
tree68a59b3ad3c76bf0e352f7e11ed0da1efd0def2a /src/gallium
parent92b44efef464c04cb4191356936046b49ff13bd9 (diff)
svga: try blitting with copy region in more cases
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. Acked-by: Roland Scheidegger <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/svga/svga_pipe_blit.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_blit.c b/src/gallium/drivers/svga/svga_pipe_blit.c
index 438151fed70..bbb6156cdc0 100644
--- a/src/gallium/drivers/svga/svga_pipe_blit.c
+++ b/src/gallium/drivers/svga/svga_pipe_blit.c
@@ -293,7 +293,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 */
}