Mesa (master): mesa: add renderbuffer Depth field

Jordan Justen jljusten at kemper.freedesktop.org
Wed May 1 23:30:27 UTC 2013


Module: Mesa
Branch: master
Commit: a05e201d4a142d0f5730cf63621f1999bff45e72
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a05e201d4a142d0f5730cf63621f1999bff45e72

Author: Jordan Justen <jordan.l.justen at intel.com>
Date:   Thu Apr 18 10:05:51 2013 -0700

mesa: add renderbuffer Depth field

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>
Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/mesa/main/mtypes.h       |    1 +
 src/mesa/main/renderbuffer.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 139c6af..130c7b7 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -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;
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index e657d21..c82b5cd 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -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;
 }




More information about the mesa-commit mailing list