From 581c773e81cdc467be2d09a0ccd76c0de3cba529 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Tue, 30 Mar 2010 14:05:47 -0400 Subject: 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. --- src/mesa/drivers/dri/intel/intel_tex_copy.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/mesa/drivers/dri/intel/intel_tex_copy.c') diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c index 618f690a5f8..62e1e78f59b 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 */ -- cgit v1.2.3