diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-01-19 19:13:26 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2010-01-19 19:13:26 -0500 |
commit | 76cf2618327a7f008dcfd0d91d64d6d9e01f9a9c (patch) | |
tree | 1d4e2a0354e86a8827f1c704ba1b292c75a7007b /src/mesa/drivers/dri/r200 | |
parent | 1bb6b1d9dbabafdb864ee112526b1212744ac614 (diff) |
r100/r200: fix Y coord flipping in accelerated blits
Diffstat (limited to 'src/mesa/drivers/dri/r200')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_blit.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_blit.c b/src/mesa/drivers/dri/r200/r200_blit.c index 8d9c976916..f899f7efdc 100644 --- a/src/mesa/drivers/dri/r200/r200_blit.c +++ b/src/mesa/drivers/dri/r200/r200_blit.c @@ -241,9 +241,8 @@ static inline 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[1]; + buf[3] = 1.0 - buf[3]; } } @@ -266,17 +265,17 @@ static inline void emit_draw_packet(struct r200_context *r200, verts[0] = dst_x_offset; verts[1] = dst_y_offset + reg_height; verts[2] = texcoords[0]; - verts[3] = texcoords[2]; + verts[3] = texcoords[3]; verts[4] = dst_x_offset + reg_width; verts[5] = dst_y_offset + reg_height; verts[6] = texcoords[1]; - verts[7] = texcoords[2]; + verts[7] = texcoords[3]; verts[8] = dst_x_offset + reg_width; verts[9] = dst_y_offset; verts[10] = texcoords[1]; - verts[11] = texcoords[3]; + verts[11] = texcoords[2]; BEGIN_BATCH(14); OUT_BATCH(R200_CP_CMD_3D_DRAW_IMMD_2 | (12 << 16)); |