diff options
author | Maciej Cencora <[email protected]> | 2010-01-16 14:53:07 +0100 |
---|---|---|
committer | Maciej Cencora <[email protected]> | 2010-01-19 23:38:33 +0100 |
commit | f2fea26269ac6b386f78fb68168fade4ae3290df (patch) | |
tree | ba9e8c7ea4bc94111cc01173233ac78f741ea6e0 /src/mesa/drivers | |
parent | 11affafc75525c50a2b4ffc9f91c1fe620d328fb (diff) |
r300: fix Y coord flipping in accelerated blits
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_blit.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_blit.c b/src/mesa/drivers/dri/r300/r300_blit.c index 37e3f8aa005..8a9c1c8beb0 100644 --- a/src/mesa/drivers/dri/r300/r300_blit.c +++ b/src/mesa/drivers/dri/r300/r300_blit.c @@ -403,9 +403,8 @@ static void calc_tex_coords(float img_width, float img_height, buf[3] = buf[2] + reg_height / img_height; if (flip_y) { - float tmp = buf[2]; - buf[2] = 1.0 - buf[3]; - buf[3] = 1.0 - tmp; + buf[2] = 1.0 - buf[2]; + buf[3] = 1.0 - buf[3]; } } @@ -424,13 +423,13 @@ static void emit_draw_packet(struct r300_context *r300, flip_y, texcoords); float verts[] = { dst_x_offset, dst_y_offset, - texcoords[0], texcoords[3], - dst_x_offset, dst_y_offset + reg_height, texcoords[0], texcoords[2], + dst_x_offset, dst_y_offset + reg_height, + texcoords[0], texcoords[3], dst_x_offset + reg_width, dst_y_offset + reg_height, - texcoords[1], texcoords[2], + texcoords[1], texcoords[3], dst_x_offset + reg_width, dst_y_offset, - texcoords[1], texcoords[3] }; + texcoords[1], texcoords[2] }; BATCH_LOCALS(&r300->radeon); |