mesa: add renderbuffer Depth field
authorJordan Justen <jordan.l.justen@intel.com>
Thu, 18 Apr 2013 17:05:51 +0000 (10:05 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Wed, 1 May 2013 22:30:48 +0000 (15:30 -0700)
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@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/mtypes.h
src/mesa/main/renderbuffer.c

index 139c6afb7066d031fa9c8ded1db831d79872b00a..130c7b7c03acd228fe355d82fd4d02eb88685115 100644 (file)
@@ -2566,6 +2566,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;
index e657d217235eccea5fff08c9cbce4ed507fab1b6..c82b5cd859146a72356899d173657fdf314c97c8 100644 (file)
@@ -53,6 +53,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;
 }