From: Kristian Høgsberg Date: Tue, 30 Mar 2010 18:05:47 +0000 (-0400) Subject: intel: Use fb->Height when flipping read buffer orientation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=581c773e81cdc467be2d09a0ccd76c0de3cba529;p=mesa.git 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. --- 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 */