[Mesa-dev] [PATCH 1/4] mesa: Trigger FBO validation on DrawBuffers change in non-ES2 mode.
Brian Paul
brianp at vmware.com
Wed May 25 14:55:23 PDT 2011
On 05/25/2011 03:24 PM, Eric Anholt wrote:
> glDrawBuffers pointing at an unattached buffer is supposed to be
> incomplete without ARB_ES2_compatibility. The testcase to catch the
> bug of not implementing that bit of the spec was tricked by this
> missing piece of state update.
> ---
> src/mesa/main/buffers.c | 36 ++++++++++++++++++++++++++----------
> 1 files changed, 26 insertions(+), 10 deletions(-)
>
> diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
> index 96ee1ac..895cde0 100644
> --- a/src/mesa/main/buffers.c
> +++ b/src/mesa/main/buffers.c
> @@ -340,6 +340,26 @@ _mesa_DrawBuffersARB(GLsizei n, const GLenum *buffers)
> ctx->Driver.DrawBuffer(ctx, n> 0 ? buffers[0] : GL_NONE);
> }
>
> +/**
> + * Performs necessary state updates when _mesa_drawbuffers makes an
> + * actual change.
> + */
> +static void
> +_mesa_updated_drawbuffers(struct gl_context *ctx)
Following existing conventions, static functions like this don't need
the _mesa_ prefix.
> +{
> + FLUSH_VERTICES(ctx, _NEW_BUFFERS);
> +
> +#if FEATURE_GL
> + if (ctx->API == API_OPENGL) {
> + struct gl_framebuffer *fb = ctx->DrawBuffer;
> +
> + /* Flag the FBO as requring validation. */
Typo in "requring".
Otherwise, for the series:
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list