diff options
author | marha <marha@users.sourceforge.net> | 2013-07-25 09:24:55 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-07-25 09:24:55 +0200 |
commit | af62a89a4e677bc0a10094be86816b2e273b2c4a (patch) | |
tree | 3cceb0e23b7ab79dbcedb27c5546cf2666c1c7a0 /mesalib/src/mesa/drivers | |
parent | de54c5b749b3eefb75d420840c889533a58aa342 (diff) | |
parent | acf3535c75d7c79154b6b89c66567317944d244c (diff) | |
download | vcxsrv-af62a89a4e677bc0a10094be86816b2e273b2c4a.tar.gz vcxsrv-af62a89a4e677bc0a10094be86816b2e273b2c4a.tar.bz2 vcxsrv-af62a89a4e677bc0a10094be86816b2e273b2c4a.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
xserver mesa git update 25 Jul 2013
Conflicts:
xorg-server/hw/xwin/win.h
xorg-server/hw/xwin/winclipboardthread.c
xorg-server/hw/xwin/winglobals.c
xorg-server/hw/xwin/winmouse.c
xorg-server/hw/xwin/winmultiwindowclass.c
xorg-server/hw/xwin/winscrinit.c
xorg-server/hw/xwin/winwin32rootless.c
xorg-server/hw/xwin/winwin32rootlesswndproc.c
xorg-server/hw/xwin/winwindow.h
xorg-server/hw/xwin/winwindowswm.c
xorg-server/hw/xwin/winwndproc.c
Diffstat (limited to 'mesalib/src/mesa/drivers')
-rw-r--r-- | mesalib/src/mesa/drivers/common/meta.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c index e8484299b..4a3497c9a 100644 --- a/mesalib/src/mesa/drivers/common/meta.c +++ b/mesalib/src/mesa/drivers/common/meta.c @@ -4095,10 +4095,29 @@ _mesa_meta_GetTexImage(struct gl_context *ctx, _mesa_get_format_datatype(texImage->TexFormat) == GL_UNSIGNED_NORMALIZED) { struct gl_texture_object *texObj = texImage->TexObject; - const GLuint slice = 0; /* only 2D compressed textures for now */ + GLuint slice; /* Need to unlock the texture here to prevent deadlock... */ _mesa_unlock_texture(ctx, texObj); - decompress_texture_image(ctx, texImage, slice, format, type, pixels); + for (slice = 0; slice < texImage->Depth; slice++) { + void *dst; + if (texImage->TexObject->Target == GL_TEXTURE_2D_ARRAY) { + /* Setup pixel packing. SkipPixels and SkipRows will be applied + * in the decompress_texture_image() function's call to + * glReadPixels but we need to compute the dest slice's address + * here (according to SkipImages and ImageHeight). + */ + struct gl_pixelstore_attrib packing = ctx->Pack; + packing.SkipPixels = 0; + packing.SkipRows = 0; + dst = _mesa_image_address3d(&packing, pixels, texImage->Width, + texImage->Height, format, type, + slice, 0, 0); + } + else { + dst = pixels; + } + decompress_texture_image(ctx, texImage, slice, format, type, dst); + } /* ... and relock it */ _mesa_lock_texture(ctx, texObj); } |