g33 ES2-CTS.gtf.GL2ExtensionTests.texture_float.texture_float g45, g965 ES2-CTS.functional.fbo.completeness.renderable.texture.color0.r16f ES2-CTS.functional.fbo.completeness.renderable.texture.color0.rg16f ES2-CTS.gtf.GL2ExtensionTests.texture_float.texture_float bisected to: c16a7443e9999a80bc1e87134297f96f1216d702 Author: Eric Anholt <eric@anholt.net> mesa: Expose GL_OES_required_internalformat on GLES contexts. The same patch fixed several tests on the same platform. It's possible that this bug should be marked WONTFIX Sample output: --------------------------------------------------------------- ES2-CTS.gtf.GL2ExtensionTests.texture_float.texture_float GTFExtensionTestTextureFloat::Apply/error: glTexSubImage2D: GL_INVALID_OPERATION error when passing GL_FLOAT as type. GTFExtensionTestTextureFloat::Apply/error: Output image does not match reference image. Writing diff. GTFRunTest: FAIL 0 passes, 1 failures, test case FAILED! --------------------------------------------------------------- ES2-CTS.functional.fbo.completeness.renderable.texture.color0.rg16f Type: GL_TEXTURE_2D Internal format: GL_RG16F Width: 64 Height: 64 Levels: 1 Target: GL_FRAMEBUFFER Type: GL_TEXTURE Image Name: 98 Mipmap Level: 0 Texture Target: GL_TEXTURE_2D * Unsupported texture format * requires any of the extensions or combinations: - GLES3 compatible context * Unsupported renderbuffer format * requires any of the extensions or combinations: - GLES3 compatible context and GL_EXT_color_buffer_float - GL_EXT_color_buffer_half_float and GL_OES_texture_half_float * Format is NOT color-renderable * extensions that would make format color-renderable: - GLES3 compatible context and GL_EXT_color_buffer_float - GL_EXT_color_buffer_half_float and GL_OES_texture_half_float * Format is NOT depth-renderable * no extension can make this format depth-renderable * Format is NOT stencil-renderable * no extension can make this format stencil-renderable Rules: * Format GL_RG16F does not exist Rules: * Format GL_RG16F does not exist Rules: * Format GL_RG16F does not exist Rules: * Attachment format is not legal Rules: * Particular format combinations need not to be supported Expected one of GL_INVALID_ENUM (during FBO initialization), GL_INVALID_OPERATION (during FBO initialization), GL_INVALID_VALUE (during FBO initialization), GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT or GL_FRAMEBUFFER_UNSUPPORTED. Received GL_FRAMEBUFFER_COMPLETE.
Pushed a patch to jenkins that fixes the error on VK-GL-CTS MESA_GLES_VERSION_OVERRIDE=2.0 ./deqp-gles2 -n dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rg16f Let's see how it goes.
I verified this patch to fix: g33 ES2-CTS.gtf.GL2ExtensionTests.texture_float.texture_float g45, g965, ilk ES2-CTS.functional.fbo.completeness.renderable.texture.color0.r16f ES2-CTS.functional.fbo.completeness.renderable.texture.color0.rg16f
This bug is partially fixed by 376a0a9b08543f3978efd6f51cec3d4cf628e939 Author: Eric Anholt <eric@anholt.net> mesa: Disallow GL_RED/GL_RG with half-floats on GLES2. Remaining regressions on g45, g965, ilk: ES2-CTS.gtf.GL2ExtensionTests.texture_float.texture_float Standard Output GTFExtensionTestTextureFloat::Apply/error: glTexSubImage2D: GL_INVALID_OPERATION error when passing GL_FLOAT as type. GTFExtensionTestTextureFloat::Apply/error: Output image does not match reference image. Writing diff. GTFRunTest: FAIL 0 passes, 1 failures, test case FAILED!
If I understand correctly, the only remaining failure is on G965/G45 and is ES2-CTS.gtf.GL2ExtensionTests.texture_float.texture_float
The test also fails on ILK.
Created attachment 135513 [details] [review] Hack that makes the test pass So, ES2-CTS.gtf.GL2ExtensionTests.texture_float.texture_float is failing because of an INVALID_OPERATION error that Eric's commit c16a7443e9999a80bc1e87134297f96f1216d702 begins raising in ES 2.0 contexts (but not ES 3.0+). The bug only shows up on Gen4-5 because those only do 2.0, not 3.0. Mesa: User error: GL_INVALID_OPERATION in glTexSubImage2D(format = GL_RGB, type = GL_FLOAT, internalformat = GL_RGB32F) #+ glTexSubImage2D: GL_INVALID_OPERATION error when passing GL_FLOAT as type. Here's a hack that comments out the INVALID_OPERATION, and makes the test pass. I have no idea if it actually should be legal or not...
When the first texture upload happens via glTexImage2D we 'adjust' the internal format since GLES <= 2.0 does not have sized formats specified. This could be what is causing the issues here since we might set GL_RGB16F and GL_RGB32F as internalformat there. So taking that in to account ... it looks like glTexSubImage2D error checking is a bit broken. It uses texture_format_error_check_gles() which has been originally written for glTexImage() family of functions so the internalFormat checks there don't make sense 'as is' for floating point textures. I will attempt to write a fix based on these assumptions.
Created attachment 135602 [details] [review] hopeful fix This should fix the issue, will run tests.
Mark, should I see 'expected failure but passed' in CI or do we still run these tests?
because these regressions are on very slow targets, they only run with the "daily" CI builds.
I have verified in the CI that Tapani's commit fixes the tests. You can put my Tested-By on the commit.
pending code review
commit 1e508e10d9ae649bfe5ab7b1842993be50052b21 Author: Tapani Pälli <tapani.palli@intel.com> Date: Mon Nov 20 15:00:19 2017 +0200 mesa/gles: adjust internal format in glTexSubImage2D error checks When floating point textures are created on OpenGL ES 2.0, driver is free to choose used internal format. Mesa makes this decision in adjust_for_oes_float_texture. Error checking for glTexImage2D properly checks that sized formats are not used. We use same error checking path for glTexSubImage2D (since there is lot of overlap), however since those checks include internalFormat checks, we need to pass original internalFormat passed by the client. Patch adds oes_float_internal_format that does reverse adjust_for_oes_float_texture to get that format. Fixes following test failure: ES2-CTS.gtf.GL2ExtensionTests.texture_float.texture_float (when running test with MESA_GLES_VERSION_OVERRIDE=2.0) Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103227 Cc: "17.3" <mesa-stable@lists.freedesktop.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.