diff options
author | Chris Forbes <[email protected]> | 2014-03-23 22:41:28 +1300 |
---|---|---|
committer | Chris Forbes <[email protected]> | 2014-03-25 06:49:25 +1300 |
commit | a419a1c5654ac4a4a46ec3a80d75926e26919c99 (patch) | |
tree | 87833587b3d6e3a6932877338487c25d0c55b501 | |
parent | 40d7b5195351d3e4199e7a840615a595a6dbaefc (diff) |
mesa: Generate FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT earlier
The ARB_framebuffer_object spec lists this case before the
FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER and
FRAMEBUFFER_INCOMPLETE_READ_BUFFER cases.
Fixes two broken cases in piglit's fbo-incomplete test, if
ARB_ES2_compatibility is not advertised. (If it is, this is masked
because the FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER /
FRAMEBUFFER_INCOMPLETE_READ_BUFFER cases are removed by that extension)
Signed-off-by: Chris Forbes <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
-rw-r--r-- | src/mesa/main/fbobject.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index dfe2f1e9300..c4083073b2f 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1080,6 +1080,12 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, fb->MaxNumLayers = max_layer_count; + if (numImages == 0) { + fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT; + fbo_incomplete(ctx, "no attachments", -1); + return; + } + if (_mesa_is_desktop_gl(ctx) && !ctx->Extensions.ARB_ES2_compatibility) { /* Check that all DrawBuffers are present */ for (j = 0; j < ctx->Const.MaxDrawBuffers; j++) { @@ -1108,12 +1114,6 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, } } - if (numImages == 0) { - fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT; - fbo_incomplete(ctx, "no attachments", -1); - return; - } - /* Provisionally set status = COMPLETE ... */ fb->_Status = GL_FRAMEBUFFER_COMPLETE_EXT; |