From a04a797b89b328c254d7810c8748f4ca7684d5b6 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Fri, 12 Mar 2021 14:25:09 -0500 Subject: [PATCH] mesa: only report INCOMPLETE_FORMATS for GLES1 / desktop The enum is defined in EXT_framebuffer_object (available on desktop), and was copied to OES_framebuffer_object (available in GLES1). The ES2 spec has no mention of such an enum. If the underlying implementation does not support this, it will set a generic incomplete error (as is done in st_cb_fbo.c if mixed_formats == false). This should fix the following dEQP tests on ES2 drivers: dEQP-GLES2.functional.fbo.completeness.attachment_combinations.rbo_tex_none_none dEQP-GLES2.functional.fbo.completeness.attachment_combinations.tex_rbo_none_none Fixes: fd017458bc84 (mesa: fix fbo attachment size check for RBs, make it trigger in ES2) Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4444 Signed-off-by: Ilia Mirkin Reviewed-by: Eric Anholt Part-of: --- src/mesa/main/fbobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 5f3fa50..212feb4 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1314,7 +1314,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, return; } /* check that all color buffers are the same format */ - if (intFormat != GL_NONE && f != intFormat) { + if (ctx->API != API_OPENGLES2 && intFormat != GL_NONE && f != intFormat) { fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT; fbo_incomplete(ctx, "format mismatch", -1); return; -- 2.7.4