summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_blit.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-12-19 23:06:51 +0100
committerMarek Olšák <[email protected]>2013-01-04 14:05:43 +0100
commitccfcf3287326b924d745d7915b0cb471f4c8e24e (patch)
tree3c55f7fd5d55df05cf165291fd5c6450c3eaa9dc /src/gallium/drivers/r300/r300_blit.c
parent23f76f558eac7f59ead6d49325c7edb4a010c0c5 (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/r300/r300_blit.c')
-rw-r--r--src/gallium/drivers/r300/r300_blit.c14
1 files changed, 8 insertions, 6 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);