summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-05-19 10:07:45 -0600
committerBrian Paul <[email protected]>2009-05-19 10:07:45 -0600
commitd0eccc41878ba9f51a885a69c4ba79fb127aeb18 (patch)
tree9f093508d0075d6250ef839d0b961495b00b5459 /src
parent43d8ace88da80848035827c7bb4bbf5530b59a7c (diff)
parent042d9a513213b1fa356c0d80abc62b9327e0bcc2 (diff)
Merge branch 'mesa_7_5_branch'
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/fbobject.c18
-rw-r--r--src/mesa/main/texrender.c1
2 files changed, 15 insertions, 4 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index dbd4c5848cc..83301f1e621 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -379,6 +379,7 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
/* OK */
}
else if (ctx->Extensions.EXT_packed_depth_stencil &&
+ ctx->Extensions.ARB_depth_texture &&
texImage->TexFormat->BaseFormat == GL_DEPTH_STENCIL_EXT) {
/* OK */
}
@@ -389,10 +390,19 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
}
}
else {
- /* no such thing as stencil textures */
- att_incomplete("illegal stencil texture");
- att->Complete = GL_FALSE;
- return;
+ ASSERT(format == GL_STENCIL);
+ ASSERT(att->Renderbuffer->StencilBits);
+ if (ctx->Extensions.EXT_packed_depth_stencil &&
+ ctx->Extensions.ARB_depth_texture &&
+ att->Renderbuffer->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
+ /* OK */
+ }
+ else {
+ /* no such thing as stencil-only textures */
+ att_incomplete("illegal stencil texture");
+ att->Complete = GL_FALSE;
+ return;
+ }
}
}
else if (att->Type == GL_RENDERBUFFER_EXT) {
diff --git a/src/mesa/main/texrender.c b/src/mesa/main/texrender.c
index 49de6f5b8ab..cc74d58fbd1 100644
--- a/src/mesa/main/texrender.c
+++ b/src/mesa/main/texrender.c
@@ -507,6 +507,7 @@ update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att)
trb->Base.BlueBits = trb->TexImage->TexFormat->BlueBits;
trb->Base.AlphaBits = trb->TexImage->TexFormat->AlphaBits;
trb->Base.DepthBits = trb->TexImage->TexFormat->DepthBits;
+ trb->Base.StencilBits = trb->TexImage->TexFormat->StencilBits;
}