summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_blit.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2011-02-16 20:09:06 +0100
committerMarek Olšák <maraeo@gmail.com>2011-02-16 21:40:54 +0100
commit2d1cc27729bd1808a39b226ae3eda5663328ba74 (patch)
tree5116ad6ab6487e9f2a250ac1d2771bbebc35fdae /src/gallium/drivers/r300/r300_blit.c
parent8513d3405bd5cd633579b16af1ab04253a8b37d9 (diff)
downloadexternal_mesa3d-2d1cc27729bd1808a39b226ae3eda5663328ba74.zip
external_mesa3d-2d1cc27729bd1808a39b226ae3eda5663328ba74.tar.gz
external_mesa3d-2d1cc27729bd1808a39b226ae3eda5663328ba74.tar.bz2
r300g: fix blitting NPOT compressed textures
Diffstat (limited to 'src/gallium/drivers/r300/r300_blit.c')
-rw-r--r--src/gallium/drivers/r300/r300_blit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index 14c9794..4f86db3 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -480,12 +480,12 @@ static void r300_resource_copy_region(struct pipe_context *pipe,
/* Since the pixels are 4 times larger, we must decrease
* the image size and the coordinates 4 times. */
new_src.format = new_dst.format;
- new_dst.height0 /= 4;
- new_src.height0 /= 4;
+ new_dst.height0 = (new_dst.height0 + 3) / 4;
+ new_src.height0 = (new_src.height0 + 3) / 4;
dsty /= 4;
box = *src_box;
box.y /= 4;
- box.height /= 4;
+ box.height = (box.height + 3) / 4;
src_box = &box;
}