aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_texture.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-06 19:27:25 +0100
committerMarc Haesen <marc@hc-consult.be>2012-01-06 19:27:25 +0100
commit7e9f4ea970e8f7008c212d7d3918a974eb0066da (patch)
tree92cf7fcdf6e8093e743346af2397f3caa17cffe3 /mesalib/src/mesa/state_tracker/st_texture.c
parent9715b7fab0757c86e1bb151f3dce0b324bcff692 (diff)
downloadvcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.tar.gz
vcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.tar.bz2
vcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.zip
libX11 mesa pixman git update 6 jan 2012
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_texture.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_texture.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_texture.c b/mesalib/src/mesa/state_tracker/st_texture.c
index 3323bbbbe..132d7a81c 100644
--- a/mesalib/src/mesa/state_tracker/st_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_texture.c
@@ -215,12 +215,19 @@ st_texture_image_map(struct st_context *st, struct st_texture_image *stImage,
GLuint zoffset, enum pipe_transfer_usage usage,
GLuint x, GLuint y, GLuint w, GLuint h)
{
+ struct st_texture_object *stObj =
+ st_texture_object(stImage->base.TexObject);
struct pipe_context *pipe = st->pipe;
- struct pipe_resource *pt = stImage->pt;
+ GLuint level;
DBG("%s \n", __FUNCTION__);
- stImage->transfer = pipe_get_transfer(st->pipe, pt, stImage->base.Level,
+ if (stObj->pt != stImage->pt)
+ level = 0;
+ else
+ level = stImage->base.Level;
+
+ stImage->transfer = pipe_get_transfer(st->pipe, stImage->pt, level,
stImage->base.Face + zoffset,
usage, x, y, w, h);