summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-10-13 07:37:43 -0600
committerBrian Paul <[email protected]>2011-10-13 07:37:43 -0600
commit504d0add1257f63d72d320f99f182412358dc40f (patch)
tree4457e7844a269c68f5ec6278de66d83cf7c6ad74 /src/mesa
parente5fef34c2132e29b6cecfda525dfa956c4477d75 (diff)
mesa: check attachment Type field in renderbuffer_exists()
Instead of the renderbuffer pointer. In the future, attaching a texture may not mean the renderbuffer pointer gets set too. Plus, remove some commented-out assertions.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/framebuffer.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 834328b82e8..8d0763db331 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -907,27 +907,21 @@ renderbuffer_exists(struct gl_context *ctx,
break;
case GL_DEPTH:
case GL_DEPTH_COMPONENT:
- if (!att[BUFFER_DEPTH].Renderbuffer) {
+ if (att[BUFFER_DEPTH].Type == GL_NONE) {
return GL_FALSE;
}
- /*ASSERT(att[BUFFER_DEPTH].Renderbuffer->DepthBits > 0);*/
break;
case GL_STENCIL:
case GL_STENCIL_INDEX:
- if (!att[BUFFER_STENCIL].Renderbuffer) {
+ if (att[BUFFER_STENCIL].Type == GL_NONE) {
return GL_FALSE;
}
- /*ASSERT(att[BUFFER_STENCIL].Renderbuffer->StencilBits > 0);*/
break;
case GL_DEPTH_STENCIL_EXT:
- if (!att[BUFFER_DEPTH].Renderbuffer ||
- !att[BUFFER_STENCIL].Renderbuffer) {
+ if (att[BUFFER_DEPTH].Type == GL_NONE ||
+ att[BUFFER_STENCIL].Type == GL_NONE) {
return GL_FALSE;
}
- /*
- ASSERT(att[BUFFER_DEPTH].Renderbuffer->DepthBits > 0);
- ASSERT(att[BUFFER_STENCIL].Renderbuffer->StencilBits > 0);
- */
break;
default:
_mesa_problem(ctx,