Bug 211887 - [GTK] Several WebGL tests are failing
Summary: [GTK] Several WebGL tests are failing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-14 03:12 PDT by Diego Pino
Modified: 2022-09-29 12:40 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Pino 2020-05-14 03:12:45 PDT
These test failures were removed from TestExpectations in r261609 but they're still failing:

Regressions: Unexpected crashes (1)
        webgl/1.0.3/conformance/more/functions/copyTexImage2DBadArgs.html [ Crash ]

Regressions: Unexpected text-only failures (5)
        fast/canvas/webgl/tex-sub-image-2d-bad-args.html [ Failure ]
        webgl/1.0.3/conformance/glsl/bugs/sampler-array-using-loop-index.html [ Failure ]
        webgl/1.0.3/conformance/more/functions/texSubImage2DHTMLBadArgs.html [ Failure ]
        webgl/1.0.3/conformance/textures/tex-sub-image-2d-bad-args.html [ Failure ]
        webgl/1.0.3/conformance/textures/texture-size-limit.html [ Failure ]

Diff: https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/r261677%20(13722)/fast/canvas/webgl/tex-sub-image-2d-bad-args-diff.txt

--- /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/fast/canvas/webgl/tex-sub-image-2d-bad-args-expected.txt
+++ /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/fast/canvas/webgl/tex-sub-image-2d-bad-args-actual.txt
@@ -12,17 +12,18 @@
 PASS getError was expected value: INVALID_VALUE : negative level
 PASS getError was expected value: INVALID_ENUM : bad target
 PASS getError was expected value: NO_ERROR : good args
-PASS getError was expected value: INVALID_OPERATION : format not same as original
+FAIL getError expected: INVALID_OPERATION. Was NO_ERROR : format not same as original
 PASS getError was expected value: INVALID_OPERATION : type not same as original
 PASS getError was expected value: NO_ERROR : make texture RGB
 PASS getError was expected value: NO_ERROR : format same as original RGB
-PASS getError was expected value: INVALID_OPERATION : format not same as original RGB
+FAIL getError expected: INVALID_OPERATION. Was NO_ERROR : format not same as original RGB
 PASS getError was expected value: INVALID_OPERATION : type not same as original RGB
 PASS getError was expected value: NO_ERROR : make texture RGBA 4_4_4_4
 PASS getError was expected value: NO_ERROR : format same as original RGBA 4_4_4_4
 PASS getError was expected value: INVALID_OPERATION : format not same as original RGBA 4_4_4_4
 PASS getError was expected value: INVALID_OPERATION : type not same as original RGBA 4_4_4_4
 PASS successfullyParsed is true
+Some tests failed.
 
 TEST COMPLETE
 

Diff: https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/r261677%20(13722)/webgl/1.0.3/conformance/glsl/bugs/sampler-array-using-loop-index-diff.txt

--- /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/webgl/1.0.3/conformance/glsl/bugs/sampler-array-using-loop-index-expected.txt
+++ /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/webgl/1.0.3/conformance/glsl/bugs/sampler-array-using-loop-index-actual.txt
@@ -1,5 +1,8 @@
 This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
 
 Test: ../../../resources/webgl_test_files/conformance/glsl/bugs/sampler-array-using-loop-index.html
-[ PASS ] All tests passed
+[ 1: FAIL ] getError expected: NO_ERROR. Was INVALID_VALUE : Should be no errors from setup.
+[ 2: FAIL ] at (0, 0) expected: 64,32,16,9 was 32,16,8,0
+[ 3: PASS ] successfullyParsed is true
+[ FAIL ] 2 failures reported
 

Diff: https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/r261677%20(13722)/webgl/1.0.3/conformance/more/functions/texSubImage2DHTMLBadArgs-diff.txt

--- /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/webgl/1.0.3/conformance/more/functions/texSubImage2DHTMLBadArgs-expected.txt
+++ /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/webgl/1.0.3/conformance/more/functions/texSubImage2DHTMLBadArgs-actual.txt
@@ -1,5 +1,6 @@
 This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
 
 Test: ../../../resources/webgl_test_files/conformance/more/functions/texSubImage2DHTMLBadArgs.html
-[ PASS ] All tests passed
+[ 1: FAIL ] testTexImage2D
+[ FAIL ] 1 failures reported
 

Diff: https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/r261677%20(13722)/webgl/1.0.3/conformance/textures/tex-sub-image-2d-bad-args-diff.txt

--- /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/webgl/1.0.3/conformance/textures/tex-sub-image-2d-bad-args-expected.txt
+++ /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/webgl/1.0.3/conformance/textures/tex-sub-image-2d-bad-args-actual.txt
@@ -1,5 +1,24 @@
 This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
 
 Test: ../../resources/webgl_test_files/conformance/textures/tex-sub-image-2d-bad-args.html
-[ PASS ] All tests passed
+[ 1: PASS ] getError was expected value: NO_ERROR : Setup should succeed
+[ 2: PASS ] getError was expected value: INVALID_VALUE : y + height > texture height
+[ 3: PASS ] getError was expected value: INVALID_VALUE : x + width > texture width
+[ 4: PASS ] getError was expected value: INVALID_VALUE : negative x
+[ 5: PASS ] getError was expected value: INVALID_VALUE : negative y
+[ 6: PASS ] getError was expected value: INVALID_VALUE : negative level
+[ 7: PASS ] getError was expected value: INVALID_ENUM : bad target
+[ 8: PASS ] getError was expected value: NO_ERROR : good args
+[ 9: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR : format not same as original
+[ 10: PASS ] getError was expected value: INVALID_OPERATION : type not same as original
+[ 11: PASS ] getError was expected value: NO_ERROR : make texture RGB
+[ 12: PASS ] getError was expected value: NO_ERROR : format same as original RGB
+[ 13: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR : format not same as original RGB
+[ 14: PASS ] getError was expected value: INVALID_OPERATION : type not same as original RGB
+[ 15: PASS ] getError was expected value: NO_ERROR : make texture RGBA 4_4_4_4
+[ 16: PASS ] getError was expected value: NO_ERROR : format same as original RGBA 4_4_4_4
+[ 17: PASS ] getError was expected value: INVALID_OPERATION : format not same as original RGBA 4_4_4_4
+[ 18: PASS ] getError was expected value: INVALID_OPERATION : type not same as original RGBA 4_4_4_4
+[ 19: PASS ] successfullyParsed is true
+[ FAIL ] 2 failures reported
 

Diff: https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/r261677%20(13722)/webgl/1.0.3/conformance/textures/texture-size-limit-diff.txt


Crash-log: https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/r261677%20(13722)/webgl/1.0.3/conformance/more/functions/copyTexImage2DBadArgs-crash-log.txt


Thread 1 (Thread 0x7f152801b2c0 (LWP 107411)):
#0  0x00007f152e68078e in WTFCrash () at /app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#1  0x00007f15323cb3a5 in  () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#2  0x00007f15323bf1bc in WebCore::WebGLRenderingContextBase::copyTexImage2D(unsigned int, int, unsigned int, int, int, int, int, int) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#3  0x00007f15319fc8e1 in WebCore::jsWebGLRenderingContextPrototypeFunctionCopyTexImage2DBody(JSC::JSGlobalObject*, JSC::CallFrame*, WebCore::JSWebGLRenderingContext*, JSC::ThrowScope&) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#4  0x00007f15319ff9fb in WebCore::jsWebGLRenderingContextPrototypeFunctionCopyTexImage2D(JSC::JSGlobalObject*, JSC::CallFrame*) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#5  0x00007f14e72ff178 in  ()
#6  0x00007fffe6bcfd40 in  ()
#7  0x00007f152d6c57f1 in llint_op_call_varargs () at /app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#8  0x0000000000000000 in  ()

STDERR:
STDERR: warning: core file may not match specified executable file.
STDERR: 1   0x7f152e680789 WTFCrash
STDERR: 2   0x7f15323cb3a5 /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37(+0x36f33a5) [0x7f15323cb3a5]
STDERR: 3   0x7f15323bf1bc WebCore::WebGLRenderingContextBase::copyTexImage2D(unsigned int, int, unsigned int, int, int, int, int, int)
STDERR: 4   0x7f15319fc8e1 /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37(+0x2d248e1) [0x7f15319fc8e1]
STDERR: 5   0x7f15319ff9fb WebCore::jsWebGLRenderingContextPrototypeFunctionCopyTexImage2D(JSC::JSGlobalObject*, JSC::CallFrame*)
STDERR: 6   0x7f14e72ff178 [0x7f14e72ff178]
Comment 1 Kenneth Russell 2020-05-14 12:08:34 PDT
Could the GTK port be switched over to use the ANGLE backend? I think ANGLE should be supported on all of GTK's supported platforms - please tell me if that assumption is incorrect
Comment 2 Lauro Moura 2020-07-16 15:19:52 PDT
fast/canvas/webgl/tex-sub-image-2d-bad-args.html is also crashing on Debug for both GTK and WPE, likely since r261609 fixed most issues after texImage2D and texSubImage2D refactor from r261023.

Texture creation:

var gl = wtu.create3DContext(canvas);                                                                                                                            
var tex = gl.createTexture();                                                                                                                                 
gl.bindTexture(gl.TEXTURE_2D, tex);                                     
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c);

Offending call:

gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGB, gl.UNSIGNED_BYTE, c);       

Start of crash log (before the huge visitor line)

ASSERTION FAILED: tex->getInternalFormat(target, level) == internalFormat
#0  0x00007fffdde7e340 in WTFCrash() () at ../../Source/WTF/wtf/Assertions.cpp:295                                                                                                                                                            #1  0x00007fffec1f0292 in CRASH_WITH_INFO(...) () at DerivedSources/ForwardingHeaders/wtf/Assertions.h:713                                                                                                                                    #2  0x00007fffef5bad2a in WebCore::WebGLRenderingContextBase::texSubImage2DBase(unsigned int, int, int, int, int, int, unsigned int, unsigned int, unsigned int, int, void const*)                                                                (this=0x7fffd00d76f0, target=3553, level=0, xoffset=0, yoffset=0, width=16, height=16, internalFormat=6407, format=6407, type=5121, byteLength=768, pixels=0x7fff300ec000)                                                                    at ../../Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:4882                                                                                                                                                                    #3  0x00007fffef5ba64e in WebCore::WebGLRenderingContextBase::texImageImpl(WebCore::WebGLRenderingContextBase::TexImageFunctionID, unsigned int, int, unsigned int, int, int, int, unsigned int, unsigned int, WebCore::Image*, WebCore::GraphicsContextGL::DOMSource, bool, bool, WebCore::IntRect const&, int, int)                                                                                                                                                                           (this=0x7fffd00d76f0, functionID=WebCore::WebGLRenderingContextBase::TexImageFunctionID::TexSubImage2D, target=3553, level=0, internalformat=6408, xoffset=0, yoffset=0, zoffset=0, format=6407, type=5121, image=0x7fff300e3e10, domSource=WebCore::GraphicsContextGL::DOMSource::Canvas, flipY=false, premultiplyAlpha=false, sourceImageRect=..., depth=1, unpackImageHeight=0) at ../../Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:4809                               #4  0x00007fffef5b8b09 in WebCore::WebGLRenderingContextBase::<lambda(const WTF::RefPtr<WebCore::HTMLCanvasElement, WTF::DumbPtrTraits<WebCore::HTMLCanvasElement> >&)>::operator()(const WTF::RefPtr<WebCore::HTMLCanvasElement, WTF::DumbPtrTraits<WebCore::HTMLCanvasElement> > &) const (__closure=0x7fffffffae30, canvas=...) at ../../Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:4630
Comment 3 Kenneth Russell 2020-07-16 15:30:14 PDT
I'm sorry about the regression. It's difficult to continue to maintain the non-ANGLE backend.

Could GTK / WPE consider switching to use the ANGLE backend instead?
Comment 4 Alejandro G. Castro 2022-09-29 12:39:27 PDT
After replacing the WebGL backend with ANGLE this tests now pass. The gardening commit is:

https://commits.webkit.org/255008@main
Comment 5 Radar WebKit Bug Importer 2022-09-29 12:40:20 PDT
<rdar://problem/100577656>