summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915tex/intel_tex_copy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i915tex/intel_tex_copy.c')
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_tex_copy.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_tex_copy.c b/src/mesa/drivers/dri/i915tex/intel_tex_copy.c
index b85a25642a..8d7f8f9d91 100644
--- a/src/mesa/drivers/dri/i915tex/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/i915tex/intel_tex_copy.c
@@ -101,6 +101,7 @@ do_copy_texsubimage(struct intel_context *intel,
}
intelFlush(ctx);
+ /* XXX still need the lock ? */
LOCK_HARDWARE(intel);
{
GLuint image_offset = intel_miptree_image_offset(intelImage->mt,
@@ -117,21 +118,11 @@ do_copy_texsubimage(struct intel_context *intel,
dstx += x - orig_x;
dsty += y - orig_y;
- if (ctx->ReadBuffer->Name == 0) {
- /* reading from a window, adjust x, y */
- __DRIdrawablePrivate *dPriv = intel->driDrawable;
- GLuint window_y;
- /* window_y = position of window on screen if y=0=bottom */
- window_y = intel->intelScreen->height - (dPriv->y + dPriv->h);
- y = window_y + y;
- x += dPriv->x;
+ if (!(ctx->ReadBuffer->Name == 0)) {
+ /* XXX this looks bogus ? */
+ /* FBO: invert Y */
+ y = ctx->ReadBuffer->Height - y - 1;
}
- else {
- /* reading from a FBO */
- /* invert Y */
- y = ctx->ReadBuffer->Height - y - 1;
- }
-
/* A bit of fiddling to get the blitter to work with -ve
* pitches. But we get a nice inverted blit this way, so it's