[Mesa-dev] [PATCH 1/4] mesa: add renderbuffer Depth field

Jordan Justen jordan.l.justen at intel.com
Sat Apr 27 16:37:52 PDT 2013


With glFramebufferTexture, a renderbuffer may support
all layers of the texture, so we need the depth of the
renderbuffer to check for consistency which is required
for framebuffer completeness.

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 src/mesa/main/mtypes.h       |    1 +
 src/mesa/main/renderbuffer.c |    1 +
 2 files changed, 2 insertions(+)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 1976e1c..3cc4409 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2565,6 +2565,7 @@ struct gl_renderbuffer
    GLuint Name;
    GLint RefCount;
    GLuint Width, Height;
+   GLuint Depth;
    GLboolean Purgeable;  /**< Is the buffer purgeable under memory pressure? */
    GLboolean AttachedAnytime; /**< TRUE if it was attached to a framebuffer */
    GLubyte NumSamples;
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index b426162..d458609 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -52,6 +52,7 @@ _mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name)
 
    rb->Width = 0;
    rb->Height = 0;
+   rb->Depth = 0;
    rb->InternalFormat = GL_RGBA;
    rb->Format = MESA_FORMAT_NONE;
 }
-- 
1.7.10.4



More information about the mesa-dev mailing list