[WinCairo][WebGL2] webgl/2.0.0/conformance2/textures tests are failing Since WinCairo enables WebGL2 (Bug 192314).
Created attachment 416680 [details] simplified tex-2d-rgba16f-rgba-float.html I created a repro by simplifying tex-2d-rgba16f-rgba-float.html. 1. Start WinCairo MiniBrowser 2. Open tex-2d-rgba16f-rgba-float.html 3. All tests pass 4. Reload 5. The third test fails (Infrequently, both the first and the third tests fail)
CC'ing a few others. Could you please copy/paste the log from the test? We don't have a setup for debugging this directly. Have you run this in the inspector? Which operation exactly does it look like is failing? Which test configuration exactly is failing? There are several subdirectories of conformance2/textures/ , each of which have tests named tex-2d-rgba16f-rgba-float.html.
Created attachment 416684 [details] [Screenshot] WinCairo port The test expected black for the uninitialized texture area but green in the second load.
(In reply to Kenneth Russell from comment #2) > CC'ing a few others. Thank you. This bug causes a lot of test failures, but I don't think this bug is so critical. This bug seems that uninitialized texture areas aren't black transparent. I'm going to enable WebGL2 for WinCairo without fixing this bug and skipping the tests. > Could you please copy/paste the log from the test? Will do. > We don't have a setup for debugging this directly. I'm going to enable WebGL2 for WinCairo, you will be able to download WinCairo binaries. You can try it if you have a Windows PC. https://trac.webkit.org/wiki/BuildingCairoOnWindows#DownloadbuildartifactsfromBuildbot > Have you run this in the inspector? Which operation exactly does it look > like is failing? texSubImage2D[SubSource] and texSubImage3D[SubSource] tests are failing. texSubImage2D and texSubImage3D don't work as expected in the SubSource case.
It's actually critical that uninitialized resources like textures be zeroed out by ANGLE. Did you enable the EGL_ROBUST_RESOURCE_INITIALIZATION_ANGLE flag in your EGL context creation? See this code and nearby code in Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm : // WebGL requires that all resources are cleared at creation. eglContextAttributes.append(EGL_ROBUST_RESOURCE_INITIALIZATION_ANGLE); eglContextAttributes.append(EGL_TRUE); Ideally the WinCairo port should pick up all of these EGL initialization parameters.
Bingo! It solves. I'm going to land the fix together with Bug 192314. Ideally, GraphicsContextGLOpenGLCocoa.mm should be in C++, and shared among all port. Anyway, thank you very much. *** This bug has been marked as a duplicate of bug 192314 ***