diff options
author | marha <marha@users.sourceforge.net> | 2011-11-17 16:46:41 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-11-17 16:46:41 +0100 |
commit | 97fb1dadc6c52adeba0ac0684129520288ab794f (patch) | |
tree | 6a3b54bec00abec5b571087dd001a33d62bf488c /mesalib/src/mesa/swrast/s_texrender.c | |
parent | b99cdb7509cad0b99761d19fe99637177913412b (diff) | |
parent | d41bc08d1ae8c4784c09d8977816c0fadab1ba52 (diff) | |
download | vcxsrv-97fb1dadc6c52adeba0ac0684129520288ab794f.tar.gz vcxsrv-97fb1dadc6c52adeba0ac0684129520288ab794f.tar.bz2 vcxsrv-97fb1dadc6c52adeba0ac0684129520288ab794f.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/mesa/swrast/s_readpix.c
Diffstat (limited to 'mesalib/src/mesa/swrast/s_texrender.c')
-rw-r--r-- | mesalib/src/mesa/swrast/s_texrender.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mesalib/src/mesa/swrast/s_texrender.c b/mesalib/src/mesa/swrast/s_texrender.c index 83e7a6a03..3734ce6d5 100644 --- a/mesalib/src/mesa/swrast/s_texrender.c +++ b/mesalib/src/mesa/swrast/s_texrender.c @@ -567,6 +567,19 @@ update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att) trb->Base.InternalFormat = trb->TexImage->Base.InternalFormat; trb->Base.Format = trb->TexImage->Base.TexFormat; + /* Set the gl_renderbuffer::Data field so that mapping the buffer + * in renderbuffer.c succeeds. + */ + if (att->Texture->Target == GL_TEXTURE_3D || + att->Texture->Target == GL_TEXTURE_2D_ARRAY_EXT) { + trb->Base.Data = trb->TexImage->Buffer + + trb->TexImage->ImageOffsets[trb->Zoffset] * + _mesa_get_format_bytes(trb->TexImage->Base.TexFormat); + } + else { + trb->Base.Data = trb->TexImage->Buffer; + } + /* XXX may need more special cases here */ switch (trb->TexImage->Base.TexFormat) { case MESA_FORMAT_Z24_S8: |