[Mesa-dev] [PATCH 01/10] mesa: Considers GL_DEPTH_STENCIL_ATTACHMENT a valid argument for FBO invalidation under GLES3

Ian Romanick idr at freedesktop.org
Tue Dec 2 12:41:03 PST 2014


On 12/01/2014 05:04 AM, Eduardo Lima Mitev wrote:
> In OpenGL and OpenGL-Es 3+, GL_DEPTH_STENCIL_ATTACHMENT is a valid attachment point for the family of functions
> that invalidate a framebuffer object (e.g, glInvalidateFramebuffer, glInvalidateSubFramebuffer, etc).
> Currently, a GL_INVALID_ENUM error is emitted for this attachment point.
> 
> Fixes 21 dEQP test failures under 'dEQP-GLES3.functional.fbo.invalidate.*'.
> ---
>  src/mesa/main/fbobject.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
> index 8283373..19c4020 100644
> --- a/src/mesa/main/fbobject.c
> +++ b/src/mesa/main/fbobject.c
> @@ -3073,6 +3073,10 @@ invalidate_framebuffer_storage(GLenum target, GLsizei numAttachments,
>           case GL_DEPTH_ATTACHMENT:
>           case GL_STENCIL_ATTACHMENT:
>              break;
> +         case GL_DEPTH_STENCIL_ATTACHMENT:
> +            if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx))

I would add a note here that GL_OES_packed_depth_stencil does not add
GL_DEPTH_STENCIL_ATTACHMENT.  I was sure that it did... until I went and
checked the spec.

With that and Jason's suggestion, this patch is

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

> +               break;
> +            /* otherwise fall through */
>           case GL_COLOR_ATTACHMENT0:
>           case GL_COLOR_ATTACHMENT1:
>           case GL_COLOR_ATTACHMENT2:
> 



More information about the mesa-dev mailing list