Skip to content
Snippets Groups Projects
Commit 330d31f6 authored by Lionel Landwerlin's avatar Lionel Landwerlin Committed by Dylan Baker
Browse files

mesa: check framebuffer completeness only after state update


The change made in 88d66583 ("mesa: check draw buffer completeness
on glClearBufferfi/glClearBufferiv") correctly updated the state prior
to checking the framebuffer completeness on glClearBufferiv but not in
glClearBufferfi.

Signed-off-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: default avatarAnuj Phogat <anuj.phogat@gmail.com>
Fixes: 88d66583 ("mesa: check draw buffer completeness on glClearBufferfi/glClearBufferiv")
Closes: mesa/mesa#2072
(cherry picked from commit f93bb903)
parent 019dbc4b
No related branches found
No related tags found
No related merge requests found
......@@ -692,12 +692,6 @@ clear_bufferfi(struct gl_context *ctx, GLenum buffer, GLint drawbuffer,
drawbuffer);
return;
}
if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
_mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
"glClearBufferfi(incomplete framebuffer)");
return;
}
}
if (ctx->RasterDiscard)
......@@ -707,6 +701,12 @@ clear_bufferfi(struct gl_context *ctx, GLenum buffer, GLint drawbuffer,
_mesa_update_state( ctx );
}
if (!no_error && ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
_mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
"glClearBufferfi(incomplete framebuffer)");
return;
}
if (ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer)
mask |= BUFFER_BIT_DEPTH;
if (ctx->DrawBuffer->Attachment[BUFFER_STENCIL].Renderbuffer)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment