aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_texrender.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-17 16:37:26 +0100
committermarha <marha@users.sourceforge.net>2011-11-17 16:37:26 +0100
commitd41bc08d1ae8c4784c09d8977816c0fadab1ba52 (patch)
tree4dc3081a9af0316eeee02356a44fcc2419e1b15e /mesalib/src/mesa/swrast/s_texrender.c
parent156e37d3879b316329e3e05579414031da2647e2 (diff)
downloadvcxsrv-d41bc08d1ae8c4784c09d8977816c0fadab1ba52.tar.gz
vcxsrv-d41bc08d1ae8c4784c09d8977816c0fadab1ba52.tar.bz2
vcxsrv-d41bc08d1ae8c4784c09d8977816c0fadab1ba52.zip
xserver mesa git update 17 nov 2011
Diffstat (limited to 'mesalib/src/mesa/swrast/s_texrender.c')
-rw-r--r--mesalib/src/mesa/swrast/s_texrender.c13
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: