mesa: fix fbo attachment size check for RBs, make it trigger in ES2
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 5 Mar 2021 23:33:57 +0000 (18:33 -0500)
committerMarge Bot <eric+marge@anholt.net>
Sat, 6 Mar 2021 20:29:41 +0000 (20:29 +0000)
Makes dEQP-GLES2.functional.fbo.completeness.size.distinct pass.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9441>

src/broadcom/ci/deqp-vc4-rpi3-fails.txt
src/gallium/drivers/lima/ci/deqp-lima-skips.txt
src/mesa/main/fbobject.c

index 49b3e0b..6f62deb 100644 (file)
@@ -3,7 +3,6 @@ dEQP-GLES2.functional.clipping.line.wide_line_clip_viewport_corner,Fail
 dEQP-GLES2.functional.depth_stencil_clear.depth_stencil_masked,Fail
 dEQP-GLES2.functional.draw.draw_arrays.line_loop.multiple_attributes,Fail
 dEQP-GLES2.functional.draw.draw_arrays.line_loop.single_attribute,Fail
-dEQP-GLES2.functional.fbo.completeness.size.distinct,Fail
 dEQP-GLES2.functional.fbo.render.texsubimage.after_render_tex2d_rgba,Fail
 dEQP-GLES2.functional.fbo.render.texsubimage.between_render_tex2d_rgba,Fail
 dEQP-GLES2.functional.negative_api.shader.uniform_matrixfv_invalid_transpose,Fail
index a13f0c1..9767f40 100644 (file)
@@ -11,7 +11,6 @@ dEQP-GLES[0-9]*.functional.flush_finish
 
 # Flaky
 dEQP-GLES2.functional.default_vertex_attrib.*
-dEQP-GLES2.functional.fbo.completeness.size.distinct
 dEQP-GLES2.functional.negative_api.shader.uniform_matrixfv_invalid_transpose
 dEQP-GLES2.functional.negative_api.texture.generatemipmap_zero_level_array_compressed
 dEQP-GLES2.functional.shaders.builtin_variable.frontfacing
index 52a3ac4..5f3fa50 100644 (file)
@@ -1226,9 +1226,9 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
       }
       else if (att->Type == GL_RENDERBUFFER_EXT) {
          minWidth = MIN2(minWidth, att->Renderbuffer->Width);
-         maxWidth = MAX2(minWidth, att->Renderbuffer->Width);
+         maxWidth = MAX2(maxWidth, att->Renderbuffer->Width);
          minHeight = MIN2(minHeight, att->Renderbuffer->Height);
-         maxHeight = MAX2(minHeight, att->Renderbuffer->Height);
+         maxHeight = MAX2(maxHeight, att->Renderbuffer->Height);
          f = att->Renderbuffer->InternalFormat;
          baseFormat = att->Renderbuffer->_BaseFormat;
          attFormat = att->Renderbuffer->Format;
@@ -1305,7 +1305,8 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
          }
       }
       else {
-         if (!ctx->Extensions.ARB_framebuffer_object) {
+         if (!_mesa_has_ARB_framebuffer_object(ctx) &&
+             !_mesa_is_gles3(ctx)) {
             /* check that width, height, format are same */
             if (minWidth != maxWidth || minHeight != maxHeight) {
                fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT;