From: Jordan Justen Date: Thu, 18 Apr 2013 17:05:51 +0000 (-0700) Subject: mesa: add renderbuffer Depth field X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a05e201d4a142d0f5730cf63621f1999bff45e72;p=mesa.git 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 Reviewed-by: Brian Paul --- diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 139c6afb706..130c7b7c03a 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 e657d217235..c82b5cd8591 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; }