summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_tex_copy.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-03-30 14:05:47 -0400
committerKristian Høgsberg <krh@bitplanet.net>2010-03-30 16:48:51 -0400
commit581c773e81cdc467be2d09a0ccd76c0de3cba529 (patch)
tree2b2283e00efe2773d14373dac3b855570a1d81c6 /src/mesa/drivers/dri/intel/intel_tex_copy.c
parent3623202834e9ca1073a4aa66f72f584812fb14df (diff)
intel: Use fb->Height when flipping read buffer orientation
With DRI2, x and y are always zero and fb->Height is always up to date with the drawable height.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_tex_copy.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_copy.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c
index 618f690a5f..62e1e78f59 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c
@@ -130,18 +130,8 @@ do_copy_texsubimage(struct intel_context *intel,
}
if (ctx->ReadBuffer->Name == 0) {
- /* reading from a window, adjust x, y */
- const __DRIdrawable *dPriv = intel->driReadDrawable;
- y = dPriv->y + (dPriv->h - (y + height));
- x += dPriv->x;
-
- /* Invert the data coming from the source rectangle due to GL
- * and hardware disagreeing on where y=0 is.
- *
- * It appears that our offsets and pitches get mangled
- * appropriately by the hardware, and we don't need to adjust them
- * on our own.
- */
+ /* Flip vertical orientation for system framebuffers */
+ y = ctx->ReadBuffer->Height - (y + height);
src_pitch = -src->pitch;
} else {
/* reading from a FBO, y is already oriented the way we like */