summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-02-25 18:59:56 -0700
committerBrian Paul <[email protected]>2010-02-25 19:00:54 -0700
commitc9e8ff1976cd14fdc84db440a554185be29a0ca2 (patch)
tree6031c4fa530e0eb124bc2d928e4cfd55f3b1796e /src/mesa
parent31ff9b0a135bf913ae6b44868bde31534a87802c (diff)
mesa: use simplified _BaseFormat value in render-to-texture code
Fixes fd.o bug 26762.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/texrender.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/texrender.c b/src/mesa/main/texrender.c
index dbed51a77f7..11d7c069144 100644
--- a/src/mesa/main/texrender.c
+++ b/src/mesa/main/texrender.c
@@ -496,21 +496,24 @@ update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att)
if (trb->TexImage->TexFormat == MESA_FORMAT_Z24_S8) {
trb->Base.Format = MESA_FORMAT_Z24_S8;
trb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT;
+ trb->Base._BaseFormat = GL_DEPTH_STENCIL;
}
else if (trb->TexImage->TexFormat == MESA_FORMAT_Z16) {
trb->Base.Format = MESA_FORMAT_Z16;
trb->Base.DataType = GL_UNSIGNED_SHORT;
+ trb->Base._BaseFormat = GL_DEPTH_STENCIL;
}
else if (trb->TexImage->TexFormat == MESA_FORMAT_Z32) {
trb->Base.Format = MESA_FORMAT_Z32;
trb->Base.DataType = GL_UNSIGNED_INT;
+ trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
}
else {
trb->Base.Format = trb->TexImage->TexFormat;
trb->Base.DataType = CHAN_TYPE;
+ trb->Base._BaseFormat = GL_RGBA;
}
trb->Base.Data = trb->TexImage->Data;
- trb->Base._BaseFormat = _mesa_base_fbo_format(ctx, trb->Base.InternalFormat);
}