summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-10-17 09:39:48 -0700
committerEric Anholt <[email protected]>2011-11-03 23:29:53 -0700
commite7349a55f75e8d1155684b5ad0f9dede55eb8549 (patch)
treebbc259d71050aba8975bb4565188e3ec57e35fda /src/mesa/drivers
parentd9f2add18102282a969a3662b3d89f32cece1074 (diff)
radeon: Remove early dereference of src/dst width in glCopyTexSubImage.
There doesn't appear to be any particular reason for this -- it's not like the width is changing between the deref and the use. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex_copy.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
index 47b4180cf8e..bc9015e574d 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
@@ -51,8 +51,6 @@ do_copy_texsubimage(struct gl_context *ctx,
unsigned dst_bpp;
gl_format src_mesaformat;
gl_format dst_mesaformat;
- unsigned src_width;
- unsigned dst_width;
unsigned flip_y;
if (!radeon->vtbl.blit) {
@@ -101,8 +99,6 @@ do_copy_texsubimage(struct gl_context *ctx,
src_mesaformat = rrb->base.Format;
dst_mesaformat = timg->base.Base.TexFormat;
- src_width = rrb->base.Width;
- dst_width = timg->base.Base.Width;
src_bpp = _mesa_get_format_bytes(src_mesaformat);
dst_bpp = _mesa_get_format_bytes(dst_mesaformat);
if (!radeon->vtbl.check_blit(dst_mesaformat)) {
@@ -133,10 +129,10 @@ do_copy_texsubimage(struct gl_context *ctx,
/* blit from src buffer to texture */
return radeon->vtbl.blit(ctx, rrb->bo, src_offset, src_mesaformat, rrb->pitch/rrb->cpp,
- src_width, rrb->base.Height, x, y,
+ rrb->base.Width, rrb->base.Height, x, y,
timg->mt->bo, dst_offset, dst_mesaformat,
timg->mt->levels[level].rowstride / dst_bpp,
- dst_width, timg->base.Base.Height,
+ timg->base.Base.Width, timg->base.Base.Height,
dstx, dsty, width, height, flip_y);
}