diff options
author | Charmaine Lee <[email protected]> | 2017-10-24 10:57:42 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-09-10 13:07:30 -0600 |
commit | 3233d0539021e3aa3bbf5bba66bc6d01aa6a599c (patch) | |
tree | 89132e8e374b9d141d06faf20fd322c949782852 | |
parent | 74791b80b9a3d875f27cc3710d282b6e5da3b95f (diff) |
svga: use helper function to do copy region
Use the common helper function svga_texture_copy_region
for copy region command.
Reviewed-by: Brian Paul <[email protected]>
-rw-r--r-- | src/gallium/drivers/svga/svga_pipe_blit.c | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_blit.c b/src/gallium/drivers/svga/svga_pipe_blit.c index bb213ac92e8..a3579ba98c2 100644 --- a/src/gallium/drivers/svga/svga_pipe_blit.c +++ b/src/gallium/drivers/svga/svga_pipe_blit.c @@ -125,36 +125,20 @@ copy_region_vgpu10(struct svga_context *svga, struct pipe_resource *src_tex, enum pipe_error ret; uint32 srcSubResource, dstSubResource; struct svga_texture *dtex, *stex; - SVGA3dCopyBox box; stex = svga_texture(src_tex); dtex = svga_texture(dst_tex); svga_surfaces_flush(svga); - box.x = dst_x; - box.y = dst_y; - box.z = dst_z; - box.w = width; - box.h = height; - box.d = depth; - box.srcx = src_x; - box.srcy = src_y; - box.srcz = src_z; - srcSubResource = src_layer_face * (src_tex->last_level + 1) + src_level; dstSubResource = dst_layer_face * (dst_tex->last_level + 1) + dst_level; - ret = SVGA3D_vgpu10_PredCopyRegion(svga->swc, - dtex->handle, dstSubResource, - stex->handle, srcSubResource, &box); - if (ret != PIPE_OK) { - svga_context_flush(svga, NULL); - ret = SVGA3D_vgpu10_PredCopyRegion(svga->swc, - dtex->handle, dstSubResource, - stex->handle, srcSubResource, &box); - assert(ret == PIPE_OK); - } + svga_texture_copy_region(svga, stex->handle, srcSubResource, + src_x, src_y, src_z, + dtex->handle, dstSubResource, + dst_x, dst_y, dst_z, + width, height, depth); /* Mark the texture subresource as defined. */ svga_define_texture_level(dtex, dst_layer_face, dst_level); |