Title: [255316] trunk
Revision
255316
Author
justin_...@apple.com
Date
2020-01-28 14:50:57 -0800 (Tue, 28 Jan 2020)

Log Message

[WebGL2] Implement sub-source texImage2D and texSubImage2D
https://bugs.webkit.org/show_bug.cgi?id=206782
<rdar://problem/58886527>

Reviewed by Dean Jackson.

Source/WebCore:

Implement sub-source override versions of texImage2D and texSubImage2D.
Some refactoring of bufferData and bufferSubData to share code with new implementation.

Conformance test results updated for:
webgl/2.0.0/conformance2/buffers/buffer-data-and-buffer-sub-data-sub-source.html
webgl/2.0.0/conformance2/misc/views-with-offsets.html
webgl/2.0.0/conformance2/textures/misc/tex-image-and-sub-image-with-array-buffer-view-sub-source.html

* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::arrayBufferViewSliceFactory): Creates sub-resource of appropriate type for ArrayBufferView resources.
(WebCore::WebGL2RenderingContext::sliceArrayBufferView): Consolidates duplicate logic of buffer/SubData.
(WebCore::WebGL2RenderingContext::bufferData):
(WebCore::WebGL2RenderingContext::bufferSubData):
(WebCore::WebGL2RenderingContext::getBufferSubData): DataView buffers are allowed, and remove unnecessary elementSize helper function.
(WebCore::WebGL2RenderingContext::texImage2D): Implement sub-source version and improve log messaging for unimplemented overrides.
(WebCore::WebGL2RenderingContext::sliceTypedArrayBufferView): Creates sub-resource of appropriate type for TypedArray buffer resources.
(WebCore::WebGL2RenderingContext::texImage3D): Improve log messaging.
(WebCore::WebGL2RenderingContext::texSubImage2D): Implement sub-source version and improve log messaging for unimplemented overrides.
(WebCore::WebGL2RenderingContext::texSubImage3D): Improve log messaging.
(WebCore::WebGL2RenderingContext::compressedTexImage3D):
(WebCore::WebGL2RenderingContext::compressedTexSubImage3D):
(WebCore::WebGL2RenderingContext::compressedTexImage2D):
(WebCore::WebGL2RenderingContext::compressedTexSubImage2D):
(WebCore::WebGL2RenderingContext::readPixels):
(WebCore::arrayBufferViewElementSize): Deleted. Unnecessary given utilities in TypedArrayType.h.
* html/canvas/WebGL2RenderingContext.h:
* platform/graphics/GraphicsContextGL.h: Remove some extra overrides that aren't actually present in OpenGL ES 3.
* platform/graphics/angle/GraphicsContextGLANGLE.cpp:
* platform/graphics/opengl/GraphicsContextGLOpenGL.h:
* platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
(WebCore::GraphicsContextGLOpenGL::texImage2D): Deleted.

LayoutTests:

Update expected results for ANGLE backend for texImage2D and texSubImage2D.

* webgl/2.0.0/conformance2/buffers/buffer-data-and-buffer-sub-data-sub-source-expected.txt:
        Test was not fully running due to typo.
        After fixing, 0 regression from running the fixed test on tip of tree with ANGLE enabled.
* webgl/2.0.0/conformance2/misc/views-with-offsets-expected.txt:
        The 3 additional failures are not regressions, and total number of sub-tests run increased from 65 to 155.
* webgl/2.0.0/conformance2/textures/misc/tex-image-and-sub-image-with-array-buffer-view-sub-source-expected.txt:
        Passes all texImage2D and texSubImage2D tests. The "3D" methods are not yet implemented.
* webgl/2.0.0/resources/webgl_test_files/conformance2/buffers/buffer-data-and-buffer-sub-data-sub-source.html:
        Fix typo to actually run the test.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (255315 => 255316)


--- trunk/LayoutTests/ChangeLog	2020-01-28 22:48:05 UTC (rev 255315)
+++ trunk/LayoutTests/ChangeLog	2020-01-28 22:50:57 UTC (rev 255316)
@@ -1,3 +1,23 @@
+2020-01-28  Justin Fan  <justin_...@apple.com>
+
+        [WebGL2] Implement sub-source texImage2D and texSubImage2D
+        https://bugs.webkit.org/show_bug.cgi?id=206782
+        <rdar://problem/58886527>
+
+        Reviewed by Dean Jackson.
+
+        Update expected results for ANGLE backend for texImage2D and texSubImage2D.
+
+        * webgl/2.0.0/conformance2/buffers/buffer-data-and-buffer-sub-data-sub-source-expected.txt: 
+                Test was not fully running due to typo.
+                After fixing, 0 regression from running the fixed test on tip of tree with ANGLE enabled.
+        * webgl/2.0.0/conformance2/misc/views-with-offsets-expected.txt: 
+                The 3 additional failures are not regressions, and total number of sub-tests run increased from 65 to 155.
+        * webgl/2.0.0/conformance2/textures/misc/tex-image-and-sub-image-with-array-buffer-view-sub-source-expected.txt:
+                Passes all texImage2D and texSubImage2D tests. The "3D" methods are not yet implemented.
+        * webgl/2.0.0/resources/webgl_test_files/conformance2/buffers/buffer-data-and-buffer-sub-data-sub-source.html: 
+                Fix typo to actually run the test.
+
 2020-01-28  Jacob Uphoff  <jacob_uph...@apple.com>
 
         [ iOS ] http/tests/workers/service/service-worker-user-timing.https.html is flaky timing out

Modified: trunk/LayoutTests/webgl/2.0.0/conformance2/buffers/buffer-data-and-buffer-sub-data-sub-source-expected.txt (255315 => 255316)


--- trunk/LayoutTests/webgl/2.0.0/conformance2/buffers/buffer-data-and-buffer-sub-data-sub-source-expected.txt	2020-01-28 22:48:05 UTC (rev 255315)
+++ trunk/LayoutTests/webgl/2.0.0/conformance2/buffers/buffer-data-and-buffer-sub-data-sub-source-expected.txt	2020-01-28 22:50:57 UTC (rev 255316)
@@ -1,4 +1,3 @@
-CONSOLE MESSAGE: line 55: ReferenceError: Can't find variable: iit
 This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
 
 Test: ../../resources/webgl_test_files/conformance2/buffers/buffer-data-and-buffer-sub-data-sub-source.html
@@ -9,6 +8,192 @@
 [ 5: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
 [ 6: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
 [ 7: PASS ] getError was expected value: NO_ERROR : calling bufferData with valid sub source should succeed
-[ 8: FAIL ] successfullyParsed should be true (of type boolean). Was undefined (of type undefined).
-[ FAIL ] 1 failures reported
+[ 8: FAIL ] expected data at 0: 2, got 0
+[ 9: FAIL ] expected data at 1: 3, got 0
+[ 10: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : calling bufferData with valid sub source should succeed
+[ 11: PASS ] buffer data uploaded correctly
+[ 12: PASS ] getError was expected value: NO_ERROR : calling bufferData with valid sub source of size 0 should succeed
+[ 13: PASS ] getError was expected value: NO_ERROR : no GL error
+[ 14: PASS ] [object WebGLBuffer] is non-null.
+[ 15: PASS ] getError was expected value: NO_ERROR :
+[ 16: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 17: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 18: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 19: PASS ] getError was expected value: NO_ERROR : calling bufferData with valid sub source should succeed
+[ 20: FAIL ] expected data at 0: 2, got 0
+[ 21: FAIL ] expected data at 1: 3, got 0
+[ 22: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : calling bufferData with valid sub source should succeed
+[ 23: PASS ] buffer data uploaded correctly
+[ 24: PASS ] getError was expected value: NO_ERROR : calling bufferData with valid sub source of size 0 should succeed
+[ 25: PASS ] getError was expected value: NO_ERROR : no GL error
+[ 26: PASS ] [object WebGLBuffer] is non-null.
+[ 27: PASS ] getError was expected value: NO_ERROR :
+[ 28: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 29: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 30: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 31: PASS ] getError was expected value: NO_ERROR : calling bufferData with valid sub source should succeed
+[ 32: FAIL ] expected data at 0: 2, got 0
+[ 33: FAIL ] expected data at 1: 3, got 0
+[ 34: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : calling bufferData with valid sub source should succeed
+[ 35: PASS ] buffer data uploaded correctly
+[ 36: PASS ] getError was expected value: NO_ERROR : calling bufferData with valid sub source of size 0 should succeed
+[ 37: PASS ] getError was expected value: NO_ERROR : no GL error
+[ 38: PASS ] [object WebGLBuffer] is non-null.
+[ 39: PASS ] getError was expected value: NO_ERROR :
+[ 40: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 41: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 42: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 43: PASS ] getError was expected value: NO_ERROR : calling bufferData with valid sub source should succeed
+[ 44: FAIL ] expected data at 0: 2, got 0
+[ 45: FAIL ] expected data at 1: 3, got 0
+[ 46: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : calling bufferData with valid sub source should succeed
+[ 47: PASS ] buffer data uploaded correctly
+[ 48: PASS ] getError was expected value: NO_ERROR : calling bufferData with valid sub source of size 0 should succeed
+[ 49: PASS ] getError was expected value: NO_ERROR : no GL error
+[ 50: PASS ] [object WebGLBuffer] is non-null.
+[ 51: PASS ] getError was expected value: NO_ERROR :
+[ 52: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 53: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 54: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 55: PASS ] getError was expected value: NO_ERROR : calling bufferData with valid sub source should succeed
+[ 56: FAIL ] expected data at 0: 2, got 0
+[ 57: FAIL ] expected data at 1: 3, got 0
+[ 58: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : calling bufferData with valid sub source should succeed
+[ 59: PASS ] buffer data uploaded correctly
+[ 60: PASS ] getError was expected value: NO_ERROR : calling bufferData with valid sub source of size 0 should succeed
+[ 61: PASS ] getError was expected value: NO_ERROR : no GL error
+[ 62: PASS ] [object WebGLBuffer] is non-null.
+[ 63: PASS ] getError was expected value: NO_ERROR :
+[ 64: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 65: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 66: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 67: PASS ] getError was expected value: NO_ERROR : calling bufferData with valid sub source should succeed
+[ 68: FAIL ] expected data at 0: 2, got 0
+[ 69: FAIL ] expected data at 1: 3, got 0
+[ 70: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : calling bufferData with valid sub source should succeed
+[ 71: PASS ] buffer data uploaded correctly
+[ 72: PASS ] getError was expected value: NO_ERROR : calling bufferData with valid sub source of size 0 should succeed
+[ 73: PASS ] getError was expected value: NO_ERROR : no GL error
+[ 74: PASS ] [object WebGLBuffer] is non-null.
+[ 75: PASS ] getError was expected value: NO_ERROR :
+[ 76: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 77: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 78: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 79: PASS ] getError was expected value: NO_ERROR : calling bufferData with valid sub source should succeed
+[ 80: FAIL ] expected data at 0: 2, got 0
+[ 81: FAIL ] expected data at 1: 3, got 0
+[ 82: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : calling bufferData with valid sub source should succeed
+[ 83: PASS ] buffer data uploaded correctly
+[ 84: PASS ] getError was expected value: NO_ERROR : calling bufferData with valid sub source of size 0 should succeed
+[ 85: PASS ] getError was expected value: NO_ERROR : no GL error
+[ 86: PASS ] [object WebGLBuffer] is non-null.
+[ 87: PASS ] getError was expected value: NO_ERROR :
+[ 88: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 89: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 90: PASS ] getError was expected value: INVALID_VALUE : calling bufferData when srcOffset + length is larger than source size
+[ 91: PASS ] getError was expected value: NO_ERROR : calling bufferData with valid sub source should succeed
+[ 92: FAIL ] expected data at 0: 2, got 0
+[ 93: FAIL ] expected data at 1: 3, got 0
+[ 94: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : calling bufferData with valid sub source should succeed
+[ 95: PASS ] buffer data uploaded correctly
+[ 96: PASS ] getError was expected value: NO_ERROR : calling bufferData with valid sub source of size 0 should succeed
+[ 97: PASS ] getError was expected value: NO_ERROR : no GL error
+[ 98: PASS ] [object WebGLBuffer] is non-null.
+[ 99: PASS ] getError was expected value: NO_ERROR :
+[ 100: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 101: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 102: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 103: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source should succeed
+[ 104: FAIL ] expected data at 0: 2, got 0
+[ 105: FAIL ] expected data at 1: 3, got 0
+[ 106: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source should succeed
+[ 107: PASS ] buffer data uploaded correctly
+[ 108: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source of size 0 should succeed
+[ 109: PASS ] getError was expected value: NO_ERROR : no GL error
+[ 110: PASS ] [object WebGLBuffer] is non-null.
+[ 111: PASS ] getError was expected value: NO_ERROR :
+[ 112: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 113: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 114: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 115: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source should succeed
+[ 116: FAIL ] expected data at 0: 2, got 1
+[ 117: FAIL ] expected data at 1: 3, got 0
+[ 118: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source should succeed
+[ 119: PASS ] buffer data uploaded correctly
+[ 120: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source of size 0 should succeed
+[ 121: PASS ] getError was expected value: NO_ERROR : no GL error
+[ 122: PASS ] [object WebGLBuffer] is non-null.
+[ 123: PASS ] getError was expected value: NO_ERROR :
+[ 124: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 125: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 126: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 127: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source should succeed
+[ 128: FAIL ] expected data at 0: 2, got 0
+[ 129: FAIL ] expected data at 1: 3, got 16368
+[ 130: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source should succeed
+[ 131: PASS ] buffer data uploaded correctly
+[ 132: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source of size 0 should succeed
+[ 133: PASS ] getError was expected value: NO_ERROR : no GL error
+[ 134: PASS ] [object WebGLBuffer] is non-null.
+[ 135: PASS ] getError was expected value: NO_ERROR :
+[ 136: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 137: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 138: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 139: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source should succeed
+[ 140: FAIL ] expected data at 0: 2, got 1
+[ 141: FAIL ] expected data at 1: 3, got 16368
+[ 142: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source should succeed
+[ 143: PASS ] buffer data uploaded correctly
+[ 144: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source of size 0 should succeed
+[ 145: PASS ] getError was expected value: NO_ERROR : no GL error
+[ 146: PASS ] [object WebGLBuffer] is non-null.
+[ 147: PASS ] getError was expected value: NO_ERROR :
+[ 148: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 149: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 150: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 151: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source should succeed
+[ 152: FAIL ] expected data at 0: 2, got 0
+[ 153: FAIL ] expected data at 1: 3, got 0
+[ 154: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source should succeed
+[ 155: PASS ] buffer data uploaded correctly
+[ 156: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source of size 0 should succeed
+[ 157: PASS ] getError was expected value: NO_ERROR : no GL error
+[ 158: PASS ] [object WebGLBuffer] is non-null.
+[ 159: PASS ] getError was expected value: NO_ERROR :
+[ 160: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 161: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 162: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 163: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source should succeed
+[ 164: FAIL ] expected data at 0: 2, got 1
+[ 165: FAIL ] expected data at 1: 3, got 0
+[ 166: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source should succeed
+[ 167: PASS ] buffer data uploaded correctly
+[ 168: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source of size 0 should succeed
+[ 169: PASS ] getError was expected value: NO_ERROR : no GL error
+[ 170: PASS ] [object WebGLBuffer] is non-null.
+[ 171: PASS ] getError was expected value: NO_ERROR :
+[ 172: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 173: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 174: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 175: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source should succeed
+[ 176: FAIL ] expected data at 0: 2, got 1.401298464324817e-45
+[ 177: FAIL ] expected data at 1: 3, got 0
+[ 178: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source should succeed
+[ 179: PASS ] buffer data uploaded correctly
+[ 180: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source of size 0 should succeed
+[ 181: PASS ] getError was expected value: NO_ERROR : no GL error
+[ 182: PASS ] [object WebGLBuffer] is non-null.
+[ 183: PASS ] getError was expected value: NO_ERROR :
+[ 184: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 185: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 186: PASS ] getError was expected value: INVALID_VALUE : calling bufferSubData when srcOffset + length is larger than source size
+[ 187: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source should succeed
+[ 188: FAIL ] expected data at 0: 2, got 0
+[ 189: FAIL ] expected data at 1: 3, got 0
+[ 190: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source should succeed
+[ 191: PASS ] buffer data uploaded correctly
+[ 192: PASS ] getError was expected value: NO_ERROR : calling bufferSubData with valid sub source of size 0 should succeed
+[ 193: PASS ] getError was expected value: NO_ERROR : no GL error
+[ 194: PASS ] successfullyParsed is true
+[ FAIL ] 40 failures reported
 

Modified: trunk/LayoutTests/webgl/2.0.0/conformance2/misc/views-with-offsets-expected.txt (255315 => 255316)


--- trunk/LayoutTests/webgl/2.0.0/conformance2/misc/views-with-offsets-expected.txt	2020-01-28 22:48:05 UTC (rev 255315)
+++ trunk/LayoutTests/webgl/2.0.0/conformance2/misc/views-with-offsets-expected.txt	2020-01-28 22:50:57 UTC (rev 255316)
@@ -1,70 +1,160 @@
 This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
 
 Test: ../../resources/webgl_test_files/conformance2/misc/views-with-offsets.html
-[ 1: FAIL ] Does not support texImage2D with offsets into views.
-[ 2: FAIL ] Does not support texSubImage2D with offsets into views.
-[ 3: PASS ] getError was expected value: NO_ERROR :
+[ 1: PASS ] getError was expected value: NO_ERROR :
+[ 2: PASS ] getError was expected value: NO_ERROR :
+[ 3: PASS ] Should be [0, 1, 1, 2], was [0, 1, 1, 2].
 [ 4: PASS ] getError was expected value: NO_ERROR :
-[ 5: FAIL ] Should be [0, 1, 1, 2], was [0, 0, 0, 0].
-[ 6: PASS ] getError was expected value: NO_ERROR :
+[ 5: PASS ] getError was expected value: NO_ERROR :
+[ 6: PASS ] Should be [1, 1, 2, 3], was [1, 1, 2, 3].
 [ 7: PASS ] getError was expected value: NO_ERROR :
-[ 8: FAIL ] Should be [1, 1, 2, 3], was [0, 0, 0, 0].
-[ 9: PASS ] getError was expected value: NO_ERROR :
+[ 8: PASS ] getError was expected value: NO_ERROR :
+[ 9: PASS ] Should be [1, 2, 3, 5], was [1, 2, 3, 5].
 [ 10: PASS ] getError was expected value: NO_ERROR :
-[ 11: FAIL ] Should be [1, 2, 3, 5], was [0, 0, 0, 0].
-[ 12: PASS ] getError was expected value: NO_ERROR :
+[ 11: PASS ] getError was expected value: NO_ERROR :
+[ 12: PASS ] Should be [2, 3, 5, 8], was [2, 3, 5, 8].
 [ 13: PASS ] getError was expected value: NO_ERROR :
-[ 14: FAIL ] Should be [2, 3, 5, 8], was [0, 0, 0, 0].
-[ 15: PASS ] getError was expected value: NO_ERROR :
+[ 14: PASS ] getError was expected value: NO_ERROR :
+[ 15: PASS ] Should be [3, 5, 8, 13], was [3, 5, 8, 13].
 [ 16: PASS ] getError was expected value: NO_ERROR :
-[ 17: FAIL ] Should be [3, 5, 8, 13], was [0, 0, 0, 0].
-[ 18: PASS ] getError was expected value: NO_ERROR :
+[ 17: PASS ] getError was expected value: NO_ERROR :
+[ 18: PASS ] Should be [5, 8, 13, 21], was [5, 8, 13, 21].
 [ 19: PASS ] getError was expected value: NO_ERROR :
-[ 20: FAIL ] Should be [5, 8, 13, 21], was [0, 0, 0, 0].
-[ 21: PASS ] getError was expected value: NO_ERROR :
+[ 20: PASS ] getError was expected value: NO_ERROR :
+[ 21: PASS ] Should be [8, 13, 21, 34], was [8, 13, 21, 34].
 [ 22: PASS ] getError was expected value: NO_ERROR :
-[ 23: FAIL ] Should be [8, 13, 21, 34], was [0, 0, 0, 0].
-[ 24: PASS ] getError was expected value: NO_ERROR :
+[ 23: PASS ] getError was expected value: NO_ERROR :
+[ 24: PASS ] Should be [13, 21, 34, 55], was [13, 21, 34, 55].
 [ 25: PASS ] getError was expected value: NO_ERROR :
-[ 26: FAIL ] Should be [13, 21, 34, 55], was [0, 0, 0, 0].
-[ 27: PASS ] getError was expected value: NO_ERROR :
+[ 26: PASS ] getError was expected value: NO_ERROR :
+[ 27: PASS ] Should be [21, 34, 55, 89], was [21, 34, 55, 89].
 [ 28: PASS ] getError was expected value: NO_ERROR :
-[ 29: FAIL ] Should be [21, 34, 55, 89], was [0, 0, 0, 0].
-[ 30: PASS ] getError was expected value: NO_ERROR :
+[ 29: PASS ] getError was expected value: NO_ERROR :
+[ 30: PASS ] Should be [34, 55, 89, 144], was [34, 55, 89, 144].
 [ 31: PASS ] getError was expected value: NO_ERROR :
-[ 32: FAIL ] Should be [34, 55, 89, 144], was [0, 0, 0, 0].
-[ 33: PASS ] getError was expected value: NO_ERROR :
-[ 34: PASS ] getError was expected value: NO_ERROR :
-[ 35: FAIL ] Should be [55, 89, 144, 233], was [0, 0, 0, 0].
-[ 36: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR :
-[ 37: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR :
-[ 38: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR :
-[ 39: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR :
-[ 40: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR :
-[ 41: PASS ] getError was expected value: NO_ERROR :
+[ 32: PASS ] getError was expected value: NO_ERROR :
+[ 33: PASS ] Should be [55, 89, 144, 233], was [55, 89, 144, 233].
+[ 34: PASS ] getError was expected value: INVALID_OPERATION :
+[ 35: PASS ] getError was expected value: INVALID_OPERATION :
+[ 36: PASS ] getError was expected value: INVALID_OPERATION :
+[ 37: PASS ] getError was expected value: INVALID_OPERATION :
+[ 38: PASS ] getError was expected value: INVALID_OPERATION :
+[ 39: PASS ] getError was expected value: NO_ERROR :
+[ 40: PASS ] getError was expected value: NO_ERROR :
+[ 41: PASS ] Should be 65504, was 65504.
 [ 42: PASS ] getError was expected value: NO_ERROR :
-[ 43: FAIL ] Should be 65504, was 0.
-[ 44: PASS ] getError was expected value: NO_ERROR :
-[ 45: PASS ] getError was expected value: NO_ERROR :
-[ 46: FAIL ] Should be 2047, was 0.
-[ 47: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR :
-[ 48: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR :
-[ 49: FAIL ] Does not support texSubImage3D with offsets into views.
-[ 50: FAIL ] Does not support compressedTexImage2D with offsets into views.
-[ 51: FAIL ] Does not support compressedTexSubImage2D with offsets into views.
-[ 52: PASS ] getError was expected value: NO_ERROR :
+[ 43: PASS ] getError was expected value: NO_ERROR :
+[ 44: PASS ] Should be 2047, was 2047.
+[ 45: PASS ] getError was expected value: INVALID_OPERATION :
+[ 46: PASS ] getError was expected value: INVALID_OPERATION :
+[ 47: FAIL ] getError expected: NO_ERROR. Was INVALID_VALUE :
+[ 48: PASS ] getError was expected value: NO_ERROR :
+[ 49: PASS ] Should be [0, 1, 1, 2], was [0, 1, 1, 2].
+[ 50: PASS ] getError was expected value: NO_ERROR :
+[ 51: PASS ] getError was expected value: NO_ERROR :
+[ 52: PASS ] Should be [1, 1, 2, 3], was [1, 1, 2, 3].
 [ 53: PASS ] getError was expected value: NO_ERROR :
-[ 54: FAIL ] getError expected: INVALID_VALUE. Was NO_ERROR :
-[ 55: FAIL ] getError expected: INVALID_VALUE. Was NO_ERROR :
-[ 56: FAIL ] getError expected: INVALID_VALUE. Was NO_ERROR :
-[ 57: FAIL ] getError expected: INVALID_VALUE. Was NO_ERROR :
-[ 58: FAIL ] getError expected: INVALID_VALUE. Was NO_ERROR :
-[ 59: FAIL ] getError expected: INVALID_VALUE. Was NO_ERROR :
-[ 60: FAIL ] getError expected: INVALID_VALUE. Was NO_ERROR :
-[ 61: FAIL ] getError expected: INVALID_VALUE. Was NO_ERROR :
-[ 62: FAIL ] getError expected: INVALID_VALUE. Was NO_ERROR :
-[ 63: FAIL ] Does not support compressedTexSubImage3D with offsets into views.
-[ 64: FAIL ] Does not support doReadPixels with offsets into views.
-[ 65: PASS ] successfullyParsed is true
-[ FAIL ] 36 failures reported
+[ 54: PASS ] getError was expected value: NO_ERROR :
+[ 55: PASS ] Should be [1, 2, 3, 5], was [1, 2, 3, 5].
+[ 56: PASS ] getError was expected value: NO_ERROR :
+[ 57: PASS ] getError was expected value: NO_ERROR :
+[ 58: PASS ] Should be [2, 3, 5, 8], was [2, 3, 5, 8].
+[ 59: PASS ] getError was expected value: NO_ERROR :
+[ 60: PASS ] getError was expected value: NO_ERROR :
+[ 61: PASS ] Should be [3, 5, 8, 13], was [3, 5, 8, 13].
+[ 62: PASS ] getError was expected value: NO_ERROR :
+[ 63: PASS ] getError was expected value: NO_ERROR :
+[ 64: PASS ] Should be [5, 8, 13, 21], was [5, 8, 13, 21].
+[ 65: PASS ] getError was expected value: NO_ERROR :
+[ 66: PASS ] getError was expected value: NO_ERROR :
+[ 67: PASS ] Should be [8, 13, 21, 34], was [8, 13, 21, 34].
+[ 68: PASS ] getError was expected value: NO_ERROR :
+[ 69: PASS ] getError was expected value: NO_ERROR :
+[ 70: PASS ] Should be [13, 21, 34, 55], was [13, 21, 34, 55].
+[ 71: PASS ] getError was expected value: NO_ERROR :
+[ 72: PASS ] getError was expected value: NO_ERROR :
+[ 73: PASS ] Should be [21, 34, 55, 89], was [21, 34, 55, 89].
+[ 74: PASS ] getError was expected value: NO_ERROR :
+[ 75: PASS ] getError was expected value: NO_ERROR :
+[ 76: PASS ] Should be [34, 55, 89, 144], was [34, 55, 89, 144].
+[ 77: PASS ] getError was expected value: NO_ERROR :
+[ 78: PASS ] getError was expected value: NO_ERROR :
+[ 79: PASS ] Should be [55, 89, 144, 233], was [55, 89, 144, 233].
+[ 80: PASS ] getError was expected value: INVALID_OPERATION :
+[ 81: PASS ] getError was expected value: INVALID_OPERATION :
+[ 82: PASS ] getError was expected value: INVALID_OPERATION :
+[ 83: PASS ] getError was expected value: INVALID_OPERATION :
+[ 84: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_VALUE :
+[ 85: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION :
+[ 86: PASS ] getError was expected value: NO_ERROR :
+[ 87: PASS ] Should be 65504, was 65504.
+[ 88: PASS ] getError was expected value: NO_ERROR :
+[ 89: PASS ] getError was expected value: NO_ERROR :
+[ 90: PASS ] Should be 2047, was 2047.
+[ 91: PASS ] getError was expected value: INVALID_OPERATION :
+[ 92: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_VALUE :
+[ 93: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM :
+[ 94: PASS ] getError was expected value: NO_ERROR :
+[ 95: FAIL ] Should be [0, 1, 1, 2], was [0, 0, 0, 255].
+[ 96: PASS ] getError was expected value: NO_ERROR :
+[ 97: PASS ] getError was expected value: NO_ERROR :
+[ 98: FAIL ] Should be [1, 1, 2, 3], was [0, 0, 0, 255].
+[ 99: PASS ] getError was expected value: NO_ERROR :
+[ 100: PASS ] getError was expected value: NO_ERROR :
+[ 101: FAIL ] Should be [1, 2, 3, 5], was [0, 0, 0, 255].
+[ 102: PASS ] getError was expected value: NO_ERROR :
+[ 103: PASS ] getError was expected value: NO_ERROR :
+[ 104: FAIL ] Should be [2, 3, 5, 8], was [0, 0, 0, 255].
+[ 105: PASS ] getError was expected value: NO_ERROR :
+[ 106: PASS ] getError was expected value: NO_ERROR :
+[ 107: FAIL ] Should be [3, 5, 8, 13], was [0, 0, 0, 255].
+[ 108: PASS ] getError was expected value: NO_ERROR :
+[ 109: PASS ] getError was expected value: NO_ERROR :
+[ 110: FAIL ] Should be [5, 8, 13, 21], was [0, 0, 0, 255].
+[ 111: PASS ] getError was expected value: NO_ERROR :
+[ 112: PASS ] getError was expected value: NO_ERROR :
+[ 113: FAIL ] Should be [8, 13, 21, 34], was [0, 0, 0, 255].
+[ 114: PASS ] getError was expected value: NO_ERROR :
+[ 115: PASS ] getError was expected value: NO_ERROR :
+[ 116: FAIL ] Should be [13, 21, 34, 55], was [0, 0, 0, 255].
+[ 117: PASS ] getError was expected value: NO_ERROR :
+[ 118: PASS ] getError was expected value: NO_ERROR :
+[ 119: FAIL ] Should be [21, 34, 55, 89], was [0, 0, 0, 255].
+[ 120: PASS ] getError was expected value: NO_ERROR :
+[ 121: PASS ] getError was expected value: NO_ERROR :
+[ 122: FAIL ] Should be [34, 55, 89, 144], was [0, 0, 0, 255].
+[ 123: PASS ] getError was expected value: NO_ERROR :
+[ 124: PASS ] getError was expected value: NO_ERROR :
+[ 125: FAIL ] Should be [55, 89, 144, 233], was [0, 0, 0, 255].
+[ 126: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR :
+[ 127: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR :
+[ 128: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR :
+[ 129: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR :
+[ 130: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR :
+[ 131: PASS ] getError was expected value: NO_ERROR :
+[ 132: PASS ] getError was expected value: NO_ERROR :
+[ 133: FAIL ] Should be 65504, was 0.
+[ 134: PASS ] getError was expected value: NO_ERROR :
+[ 135: PASS ] getError was expected value: NO_ERROR :
+[ 136: FAIL ] Should be 2047, was 0.
+[ 137: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR :
+[ 138: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR :
+[ 139: FAIL ] Does not support texSubImage3D with offsets into views.
+[ 140: FAIL ] Does not support compressedTexImage2D with offsets into views.
+[ 141: FAIL ] Does not support compressedTexSubImage2D with offsets into views.
+[ 142: PASS ] getError was expected value: NO_ERROR :
+[ 143: PASS ] getError was expected value: NO_ERROR :
+[ 144: FAIL ] getError expected: INVALID_VALUE. Was NO_ERROR :
+[ 145: FAIL ] getError expected: INVALID_VALUE. Was NO_ERROR :
+[ 146: FAIL ] getError expected: INVALID_VALUE. Was NO_ERROR :
+[ 147: FAIL ] getError expected: INVALID_VALUE. Was NO_ERROR :
+[ 148: FAIL ] getError expected: INVALID_VALUE. Was NO_ERROR :
+[ 149: FAIL ] getError expected: INVALID_VALUE. Was NO_ERROR :
+[ 150: FAIL ] getError expected: INVALID_VALUE. Was NO_ERROR :
+[ 151: FAIL ] getError expected: INVALID_VALUE. Was NO_ERROR :
+[ 152: FAIL ] getError expected: INVALID_VALUE. Was NO_ERROR :
+[ 153: FAIL ] Does not support compressedTexSubImage3D with offsets into views.
+[ 154: FAIL ] Does not support doReadPixels with offsets into views.
+[ 155: PASS ] successfullyParsed is true
+[ FAIL ] 39 failures reported
 

Modified: trunk/LayoutTests/webgl/2.0.0/conformance2/textures/misc/tex-image-and-sub-image-with-array-buffer-view-sub-source-expected.txt (255315 => 255316)


--- trunk/LayoutTests/webgl/2.0.0/conformance2/textures/misc/tex-image-and-sub-image-with-array-buffer-view-sub-source-expected.txt	2020-01-28 22:48:05 UTC (rev 255315)
+++ trunk/LayoutTests/webgl/2.0.0/conformance2/textures/misc/tex-image-and-sub-image-with-array-buffer-view-sub-source-expected.txt	2020-01-28 22:50:57 UTC (rev 255316)
@@ -1,14 +1,14 @@
 This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
 
 Test: ../../../resources/webgl_test_files/conformance2/textures/misc/tex-image-and-sub-image-with-array-buffer-view-sub-source.html
-[ 1: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR : srcOffset too large
+[ 1: PASS ] getError was expected value: INVALID_OPERATION : srcOffset too large
 [ 2: PASS ] getError was expected value: NO_ERROR : texImage2D succeeds with correct buffer and srcOffset
 [ 3: PASS ] getError was expected value: NO_ERROR : no error
-[ 4: FAIL ] Element 1: expected 1, got 0
-[ 5: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR : srcOffset too large
+[ 4: PASS ] texture data uploaded correctly
+[ 5: PASS ] getError was expected value: INVALID_OPERATION : srcOffset too large
 [ 6: PASS ] getError was expected value: NO_ERROR : texSubImage2D succeeds with correct buffer and srcOffset
 [ 7: PASS ] getError was expected value: NO_ERROR : no error
-[ 8: FAIL ] Element 1: expected 1, got 0
+[ 8: PASS ] texture data uploaded correctly
 [ 9: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : srcOffset too large
 [ 10: PASS ] getError was expected value: NO_ERROR : texImage3D succeeds with correct buffer and srcOffset
 [ 11: PASS ] getError was expected value: NO_ERROR : no error
@@ -17,14 +17,14 @@
 [ 14: PASS ] getError was expected value: NO_ERROR : texSubImage3D succeeds with correct buffer and srcOffset
 [ 15: PASS ] getError was expected value: NO_ERROR : no error
 [ 16: FAIL ] Element 1: expected 1, got 0
-[ 17: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR : srcOffset too large
+[ 17: PASS ] getError was expected value: INVALID_OPERATION : srcOffset too large
 [ 18: PASS ] getError was expected value: NO_ERROR : texImage2D succeeds with correct buffer and srcOffset
 [ 19: PASS ] getError was expected value: NO_ERROR : no error
-[ 20: FAIL ] Element 1: expected 1, got 0
-[ 21: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR : srcOffset too large
+[ 20: PASS ] texture data uploaded correctly
+[ 21: PASS ] getError was expected value: INVALID_OPERATION : srcOffset too large
 [ 22: PASS ] getError was expected value: NO_ERROR : texSubImage2D succeeds with correct buffer and srcOffset
 [ 23: PASS ] getError was expected value: NO_ERROR : no error
-[ 24: FAIL ] Element 1: expected 1, got 0
+[ 24: PASS ] texture data uploaded correctly
 [ 25: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : srcOffset too large
 [ 26: PASS ] getError was expected value: NO_ERROR : texImage3D succeeds with correct buffer and srcOffset
 [ 27: PASS ] getError was expected value: NO_ERROR : no error
@@ -33,14 +33,14 @@
 [ 30: PASS ] getError was expected value: NO_ERROR : texSubImage3D succeeds with correct buffer and srcOffset
 [ 31: PASS ] getError was expected value: NO_ERROR : no error
 [ 32: FAIL ] Element 1: expected 1, got 0
-[ 33: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR : srcOffset too large
+[ 33: PASS ] getError was expected value: INVALID_OPERATION : srcOffset too large
 [ 34: PASS ] getError was expected value: NO_ERROR : texImage2D succeeds with correct buffer and srcOffset
 [ 35: PASS ] getError was expected value: NO_ERROR : no error
-[ 36: FAIL ] Element 1: expected 1, got 0
-[ 37: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR : srcOffset too large
+[ 36: PASS ] texture data uploaded correctly
+[ 37: PASS ] getError was expected value: INVALID_OPERATION : srcOffset too large
 [ 38: PASS ] getError was expected value: NO_ERROR : texSubImage2D succeeds with correct buffer and srcOffset
 [ 39: PASS ] getError was expected value: NO_ERROR : no error
-[ 40: FAIL ] Element 1: expected 1, got 0
+[ 40: PASS ] texture data uploaded correctly
 [ 41: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : srcOffset too large
 [ 42: PASS ] getError was expected value: NO_ERROR : texImage3D succeeds with correct buffer and srcOffset
 [ 43: PASS ] getError was expected value: NO_ERROR : no error
@@ -49,14 +49,14 @@
 [ 46: PASS ] getError was expected value: NO_ERROR : texSubImage3D succeeds with correct buffer and srcOffset
 [ 47: PASS ] getError was expected value: NO_ERROR : no error
 [ 48: FAIL ] Element 1: expected 1, got 0
-[ 49: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR : srcOffset too large
+[ 49: PASS ] getError was expected value: INVALID_OPERATION : srcOffset too large
 [ 50: PASS ] getError was expected value: NO_ERROR : texImage2D succeeds with correct buffer and srcOffset
 [ 51: PASS ] getError was expected value: NO_ERROR : no error
-[ 52: FAIL ] Element 1: expected 1, got 0
-[ 53: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR : srcOffset too large
+[ 52: PASS ] texture data uploaded correctly
+[ 53: PASS ] getError was expected value: INVALID_OPERATION : srcOffset too large
 [ 54: PASS ] getError was expected value: NO_ERROR : texSubImage2D succeeds with correct buffer and srcOffset
 [ 55: PASS ] getError was expected value: NO_ERROR : no error
-[ 56: FAIL ] Element 1: expected 1, got 0
+[ 56: PASS ] texture data uploaded correctly
 [ 57: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : srcOffset too large
 [ 58: PASS ] getError was expected value: NO_ERROR : texImage3D succeeds with correct buffer and srcOffset
 [ 59: PASS ] getError was expected value: NO_ERROR : no error
@@ -65,14 +65,14 @@
 [ 62: PASS ] getError was expected value: NO_ERROR : texSubImage3D succeeds with correct buffer and srcOffset
 [ 63: PASS ] getError was expected value: NO_ERROR : no error
 [ 64: FAIL ] Element 1: expected 1, got 0
-[ 65: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR : srcOffset too large
+[ 65: PASS ] getError was expected value: INVALID_OPERATION : srcOffset too large
 [ 66: PASS ] getError was expected value: NO_ERROR : texImage2D succeeds with correct buffer and srcOffset
 [ 67: PASS ] getError was expected value: NO_ERROR : no error
-[ 68: FAIL ] Element 1: expected 1, got 0
-[ 69: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR : srcOffset too large
+[ 68: PASS ] texture data uploaded correctly
+[ 69: PASS ] getError was expected value: INVALID_OPERATION : srcOffset too large
 [ 70: PASS ] getError was expected value: NO_ERROR : texSubImage2D succeeds with correct buffer and srcOffset
 [ 71: PASS ] getError was expected value: NO_ERROR : no error
-[ 72: FAIL ] Element 1: expected 1, got 0
+[ 72: PASS ] texture data uploaded correctly
 [ 73: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : srcOffset too large
 [ 74: PASS ] getError was expected value: NO_ERROR : texImage3D succeeds with correct buffer and srcOffset
 [ 75: PASS ] getError was expected value: NO_ERROR : no error
@@ -81,14 +81,14 @@
 [ 78: PASS ] getError was expected value: NO_ERROR : texSubImage3D succeeds with correct buffer and srcOffset
 [ 79: PASS ] getError was expected value: NO_ERROR : no error
 [ 80: FAIL ] Element 1: expected 1, got 0
-[ 81: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR : srcOffset too large
+[ 81: PASS ] getError was expected value: INVALID_OPERATION : srcOffset too large
 [ 82: PASS ] getError was expected value: NO_ERROR : texImage2D succeeds with correct buffer and srcOffset
 [ 83: PASS ] getError was expected value: NO_ERROR : no error
-[ 84: FAIL ] Element 1: expected 1, got 0
-[ 85: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR : srcOffset too large
+[ 84: PASS ] texture data uploaded correctly
+[ 85: PASS ] getError was expected value: INVALID_OPERATION : srcOffset too large
 [ 86: PASS ] getError was expected value: NO_ERROR : texSubImage2D succeeds with correct buffer and srcOffset
 [ 87: PASS ] getError was expected value: NO_ERROR : no error
-[ 88: FAIL ] Element 1: expected 1, got 0
+[ 88: PASS ] texture data uploaded correctly
 [ 89: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : srcOffset too large
 [ 90: PASS ] getError was expected value: NO_ERROR : texImage3D succeeds with correct buffer and srcOffset
 [ 91: PASS ] getError was expected value: NO_ERROR : no error
@@ -97,14 +97,14 @@
 [ 94: PASS ] getError was expected value: NO_ERROR : texSubImage3D succeeds with correct buffer and srcOffset
 [ 95: PASS ] getError was expected value: NO_ERROR : no error
 [ 96: FAIL ] Element 1: expected 1, got 0
-[ 97: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR : srcOffset too large
+[ 97: PASS ] getError was expected value: INVALID_OPERATION : srcOffset too large
 [ 98: PASS ] getError was expected value: NO_ERROR : texImage2D succeeds with correct buffer and srcOffset
 [ 99: PASS ] getError was expected value: NO_ERROR : no error
-[ 100: FAIL ] Element 1: expected 1.0000000591389835, got 0
-[ 101: FAIL ] getError expected: INVALID_OPERATION. Was NO_ERROR : srcOffset too large
+[ 100: PASS ] texture data uploaded correctly
+[ 101: PASS ] getError was expected value: INVALID_OPERATION : srcOffset too large
 [ 102: PASS ] getError was expected value: NO_ERROR : texSubImage2D succeeds with correct buffer and srcOffset
 [ 103: PASS ] getError was expected value: NO_ERROR : no error
-[ 104: FAIL ] Element 1: expected 1.0000000591389835, got 0
+[ 104: PASS ] texture data uploaded correctly
 [ 105: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : srcOffset too large
 [ 106: PASS ] getError was expected value: NO_ERROR : texImage3D succeeds with correct buffer and srcOffset
 [ 107: PASS ] getError was expected value: NO_ERROR : no error
@@ -114,5 +114,5 @@
 [ 111: PASS ] getError was expected value: NO_ERROR : no error
 [ 112: FAIL ] Element 1: expected 1.0000000591389835, got 0
 [ 113: PASS ] successfullyParsed is true
-[ FAIL ] 56 failures reported
+[ FAIL ] 28 failures reported
 

Modified: trunk/LayoutTests/webgl/2.0.0/resources/webgl_test_files/conformance2/buffers/buffer-data-and-buffer-sub-data-sub-source.html (255315 => 255316)


--- trunk/LayoutTests/webgl/2.0.0/resources/webgl_test_files/conformance2/buffers/buffer-data-and-buffer-sub-data-sub-source.html	2020-01-28 22:48:05 UTC (rev 255315)
+++ trunk/LayoutTests/webgl/2.0.0/resources/webgl_test_files/conformance2/buffers/buffer-data-and-buffer-sub-data-sub-source.html	2020-01-28 22:50:57 UTC (rev 255316)
@@ -52,7 +52,7 @@
     var offset = sourceByteOffset / testCase.size;
     for (var ii = 0; ii < size; ++ii) {
         if (readbackView[ii] != data[ii]) {
-            testFailed("expected data at " + ii + ": " + data[iit] + ", got " + readbackView[ii]);
+            testFailed("expected data at " + ii + ": " + data[ii] + ", got " + readbackView[ii]);
             pass = false;
         }
     }

Modified: trunk/Source/WebCore/ChangeLog (255315 => 255316)


--- trunk/Source/WebCore/ChangeLog	2020-01-28 22:48:05 UTC (rev 255315)
+++ trunk/Source/WebCore/ChangeLog	2020-01-28 22:50:57 UTC (rev 255316)
@@ -1,3 +1,43 @@
+2020-01-28  Justin Fan  <justin_...@apple.com>
+
+        [WebGL2] Implement sub-source texImage2D and texSubImage2D
+        https://bugs.webkit.org/show_bug.cgi?id=206782
+        <rdar://problem/58886527>
+
+        Reviewed by Dean Jackson.
+
+        Implement sub-source override versions of texImage2D and texSubImage2D. 
+        Some refactoring of bufferData and bufferSubData to share code with new implementation.
+
+        Conformance test results updated for:
+        webgl/2.0.0/conformance2/buffers/buffer-data-and-buffer-sub-data-sub-source.html
+        webgl/2.0.0/conformance2/misc/views-with-offsets.html
+        webgl/2.0.0/conformance2/textures/misc/tex-image-and-sub-image-with-array-buffer-view-sub-source.html
+
+        * html/canvas/WebGL2RenderingContext.cpp:
+        (WebCore::WebGL2RenderingContext::arrayBufferViewSliceFactory): Creates sub-resource of appropriate type for ArrayBufferView resources.
+        (WebCore::WebGL2RenderingContext::sliceArrayBufferView): Consolidates duplicate logic of buffer/SubData.
+        (WebCore::WebGL2RenderingContext::bufferData):
+        (WebCore::WebGL2RenderingContext::bufferSubData):
+        (WebCore::WebGL2RenderingContext::getBufferSubData): DataView buffers are allowed, and remove unnecessary elementSize helper function.
+        (WebCore::WebGL2RenderingContext::texImage2D): Implement sub-source version and improve log messaging for unimplemented overrides.
+        (WebCore::WebGL2RenderingContext::sliceTypedArrayBufferView): Creates sub-resource of appropriate type for TypedArray buffer resources.
+        (WebCore::WebGL2RenderingContext::texImage3D): Improve log messaging.
+        (WebCore::WebGL2RenderingContext::texSubImage2D): Implement sub-source version and improve log messaging for unimplemented overrides.
+        (WebCore::WebGL2RenderingContext::texSubImage3D): Improve log messaging.
+        (WebCore::WebGL2RenderingContext::compressedTexImage3D): 
+        (WebCore::WebGL2RenderingContext::compressedTexSubImage3D):
+        (WebCore::WebGL2RenderingContext::compressedTexImage2D):
+        (WebCore::WebGL2RenderingContext::compressedTexSubImage2D):
+        (WebCore::WebGL2RenderingContext::readPixels):
+        (WebCore::arrayBufferViewElementSize): Deleted. Unnecessary given utilities in TypedArrayType.h.
+        * html/canvas/WebGL2RenderingContext.h:
+        * platform/graphics/GraphicsContextGL.h: Remove some extra overrides that aren't actually present in OpenGL ES 3.
+        * platform/graphics/angle/GraphicsContextGLANGLE.cpp:
+        * platform/graphics/opengl/GraphicsContextGLOpenGL.h:
+        * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
+        (WebCore::GraphicsContextGLOpenGL::texImage2D): Deleted.
+
 2020-01-28  Chris Lord  <cl...@igalia.com>
 
         Implement [Transferable] property of OffscreenCanvas

Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp (255315 => 255316)


--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp	2020-01-28 22:48:05 UTC (rev 255315)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp	2020-01-28 22:50:57 UTC (rev 255316)
@@ -62,6 +62,7 @@
 #include <_javascript_Core/GenericTypedArrayViewInlines.h>
 #include <_javascript_Core/HeapInlines.h>
 #include <_javascript_Core/JSGenericTypedArrayViewInlines.h>
+#include <_javascript_Core/TypedArrayType.h>
 #include <wtf/IsoMallocInlines.h>
 
 namespace WebCore {
@@ -144,87 +145,68 @@
     m_boundSamplers.resize(m_textureUnits.size());
 }
 
-inline static Optional<unsigned> arrayBufferViewElementSize(const ArrayBufferView& data)
+RefPtr<ArrayBufferView> WebGL2RenderingContext::arrayBufferViewSliceFactory(const char* const functionName, const ArrayBufferView& data, unsigned startByte,  unsigned numElements)
 {
+    RefPtr<ArrayBufferView> slice;
+
     switch (data.getType()) {
-    case JSC::NotTypedArray:
+#define FACTORY_CASE(type) \
+    case JSC::Type##type: \
+        slice = JSC::type##Array::tryCreate(data.possiblySharedBuffer(), startByte, numElements); \
+        break;
+
+    FOR_EACH_TYPED_ARRAY_TYPE_EXCLUDING_DATA_VIEW(FACTORY_CASE);
+#undef FACTORY_CASE
     case JSC::TypeDataView:
-        return WTF::nullopt;
-    case JSC::TypeInt8:
-    case JSC::TypeUint8:
-    case JSC::TypeUint8Clamped:
-    case JSC::TypeInt16:
-    case JSC::TypeUint16:
-    case JSC::TypeInt32:
-    case JSC::TypeUint32:
-    case JSC::TypeFloat32:
-    case JSC::TypeFloat64:
-        return elementSize(data.getType());
+        slice = Uint8Array::tryCreate(data.possiblySharedBuffer(), startByte, numElements);
+        break;
+    default:
+        ASSERT_NOT_REACHED();
+        return nullptr;
     }
-    RELEASE_ASSERT_NOT_REACHED();
+
+    if (!slice)
+        synthesizeGLError(GraphicsContextGL::OUT_OF_MEMORY, functionName, "Could not create intermediate ArrayBufferView");
+
+    return slice;
 }
 
-void WebGL2RenderingContext::bufferData(GCGLenum target, const ArrayBufferView& data, GCGLenum usage, GCGLuint srcOffset, GCGLuint length)
+RefPtr<ArrayBufferView> WebGL2RenderingContext::sliceArrayBufferView(const char* const functionName, const ArrayBufferView& data, GCGLuint srcOffset, GCGLuint length)
 {
-    auto optionalElementSize = arrayBufferViewElementSize(data);
-    if (!optionalElementSize) {
-        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "bufferData", "Invalid type of Array Buffer View");
-        return;
+    if (data.getType() == JSC::NotTypedArray) {
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, functionName, "Invalid type of Array Buffer View");
+        return nullptr;
     }
-    auto elementSize = optionalElementSize.value();
+
+    auto elementSize = JSC::elementSize(data.getType());
     Checked<GCGLuint, RecordOverflow> checkedElementSize(elementSize);
 
     Checked<GCGLuint, RecordOverflow> checkedSrcOffset(srcOffset);
     Checked<GCGLuint, RecordOverflow> checkedByteSrcOffset = checkedSrcOffset * checkedElementSize;
-    Checked<GCGLuint, RecordOverflow> checkedlength(length);
-    Checked<GCGLuint, RecordOverflow> checkedByteLength = checkedlength * checkedElementSize;
+    Checked<GCGLuint, RecordOverflow> checkedLength(length);
+    Checked<GCGLuint, RecordOverflow> checkedByteLength = checkedLength * checkedElementSize;
 
     if (checkedByteSrcOffset.hasOverflowed()
         || checkedByteLength.hasOverflowed()
         || checkedByteSrcOffset.unsafeGet() > data.byteLength()
         || checkedByteLength.unsafeGet() > data.byteLength() - checkedByteSrcOffset.unsafeGet()) {
-        synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "bufferData", "srcOffset or length is out of bounds");
-        return;
+        synthesizeGLError(GraphicsContextGL::INVALID_VALUE, functionName, "srcOffset or length is out of bounds");
+        return nullptr;
     }
 
-    auto slice = Uint8Array::tryCreate(data.possiblySharedBuffer(), data.byteOffset() + checkedByteSrcOffset.unsafeGet(), checkedByteLength.unsafeGet());
-    if (!slice) {
-        synthesizeGLError(GraphicsContextGL::OUT_OF_MEMORY, "bufferData", "Could not create intermediate ArrayBufferView");
-        return;
-    }
-    WebGLRenderingContextBase::bufferData(target, BufferDataSource(slice.get()), usage);
+    return arrayBufferViewSliceFactory(functionName, data, data.byteOffset() + checkedByteSrcOffset.unsafeGet(), length);
 }
 
+void WebGL2RenderingContext::bufferData(GCGLenum target, const ArrayBufferView& data, GCGLenum usage, GCGLuint srcOffset, GCGLuint length)
+{
+    if (auto slice = sliceArrayBufferView("bufferData", data, srcOffset, length))
+        WebGLRenderingContextBase::bufferData(target, BufferDataSource(slice.get()), usage);
+}
+
 void WebGL2RenderingContext::bufferSubData(GCGLenum target, long long offset, const ArrayBufferView& data, GCGLuint srcOffset, GCGLuint length)
 {
-    auto optionalElementSize = arrayBufferViewElementSize(data);
-    if (!optionalElementSize) {
-        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "bufferSubData", "Invalid type of Array Buffer View");
-        return;
-    }
-    auto elementSize = optionalElementSize.value();
-    Checked<GCGLuint, RecordOverflow> checkedElementSize(elementSize);
-
-    Checked<GCGLuint, RecordOverflow> checkedSrcOffset(srcOffset);
-    Checked<GCGLuint, RecordOverflow> checkedByteSrcOffset = checkedSrcOffset * checkedElementSize;
-    Checked<GCGLuint, RecordOverflow> checkedlength(length);
-    Checked<GCGLuint, RecordOverflow> checkedByteLength = checkedlength * checkedElementSize;
-
-    if (checkedByteSrcOffset.hasOverflowed()
-        || checkedByteLength.hasOverflowed()
-        || checkedByteSrcOffset.unsafeGet() > data.byteLength()
-        || checkedByteLength.unsafeGet() > data.byteLength() - checkedByteSrcOffset.unsafeGet()) {
-        synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "bufferSubData", "srcOffset or length is out of bounds");
-        return;
-    }
-
-    auto slice = Uint8Array::tryCreate(data.possiblySharedBuffer(), data.byteOffset() + checkedByteSrcOffset.unsafeGet(), checkedByteLength.unsafeGet());
-    if (!slice) {
-        synthesizeGLError(GraphicsContextGL::OUT_OF_MEMORY, "bufferSubData", "Could not create intermediate ArrayBufferView");
-        return;
-    }
-
-    WebGLRenderingContextBase::bufferSubData(target, offset, BufferDataSource(slice.get()));
+    if (auto slice = sliceArrayBufferView("bufferSubData", data, srcOffset, length))
+        WebGLRenderingContextBase::bufferSubData(target, offset, BufferDataSource(slice.get()));
 }
 
 void WebGL2RenderingContext::copyBufferSubData(GCGLenum readTarget, GCGLenum writeTarget, GCGLint64 readOffset, GCGLint64 writeOffset, GCGLint64 size)
@@ -287,12 +269,12 @@
         return;
     }
 
-    auto optionalElementSize = arrayBufferViewElementSize(*dstData);
-    if (!optionalElementSize) {
+    if (dstData->getType() == JSC::NotTypedArray) {
         synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "getBufferSubData", "Invalid type of Array Buffer View");
         return;
     }
-    auto elementSize = optionalElementSize.value();
+
+    auto elementSize = JSC::elementSize(dstData->getType());
     auto dstDataLength = dstData->byteLength() / elementSize;
 
     if (dstOffset > dstDataLength) {
@@ -700,72 +682,106 @@
     LOG(WebGL, "[[ NOT IMPLEMENTED ]] texStorage3D()");
 }
 
-void WebGL2RenderingContext::texImage2D(GCGLenum, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLint, GCGLenum, GCGLenum, GCGLint64)
+void WebGL2RenderingContext::texImage2D(GCGLenum, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLint, GCGLenum, GCGLenum, GCGLintptr)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texImage2D()");
+    // Covered by textures/misc/tex-unpack-params.html.
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texImage2D(PIXEL_UNPACK_BUFFER)");
 }
 
 ExceptionOr<void> WebGL2RenderingContext::texImage2D(GCGLenum, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLint, GCGLenum, GCGLenum, TexImageSource&&)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texImage2D()");
+    // Covered by textures/misc/origin-clean-conformance-offscreencanvas.html?
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texImage2D(TexImageSource)");
     return { };
 }
 
-void WebGL2RenderingContext::texImage2D(GCGLenum, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLint, GCGLenum, GCGLenum, RefPtr<ArrayBufferView>&&, GCGLuint)
+RefPtr<ArrayBufferView> WebGL2RenderingContext::sliceTypedArrayBufferView(const char* const functionName, RefPtr<ArrayBufferView>& srcData, GCGLuint srcOffset)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texImage2D()");
+    if (!srcData)
+        return nullptr;
+
+    if (!isTypedView(srcData->getType())) {
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, functionName, "Invalid type of ArrayBufferView");
+        return nullptr;
+    }
+
+    auto elementSize = JSC::elementSize(srcData->getType());
+    auto startingByte = WTF::checkedProduct<unsigned>(elementSize, srcOffset);
+    if (startingByte.hasOverflowed() || startingByte >= srcData->byteLength()) {
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, functionName, "Invalid element offset!");
+        return nullptr;
+    }
+
+    auto numElements = (srcData->byteLength() - startingByte.unsafeGet()) / elementSize;
+
+    return arrayBufferViewSliceFactory(functionName, *srcData, startingByte.unsafeGet(), numElements);
 }
 
+void WebGL2RenderingContext::texImage2D(GCGLenum target, GCGLint level, GCGLint internalFormat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, RefPtr<ArrayBufferView>&& srcData, GCGLuint srcOffset)
+{
+    if (isContextLostOrPending())
+        return;
+
+    auto slicedData = sliceTypedArrayBufferView("texImage2D", srcData, srcOffset);
+
+    WebGLRenderingContextBase::texImage2D(target, level, internalFormat, width, height, border, format, type, WTFMove(slicedData));
+}
+
 void WebGL2RenderingContext::texImage3D(GCGLenum, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLsizei, GCGLint, GCGLenum, GCGLenum, GCGLint64)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texImage3D()");
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texImage3D(PIXEL_UNPACK_BUFFER)");
 }
 
 ExceptionOr<void> WebGL2RenderingContext::texImage3D(GCGLenum, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLsizei, GCGLint, GCGLenum, GCGLenum, TexImageSource&&)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texImage3D()");
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texImage3D(TexImageSource)");
     return { };
 }
 
 void WebGL2RenderingContext::texImage3D(GCGLenum, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLsizei, GCGLint, GCGLenum, GCGLenum, RefPtr<ArrayBufferView>&&)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texImage3D()");
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texImage3D(ArrayBufferView?)");
 }
 
 void WebGL2RenderingContext::texImage3D(GCGLenum, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLsizei, GCGLint, GCGLenum, GCGLenum, RefPtr<ArrayBufferView>&&, GCGLuint)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texImage3D()");
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texImage3D(ArrayBufferView, srcOffset)");
 }
 
-void WebGL2RenderingContext::texSubImage2D(GCGLenum, GCGLint, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLenum, GCGLenum, GCGLint64)
+void WebGL2RenderingContext::texSubImage2D(GCGLenum, GCGLint, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLenum, GCGLenum, GCGLintptr)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texSubImage2D()");
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texSubImage2D(PIXEL_UNPACK_BUFFER)");
 }
 
 ExceptionOr<void> WebGL2RenderingContext::texSubImage2D(GCGLenum, GCGLint, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLenum, GCGLenum, TexImageSource&&)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texSubImage2D()");
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texSubImage2D(TexImageSource)");
     return { };
 }
 
-void WebGL2RenderingContext::texSubImage2D(GCGLenum, GCGLint, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLenum, GCGLenum, RefPtr<ArrayBufferView>&&, GCGLuint)
+void WebGL2RenderingContext::texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, RefPtr<ArrayBufferView>&& srcData, GCGLuint srcOffset)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texSubImage2D()");
+    if (isContextLostOrPending())
+        return;
+
+    auto slicedData = sliceTypedArrayBufferView("texSubImage2D", srcData, srcOffset);
+
+    WebGLRenderingContextBase::texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, WTFMove(slicedData));
 }
 
 void WebGL2RenderingContext::texSubImage3D(GCGLenum, GCGLint, GCGLint, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLsizei, GCGLenum, GCGLenum, GCGLint64)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texSubImage3D()");
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texSubImage3D(PIXEL_UNPACK_BUFFER)");
 }
 
 void WebGL2RenderingContext::texSubImage3D(GCGLenum, GCGLint, GCGLint, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLsizei, GCGLenum, GCGLenum, RefPtr<ArrayBufferView>&&, GCGLuint)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texSubImage3D()");
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texSubImage3D(ArrayBufferView, srcOffset)");
 }
 
 ExceptionOr<void> WebGL2RenderingContext::texSubImage3D(GCGLenum, GCGLint, GCGLint, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLsizei, GCGLenum, GCGLenum, TexImageSource&&)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texSubImage3D()");
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] texSubImage3D(TexImageSource)");
     return { };
 }
 
@@ -776,22 +792,22 @@
 
 void WebGL2RenderingContext::compressedTexImage3D(GCGLenum, GCGLint, GCGLenum, GCGLsizei, GCGLsizei, GCGLsizei, GCGLint, GCGLsizei, GCGLint64)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] compressedTexImage3D()");
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] compressedTexImage3D(PIXEL_UNPACK_BUFFER)");
 }
 
 void WebGL2RenderingContext::compressedTexImage3D(GCGLenum, GCGLint, GCGLenum, GCGLsizei, GCGLsizei, GCGLsizei, GCGLint, ArrayBufferView&, GCGLuint, GCGLuint)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] compressedTexImage3D()");
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] compressedTexImage3D(ArrayBufferView)");
 }
 
 void WebGL2RenderingContext::compressedTexSubImage3D(GCGLenum, GCGLint, GCGLint, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLsizei, GCGLenum, GCGLsizei, GCGLint64)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] compressedTexSubImage3D()");
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] compressedTexSubImage3D(PIXEL_UNPACK_BUFFER)");
 }
 
 void WebGL2RenderingContext::compressedTexSubImage3D(GCGLenum, GCGLint, GCGLint, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLsizei, GCGLenum, ArrayBufferView&, GCGLuint, GCGLuint)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] compressedTexSubImage3D()");
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] compressedTexSubImage3D(ArrayBufferView)");
 }
 
 GCGLint WebGL2RenderingContext::getFragDataLocation(WebGLProgram&, const String&)
@@ -2403,7 +2419,7 @@
     UNUSED_PARAM(imageSize);
     UNUSED_PARAM(offset);
 
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] compressedTexImage2D()");
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] compressedTexImage2D(PIXEL_UNPACK_BUFFER)");
 }
 
 void WebGL2RenderingContext::compressedTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, ArrayBufferView& srcData, GCGLuint srcOffset, GCGLuint srcLengthOverride)
@@ -2418,7 +2434,7 @@
     UNUSED_PARAM(srcOffset);
     UNUSED_PARAM(srcLengthOverride);
 
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] compressedTexImage2D()");
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] compressedTexImage2D(ArrayBufferView)");
 }
 
 void WebGL2RenderingContext::compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLintptr offset)
@@ -2433,7 +2449,7 @@
     UNUSED_PARAM(imageSize);
     UNUSED_PARAM(offset);
 
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] compressedTexSubImage2D()");
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] compressedTexSubImage2D(PIXEL_UNPACK_BUFFER)");
 }
 
 void WebGL2RenderingContext::compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, ArrayBufferView& srcData, GLuint srcOffset, GLuint srcLengthOverride)
@@ -2449,7 +2465,7 @@
     UNUSED_PARAM(srcOffset);
     UNUSED_PARAM(srcLengthOverride);
 
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] compressedTexSubImage2D()");
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] compressedTexSubImage2D(ArrayBufferView)");
 
 }
 
@@ -2590,7 +2606,7 @@
     UNUSED_PARAM(dstData);
     UNUSED_PARAM(dstOffset);
 
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] readPixels()");
+    LOG(WebGL, "[[ NOT IMPLEMENTED ]] readPixels(ArrayBufferView)");
 }
 
 void WebGL2RenderingContext::uncacheDeletedBuffer(WebGLBuffer* buffer)

Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h (255315 => 255316)


--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h	2020-01-28 22:48:05 UTC (rev 255315)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h	2020-01-28 22:50:57 UTC (rev 255316)
@@ -77,7 +77,7 @@
 #endif
 
     using WebGLRenderingContextBase::texImage2D;
-    void texImage2D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLint64 pboOffset);
+    void texImage2D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLintptr offset);
     ExceptionOr<void> texImage2D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, TexImageSource&&);
     void texImage2D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, RefPtr<ArrayBufferView>&& srcData, GCGLuint srcOffset);
 
@@ -87,7 +87,7 @@
     void texImage3D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLint border, GCGLenum format, GCGLenum type, RefPtr<ArrayBufferView>&& srcData, GCGLuint srcOffset);
 
     using WebGLRenderingContextBase::texSubImage2D;
-    void texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLint64 pboOffset);
+    void texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr pboOffset);
     ExceptionOr<void> texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, TexImageSource&&);
     void texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, RefPtr<ArrayBufferView>&& srcData, GCGLuint srcOffset);
 
@@ -247,6 +247,10 @@
 
     bool isWebGL2() const final { return true; }
 
+    RefPtr<ArrayBufferView> arrayBufferViewSliceFactory(const char* const functionName, const ArrayBufferView& data, unsigned startByte, unsigned bytelength);
+    RefPtr<ArrayBufferView> sliceArrayBufferView(const char* const functionName, const ArrayBufferView& data, GCGLuint srcOffset, GCGLuint length);
+    RefPtr<ArrayBufferView> sliceTypedArrayBufferView(const char* const functionName, RefPtr<ArrayBufferView>&, GCGLuint);
+
     void initializeVertexArrayObjects() final;
     GCGLint getMaxDrawBuffers() final;
     GCGLint getMaxColorAttachments() final;

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContextGL.h (255315 => 255316)


--- trunk/Source/WebCore/platform/graphics/GraphicsContextGL.h	2020-01-28 22:48:05 UTC (rev 255315)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContextGL.h	2020-01-28 22:50:57 UTC (rev 255316)
@@ -1177,9 +1177,6 @@
     virtual String getActiveUniformBlockName(PlatformGLObject program, GCGLuint uniformBlockIndex) = 0;
     virtual void uniformBlockBinding(PlatformGLObject program, GCGLuint uniformBlockIndex, GCGLuint uniformBlockBinding) = 0;
 
-    virtual void texImage2D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLintptr pboOffset) = 0;
-    virtual void texImage2D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, const void* srcData, GCGLuint srcOffset) = 0;
-
     virtual void texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr pboOffset) = 0;
     virtual void texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, const void* srcData, GCGLuint srcOffset) = 0;
 

Modified: trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp (255315 => 255316)


--- trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp	2020-01-28 22:48:05 UTC (rev 255315)
+++ trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp	2020-01-28 22:50:57 UTC (rev 255316)
@@ -2530,33 +2530,6 @@
     return { };
 }
 
-void GraphicsContextGLOpenGL::texImage2D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLintptr pboOffset)
-{
-    UNUSED_PARAM(target);
-    UNUSED_PARAM(level);
-    UNUSED_PARAM(internalformat);
-    UNUSED_PARAM(width);
-    UNUSED_PARAM(height);
-    UNUSED_PARAM(border);
-    UNUSED_PARAM(format);
-    UNUSED_PARAM(type);
-    UNUSED_PARAM(pboOffset);
-}
-
-void GraphicsContextGLOpenGL::texImage2D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, const void* srcData, GCGLuint srcOffset)
-{
-    UNUSED_PARAM(target);
-    UNUSED_PARAM(level);
-    UNUSED_PARAM(internalformat);
-    UNUSED_PARAM(width);
-    UNUSED_PARAM(height);
-    UNUSED_PARAM(border);
-    UNUSED_PARAM(format);
-    UNUSED_PARAM(type);
-    UNUSED_PARAM(srcData);
-    UNUSED_PARAM(srcOffset);
-}
-
 void GraphicsContextGLOpenGL::texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr pboOffset)
 {
     UNUSED_PARAM(target);

Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h (255315 => 255316)


--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h	2020-01-28 22:48:05 UTC (rev 255315)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h	2020-01-28 22:50:57 UTC (rev 255316)
@@ -480,9 +480,6 @@
     String getActiveUniformBlockName(PlatformGLObject program, GCGLuint uniformBlockIndex) final;
     void uniformBlockBinding(PlatformGLObject program, GCGLuint uniformBlockIndex, GCGLuint uniformBlockBinding) final;
 
-    void texImage2D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLintptr pboOffset) final;
-    void texImage2D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, const void* srcData, GCGLuint srcOffset) final;
-
     void texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr pboOffset) final;
     void texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, const void* srcData, GCGLuint srcOffset) final;
 

Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp (255315 => 255316)


--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp	2020-01-28 22:48:05 UTC (rev 255315)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp	2020-01-28 22:50:57 UTC (rev 255316)
@@ -2829,33 +2829,6 @@
 }
 #endif
 
-void GraphicsContextGLOpenGL::texImage2D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLintptr pboOffset)
-{
-    UNUSED_PARAM(target);
-    UNUSED_PARAM(level);
-    UNUSED_PARAM(internalformat);
-    UNUSED_PARAM(width);
-    UNUSED_PARAM(height);
-    UNUSED_PARAM(border);
-    UNUSED_PARAM(format);
-    UNUSED_PARAM(type);
-    UNUSED_PARAM(pboOffset);
-}
-
-void GraphicsContextGLOpenGL::texImage2D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, const void* srcData, GCGLuint srcOffset)
-{
-    UNUSED_PARAM(target);
-    UNUSED_PARAM(level);
-    UNUSED_PARAM(internalformat);
-    UNUSED_PARAM(width);
-    UNUSED_PARAM(height);
-    UNUSED_PARAM(border);
-    UNUSED_PARAM(format);
-    UNUSED_PARAM(type);
-    UNUSED_PARAM(srcData);
-    UNUSED_PARAM(srcOffset);
-}
-
 void GraphicsContextGLOpenGL::texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr pboOffset)
 {
     UNUSED_PARAM(target);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to