Bug 220720 - REGRESSION(r271444) [WPE] fast/canvas/webgl/oes-vertex-array-object.html is failing
Summary: REGRESSION(r271444) [WPE] fast/canvas/webgl/oes-vertex-array-object.html is f...
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: 2021-01-18 20:01 PST by Lauro Moura
Modified: 2021-07-23 00:32 PDT (History)
9 users (show)

See Also:


Attachments
Patch (1.86 KB, patch)
2021-07-17 04:24 PDT, Eleni Maria Stea
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lauro Moura 2021-01-18 20:01:15 PST
fast/canvas/webgl/oes-vertex-array-object.html

Diff:

--- /home/buildbot/worker/wpe-linux-64-release-tests/build/layout-test-results/fast/canvas/webgl/oes-vertex-array-object-expected.txt
+++ /home/buildbot/worker/wpe-linux-64-release-tests/build/layout-test-results/fast/canvas/webgl/oes-vertex-array-object-actual.txt
@@ -36,6 +36,9 @@
 PASS Draw 1 passed pixel test
 PASS Draw 2 passed pixel test
 Testing using deleted buffers referenced by VAOs
+FAIL buffer removed too early
+FAIL buffer removed too early
+FAIL buffer removed too early
 PASS should be 255,0,0,255
 PASS should be 0,255,0,255
 PASS should be 0,0,255,255
@@ -46,6 +49,7 @@
 PASS getError was expected value: NO_ERROR : there should be no errors
 
 PASS successfullyParsed is true
+Some tests failed.
 
 TEST COMPLETE

These "buffer removed too early" also started appearing in GTK results (It already failed there with other assertion errors).
Comment 1 Kenneth Russell 2021-01-19 12:41:19 PST
Sorry about this regression which was apparently introduced with the fix for Bug 220372. Can the WPE port switch over to the USE_ANGLE code path? ANGLE runs on Linux, so hopefully this should be a straightforward switch.
Comment 2 Diego Pino 2021-06-09 00:48:53 PDT
We're working on enabling ANGLE on GLIB ports.

In the meantime, I'd use this bug the file same regressions for WebKitGTK. Output is slightly different:

--- /home/buildbot/worker/gtk-linux-64-release-tests/build/layout-test-results/fast/canvas/webgl/oes-vertex-array-object-expected.txt
+++ /home/buildbot/worker/gtk-linux-64-release-tests/build/layout-test-results/fast/canvas/webgl/oes-vertex-array-object-actual.txt
@@ -1,3 +1,7 @@
+CONSOLE MESSAGE: *** Error loading shader '[object WebGLShader]':INVALID_OPERATION
+CONSOLE MESSAGE: Error in compiling shader
+CONSOLE MESSAGE: *** Error loading shader '[object WebGLShader]':INVALID_OPERATION
+CONSOLE MESSAGE: Error in compiling shader
 This test verifies the functionality of the OES_vertex_array_object extension, if it is available.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -32,20 +36,30 @@
 Testing that attribute values are not attached to bindings
 PASS Vertex attribute values are not attached to bindings
 Testing draws with various VAO bindings
-PASS Draw 0 passed pixel test
+FAIL Draw 0 failed pixel test
 PASS Draw 1 passed pixel test
 PASS Draw 2 passed pixel test
 Testing using deleted buffers referenced by VAOs
-PASS should be 255,0,0,255
-PASS should be 0,255,0,255
-PASS should be 0,0,255,255
-PASS should be 0,255,255,255
+FAIL buffer removed too early
+FAIL buffer removed too early
+FAIL buffer removed too early
+FAIL should be 255,0,0,255
+at (0, 0) expected: 255,0,0,255 was 255,255,255,255
+FAIL should be 0,255,0,255
+at (0, 0) expected: 0,255,0,255 was 255,255,255,255
+FAIL should be 0,0,255,255
+at (0, 0) expected: 0,0,255,255 was 255,255,255,255
+FAIL should be 0,255,255,255
+at (0, 0) expected: 0,255,255,255 was 255,255,255,255
 Testing that VAOs don't effect ARRAY_BUFFER binding.
-PASS should be red
-PASS should be green
-PASS getError was expected value: NO_ERROR : there should be no errors
+FAIL should be red
+at (0, 0) expected: 255,0,0,255 was 255,255,255,255
+FAIL should be green
+at (0, 0) expected: 0,255,0,255 was 255,255,255,255
+FAIL getError expected: NO_ERROR. Was INVALID_OPERATION : there should be no errors
 
 PASS successfullyParsed is true
+Some tests failed.
 
 TEST COMPLETE
Comment 3 Eleni Maria Stea 2021-07-17 04:24:07 PDT
Created attachment 433731 [details]
Patch
Comment 4 Eleni Maria Stea 2021-07-17 04:30:15 PDT
I think that this test should be removed as it is based in the incorrect assumption that deleted buffer names remain valid until the object they used to refer to is destroyed. 

According to the WebGL spec (this paragraph is present in 1.0.0 and on):
https://www.khronos.org/registry/webgl/specs/1.0.3/ 

section: 5.14.5 isBuffer "Return false if the buffer's invalidated flag is set", this is not true and names become invalid immediately.

So, the correct behavior is that after the user calls deleteBuffer the buffer is invalidated (== marked as deleted), although it is still valid, and isBuffer returns false. If you check the WebGL implementation of isBuffer, we return false when the object is marked as deleted (m_deleted is true) which is the correct behavior, and that's why the incorrect test fails.


This patch together with this fix (WIP the MacOSX problem in comments): https://bugs.webkit.org/show_bug.cgi?id=96828 fix make the vertex array OES tests pass.
Comment 5 Kenneth Russell 2021-07-22 19:15:08 PDT
Comment on attachment 433731 [details]
Patch

This test is quite out of date with respect to the top-of-tree version of the test. It's OK to remove just this portion, but ideally we'd start running the webgl/1.0.x and webgl/2.0.y versions of the layout tests and remove all of the now-obsolete ones. r+

FYI, the win EWS failures are unrelated to this patch.
Comment 6 EWS 2021-07-23 00:31:03 PDT
Committed r280218 (239905@main): <https://commits.webkit.org/239905@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 433731 [details].
Comment 7 Radar WebKit Bug Importer 2021-07-23 00:32:16 PDT
<rdar://problem/81006096>