diff options
author | Marek Olšák <[email protected]> | 2012-12-19 23:06:51 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-01-04 14:05:43 +0100 |
commit | ccfcf3287326b924d745d7915b0cb471f4c8e24e (patch) | |
tree | 3c55f7fd5d55df05cf165291fd5c6450c3eaa9dc /src/gallium/drivers | |
parent | 23f76f558eac7f59ead6d49325c7edb4a010c0c5 (diff) |
gallium/u_blitter: unify some parameters into a dstbox parameter in blit_generic
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/r300/r300_blit.c | 14 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_blit.c | 8 |
2 files changed, 13 insertions, 9 deletions
diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c index 70b81e64231..9fff3700ed3 100644 --- a/src/gallium/drivers/r300/r300_blit.c +++ b/src/gallium/drivers/r300/r300_blit.c @@ -466,7 +466,7 @@ static void r300_resource_copy_region(struct pipe_context *pipe, unsigned dst_width0 = r300_resource(dst)->tex.width0; unsigned dst_height0 = r300_resource(dst)->tex.height0; unsigned layout; - struct pipe_box box; + struct pipe_box box, dstbox; struct pipe_sampler_view src_templ, *src_view; struct pipe_surface dst_templ, *dst_view; @@ -581,12 +581,14 @@ static void r300_resource_copy_region(struct pipe_context *pipe, dst_view = r300_create_surface_custom(pipe, dst, &dst_templ, dst_width0, dst_height0); src_view = r300_create_sampler_view_custom(pipe, src, &src_templ, src_width0, src_height0); + u_box_3d(dstx, dsty, dstz, abs(src_box->width), abs(src_box->height), + abs(src_box->depth), &dstbox); + r300_blitter_begin(r300, R300_COPY); - util_blitter_blit_generic(r300->blitter, dst_view, dstx, dsty, - abs(src_box->width), abs(src_box->height), - src_view, src_box, - src_width0, src_height0, PIPE_MASK_RGBAZS, - PIPE_TEX_FILTER_NEAREST, NULL, FALSE); + util_blitter_blit_generic(r300->blitter, dst_view, &dstbox, + src_view, src_box, src_width0, src_height0, + PIPE_MASK_RGBAZS, PIPE_TEX_FILTER_NEAREST, NULL, + FALSE); r300_blitter_end(r300); pipe_surface_reference(&dst_view, NULL); diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c index b4e9136416c..b348aa728b0 100644 --- a/src/gallium/drivers/r600/r600_blit.c +++ b/src/gallium/drivers/r600/r600_blit.c @@ -544,7 +544,7 @@ static void r600_resource_copy_region(struct pipe_context *ctx, struct pipe_surface *dst_view, dst_templ; struct pipe_sampler_view src_templ, *src_view; unsigned dst_width, dst_height, src_width0, src_height0, src_widthFL, src_heightFL; - struct pipe_box sbox; + struct pipe_box sbox, dstbox; bool copy_all_samples; /* Handle buffers first. */ @@ -647,10 +647,12 @@ static void r600_resource_copy_region(struct pipe_context *ctx, copy_all_samples = rctx->screen->msaa_texture_support != MSAA_TEXTURE_SAMPLE_ZERO; + u_box_3d(dstx, dsty, dstz, abs(src_box->width), abs(src_box->height), + abs(src_box->depth), &dstbox); + /* Copy. */ r600_blitter_begin(ctx, R600_COPY_TEXTURE); - util_blitter_blit_generic(rctx->blitter, dst_view, dstx, dsty, - abs(src_box->width), abs(src_box->height), + util_blitter_blit_generic(rctx->blitter, dst_view, &dstbox, src_view, src_box, src_width0, src_height0, PIPE_MASK_RGBAZS, PIPE_TEX_FILTER_NEAREST, NULL, copy_all_samples); |