Diff
Modified: trunk/LayoutTests/ChangeLog (260907 => 260908)
--- trunk/LayoutTests/ChangeLog 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/LayoutTests/ChangeLog 2020-04-29 19:01:50 UTC (rev 260908)
@@ -1,3 +1,22 @@
+2020-04-29 Kenneth Russell <[email protected]>
+
+ REGRESSION (r256784?): Shadertoy demo no longer works in Safari
+ https://bugs.webkit.org/show_bug.cgi?id=210994
+
+ Reviewed by Dean Jackson.
+
+ Update tex-mipmap-levels.html to top-of-tree to fix incorrect test
+ cases. Rebaseline layout tests which are either now all passing,
+ or have progressed. Temporarily skip a couple of tests, previously
+ skipped because of lack of the EXT_color_buffer_float extension,
+ which are failing because of Bug 211156.
+
+ * TestExpectations:
+ * fast/canvas/webgl/readPixels-float-expected.txt:
+ * webgl/2.0.0/conformance2/textures/misc/copy-texture-image-expected.txt:
+ * webgl/2.0.0/conformance2/textures/misc/tex-mipmap-levels-expected.txt:
+ * webgl/2.0.0/resources/webgl_test_files/conformance2/textures/misc/tex-mipmap-levels.html:
+
2020-04-29 Zalan Bujtas <[email protected]>
Header is blank on https://nader.org
Modified: trunk/LayoutTests/TestExpectations (260907 => 260908)
--- trunk/LayoutTests/TestExpectations 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/LayoutTests/TestExpectations 2020-04-29 19:01:50 UTC (rev 260908)
@@ -3317,6 +3317,10 @@
# DEQP is skipped on the main fleet of bots because of the long run time.
webgl/2.0.0/deqp [ Skip ]
+# webkit.org/b/211156 clearBuffer entry points are not implemented
+webgl/2.0.0/conformance2/reading/format-r11f-g11f-b10f.html [ Skip ]
+webgl/2.0.0/conformance2/rendering/clear-func-buffer-type-match.html [ Skip ]
+
# webkit.org/b/208078 To-be-addressed WebGL 2 tests that generate inconsistent results between devices
webgl/2.0.0/conformance2/renderbuffers/multisample-with-full-sample-counts.html [ Pass Failure ]
webgl/2.0.0/conformance/extensions/webgl-draw-buffers.html [ Pass Failure ]
Modified: trunk/LayoutTests/fast/canvas/webgl/readPixels-float-expected.txt (260907 => 260908)
--- trunk/LayoutTests/fast/canvas/webgl/readPixels-float-expected.txt 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/LayoutTests/fast/canvas/webgl/readPixels-float-expected.txt 2020-04-29 19:01:50 UTC (rev 260908)
@@ -3,5 +3,5 @@
Create a floating point texture
Create and bind framebuffer
Clear framebuffer to red
-FAIL: Framebuffer is not floating-point red.
+PASS: Framebuffer is floating-point red.
Modified: trunk/LayoutTests/webgl/2.0.0/conformance2/textures/misc/copy-texture-image-expected.txt (260907 => 260908)
--- trunk/LayoutTests/webgl/2.0.0/conformance2/textures/misc/copy-texture-image-expected.txt 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/LayoutTests/webgl/2.0.0/conformance2/textures/misc/copy-texture-image-expected.txt 2020-04-29 19:01:50 UTC (rev 260908)
@@ -23,99 +23,99 @@
[ 20: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
[ 21: PASS ] getError was expected value: NO_ERROR : copyTexImage2D should succeed for good internalformat ALPHA
[ 22: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 23: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : copyTexImage2D should succeed for good internalformat R8
+[ 23: PASS ] getError was expected value: NO_ERROR : copyTexImage2D should succeed for good internalformat R8
[ 24: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 25: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : copyTexImage2D should succeed for good internalformat R8
+[ 25: PASS ] getError was expected value: NO_ERROR : copyTexImage2D should succeed for good internalformat R8
[ 26: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 27: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : copyTexImage2D should succeed for good internalformat RG8
+[ 27: PASS ] getError was expected value: NO_ERROR : copyTexImage2D should succeed for good internalformat RG8
[ 28: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 29: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : copyTexImage2D should succeed for good internalformat RG8
+[ 29: PASS ] getError was expected value: NO_ERROR : copyTexImage2D should succeed for good internalformat RG8
[ 30: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 31: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : copyTexImage2D should succeed for good internalformat RGB8
+[ 31: PASS ] getError was expected value: NO_ERROR : copyTexImage2D should succeed for good internalformat RGB8
[ 32: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 33: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : copyTexImage2D should succeed for good internalformat RGB8
+[ 33: PASS ] getError was expected value: NO_ERROR : copyTexImage2D should succeed for good internalformat RGB8
[ 34: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 35: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : copyTexImage2D should succeed for good internalformat RGBA8
+[ 35: PASS ] getError was expected value: NO_ERROR : copyTexImage2D should succeed for good internalformat RGBA8
[ 36: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 37: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : copyTexImage2D should succeed for good internalformat RGBA8
+[ 37: PASS ] getError was expected value: NO_ERROR : copyTexImage2D should succeed for good internalformat RGBA8
[ 38: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 39: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : copyTexImage2D should fail for good internalformat with unmatched component sizes RGB565
+[ 39: PASS ] getError was expected value: INVALID_OPERATION : copyTexImage2D should fail for good internalformat with unmatched component sizes RGB565
[ 40: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 41: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : copyTexImage2D should fail for good internalformat with unmatched component sizes RGBA4
+[ 41: PASS ] getError was expected value: INVALID_OPERATION : copyTexImage2D should fail for good internalformat with unmatched component sizes RGBA4
[ 42: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 43: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : copyTexImage2D should fail for good internalformat with unmatched component sizes RGB5_A1
+[ 43: PASS ] getError was expected value: INVALID_OPERATION : copyTexImage2D should fail for good internalformat with unmatched component sizes RGB5_A1
[ 44: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 45: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : copyTexImage2D should fail for good internalformat with unmatched component sizes RGB10_A2
+[ 45: PASS ] getError was expected value: INVALID_OPERATION : copyTexImage2D should fail for good internalformat with unmatched component sizes RGB10_A2
[ 46: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 47: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : copyTexImage2D should succeed for good internalformat SRGB8
+[ 47: PASS ] getError was expected value: NO_ERROR : copyTexImage2D should succeed for good internalformat SRGB8
[ 48: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 49: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : copyTexImage2D should succeed for good internalformat SRGB8_ALPHA8
+[ 49: PASS ] getError was expected value: NO_ERROR : copyTexImage2D should succeed for good internalformat SRGB8_ALPHA8
[ 50: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 51: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : copyTexImage2D should succeed for good internalformat R32I
+[ 51: PASS ] getError was expected value: NO_ERROR : copyTexImage2D should succeed for good internalformat R32I
[ 52: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 53: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : copyTexImage2D should succeed for good internalformat RG32I
+[ 53: PASS ] getError was expected value: NO_ERROR : copyTexImage2D should succeed for good internalformat RG32I
[ 54: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 55: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : copyTexImage2D should succeed for good internalformat RGBA32I
+[ 55: PASS ] getError was expected value: NO_ERROR : copyTexImage2D should succeed for good internalformat RGBA32I
[ 56: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 57: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : copyTexImage2D should fail for good internalformat with unmatched component sizes R8I
+[ 57: PASS ] getError was expected value: INVALID_OPERATION : copyTexImage2D should fail for good internalformat with unmatched component sizes R8I
[ 58: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 59: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : copyTexImage2D should fail for good internalformat with unmatched component sizes R16I
+[ 59: PASS ] getError was expected value: INVALID_OPERATION : copyTexImage2D should fail for good internalformat with unmatched component sizes R16I
[ 60: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 61: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : copyTexImage2D should fail for good internalformat with unmatched component sizes RG8I
+[ 61: PASS ] getError was expected value: INVALID_OPERATION : copyTexImage2D should fail for good internalformat with unmatched component sizes RG8I
[ 62: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 63: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : copyTexImage2D should fail for good internalformat with unmatched component sizes RG16I
+[ 63: PASS ] getError was expected value: INVALID_OPERATION : copyTexImage2D should fail for good internalformat with unmatched component sizes RG16I
[ 64: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 65: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : copyTexImage2D should fail for good internalformat with unmatched component sizes RGBA8I
+[ 65: PASS ] getError was expected value: INVALID_OPERATION : copyTexImage2D should fail for good internalformat with unmatched component sizes RGBA8I
[ 66: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 67: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : copyTexImage2D should fail for good internalformat with unmatched component sizes RGBA16I
+[ 67: PASS ] getError was expected value: INVALID_OPERATION : copyTexImage2D should fail for good internalformat with unmatched component sizes RGBA16I
[ 68: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 69: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : copyTexImage2D should succeed for good internalformat R32UI
+[ 69: PASS ] getError was expected value: NO_ERROR : copyTexImage2D should succeed for good internalformat R32UI
[ 70: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 71: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : copyTexImage2D should succeed for good internalformat RG32UI
+[ 71: PASS ] getError was expected value: NO_ERROR : copyTexImage2D should succeed for good internalformat RG32UI
[ 72: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 73: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : copyTexImage2D should succeed for good internalformat RGBA32UI
+[ 73: PASS ] getError was expected value: NO_ERROR : copyTexImage2D should succeed for good internalformat RGBA32UI
[ 74: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 75: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : copyTexImage2D should fail for good internalformat with unmatched component sizes R8UI
+[ 75: PASS ] getError was expected value: INVALID_OPERATION : copyTexImage2D should fail for good internalformat with unmatched component sizes R8UI
[ 76: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 77: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : copyTexImage2D should fail for good internalformat with unmatched component sizes R16UI
+[ 77: PASS ] getError was expected value: INVALID_OPERATION : copyTexImage2D should fail for good internalformat with unmatched component sizes R16UI
[ 78: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 79: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : copyTexImage2D should fail for good internalformat with unmatched component sizes RG8UI
+[ 79: PASS ] getError was expected value: INVALID_OPERATION : copyTexImage2D should fail for good internalformat with unmatched component sizes RG8UI
[ 80: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 81: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : copyTexImage2D should fail for good internalformat with unmatched component sizes RG16UI
+[ 81: PASS ] getError was expected value: INVALID_OPERATION : copyTexImage2D should fail for good internalformat with unmatched component sizes RG16UI
[ 82: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 83: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : copyTexImage2D should fail for good internalformat with unmatched component sizes RGB10_A2UI
+[ 83: PASS ] getError was expected value: INVALID_OPERATION : copyTexImage2D should fail for good internalformat with unmatched component sizes RGB10_A2UI
[ 84: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 85: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : copyTexImage2D should fail for good internalformat with unmatched component sizes RGBA8UI
+[ 85: PASS ] getError was expected value: INVALID_OPERATION : copyTexImage2D should fail for good internalformat with unmatched component sizes RGBA8UI
[ 86: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 87: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM : copyTexImage2D should fail for good internalformat with unmatched component sizes RGBA16UI
+[ 87: PASS ] getError was expected value: INVALID_OPERATION : copyTexImage2D should fail for good internalformat with unmatched component sizes RGBA16UI
[ 88: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 89: PASS ] getError was expected value: INVALID_ENUM : copyTexImage2D should fail for bad internalformat R8_SNORM
+[ 89: FAIL ] getError expected: INVALID_ENUM. Was INVALID_OPERATION : copyTexImage2D should fail for bad internalformat R8_SNORM
[ 90: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 91: PASS ] getError was expected value: INVALID_ENUM : copyTexImage2D should fail for bad internalformat RG8_SNORM
+[ 91: FAIL ] getError expected: INVALID_ENUM. Was INVALID_OPERATION : copyTexImage2D should fail for bad internalformat RG8_SNORM
[ 92: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 93: PASS ] getError was expected value: INVALID_ENUM : copyTexImage2D should fail for bad internalformat RGB8_SNORM
+[ 93: FAIL ] getError expected: INVALID_ENUM. Was INVALID_OPERATION : copyTexImage2D should fail for bad internalformat RGB8_SNORM
[ 94: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 95: PASS ] getError was expected value: INVALID_ENUM : copyTexImage2D should fail for bad internalformat RGBA8_SNORM
+[ 95: FAIL ] getError expected: INVALID_ENUM. Was INVALID_OPERATION : copyTexImage2D should fail for bad internalformat RGBA8_SNORM
[ 96: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 97: PASS ] getError was expected value: INVALID_ENUM : copyTexImage2D should fail for bad internalformat RGB8I
+[ 97: FAIL ] getError expected: INVALID_ENUM. Was INVALID_OPERATION : copyTexImage2D should fail for bad internalformat RGB8I
[ 98: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 99: PASS ] getError was expected value: INVALID_ENUM : copyTexImage2D should fail for bad internalformat RGB16I
+[ 99: FAIL ] getError expected: INVALID_ENUM. Was INVALID_OPERATION : copyTexImage2D should fail for bad internalformat RGB16I
[ 100: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 101: PASS ] getError was expected value: INVALID_ENUM : copyTexImage2D should fail for bad internalformat RGB32I
+[ 101: FAIL ] getError expected: INVALID_ENUM. Was NO_ERROR : copyTexImage2D should fail for bad internalformat RGB32I
[ 102: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 103: PASS ] getError was expected value: INVALID_ENUM : copyTexImage2D should fail for bad internalformat RGB8UI
+[ 103: FAIL ] getError expected: INVALID_ENUM. Was INVALID_OPERATION : copyTexImage2D should fail for bad internalformat RGB8UI
[ 104: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 105: PASS ] getError was expected value: INVALID_ENUM : copyTexImage2D should fail for bad internalformat RGB16UI
+[ 105: FAIL ] getError expected: INVALID_ENUM. Was INVALID_OPERATION : copyTexImage2D should fail for bad internalformat RGB16UI
[ 106: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 107: PASS ] getError was expected value: INVALID_ENUM : copyTexImage2D should fail for bad internalformat RGB32UI
+[ 107: FAIL ] getError expected: INVALID_ENUM. Was NO_ERROR : copyTexImage2D should fail for bad internalformat RGB32UI
[ 108: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 109: PASS ] getError was expected value: INVALID_ENUM : copyTexImage2D should fail for bad internalformat DEPTH_COMPONENT16
+[ 109: FAIL ] getError expected: INVALID_ENUM. Was INVALID_OPERATION : copyTexImage2D should fail for bad internalformat DEPTH_COMPONENT16
[ 110: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 111: PASS ] getError was expected value: INVALID_ENUM : copyTexImage2D should fail for bad internalformat DEPTH_COMPONENT24
+[ 111: FAIL ] getError expected: INVALID_ENUM. Was INVALID_OPERATION : copyTexImage2D should fail for bad internalformat DEPTH_COMPONENT24
[ 112: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 113: PASS ] getError was expected value: INVALID_ENUM : copyTexImage2D should fail for bad internalformat DEPTH_COMPONENT32F
+[ 113: FAIL ] getError expected: INVALID_ENUM. Was INVALID_OPERATION : copyTexImage2D should fail for bad internalformat DEPTH_COMPONENT32F
[ 114: PASS ] checkFramebufferStatus got FRAMEBUFFER_COMPLETE as expected
-[ 115: PASS ] getError was expected value: INVALID_ENUM : copyTexImage2D should fail for bad internalformat DEPTH24_STENCIL8
+[ 115: FAIL ] getError expected: INVALID_ENUM. Was INVALID_OPERATION : copyTexImage2D should fail for bad internalformat DEPTH24_STENCIL8
[ 116: PASS ] successfullyParsed is true
-[ FAIL ] 33 failures reported
+[ FAIL ] 14 failures reported
Modified: trunk/LayoutTests/webgl/2.0.0/conformance2/textures/misc/tex-mipmap-levels-expected.txt (260907 => 260908)
--- trunk/LayoutTests/webgl/2.0.0/conformance2/textures/misc/tex-mipmap-levels-expected.txt 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/LayoutTests/webgl/2.0.0/conformance2/textures/misc/tex-mipmap-levels-expected.txt 2020-04-29 19:01:50 UTC (rev 260908)
@@ -10,9 +10,9 @@
[ 7: PASS ] getError was expected value: NO_ERROR : texParameter(TEXTURE_MAG_FILTER) should succeed
[ 8: PASS ] getError was expected value: NO_ERROR : texParameter(TEXTURE_MIN_FILTER) should succeed
[ 9: PASS ] getError was expected value: NO_ERROR : clearAndDrawQuad should succeed
-[ 10: FAIL ] should draw with [0, 0, 255, 255] at (0, 0) expected: 0,0,255,255 was 0,0,0,255
+[ 10: FAIL ] filling partial levels: should draw with [0, 0, 255, 255] at (0, 0) expected: 0,0,255,255 was 0,0,0,255
[ 11: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : generateMipmap should succeed
-[ 12: FAIL ] should draw with [255, 0, 0, 255] at (0, 0) expected: 255,0,0,255 was 0,0,0,255
+[ 12: FAIL ] generateMipmap with partial levels: should draw with [255, 0, 0, 255] at (0, 0) expected: 255,0,0,255 was 0,0,0,255
[ 13: PASS ] getError was expected value: NO_ERROR : fillTexture(8x8, level=2) should succeed
[ 14: PASS ] getError was expected value: NO_ERROR : fillTexture(4x4, level=3) should succeed
[ 15: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : texParameter(TEXTURE_BASE_LEVEL) should succeed
@@ -29,15 +29,18 @@
[ 26: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : texSubImage3D should succeed
[ 27: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : generateMipmap should succeed
[ 28: PASS ] getError was expected value: NO_ERROR : texSubImage3D should succeed
-[ 29: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : generateMipmap should succeed for zero-size texture
+[ 29: PASS ] getError was expected value: INVALID_OPERATION : generateMipmap should fail for zero-size texture
[ 30: PASS ] getError was expected value: NO_ERROR : generateMipmap should succeed
[ 31: PASS ] getError was expected value: INVALID_OPERATION : generateMipmap should fail for non-texture-filterable format
-[ 32: PASS ] getError was expected value: NO_ERROR : texParameter(TEXTURE_MAG_FILTER) should succeed
-[ 33: PASS ] getError was expected value: NO_ERROR : texParameter(TEXTURE_MIN_FILTER) should succeed
-[ 34: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : texParameter(TEXTURE_BASE_LEVEL) should succeed
-[ 35: PASS ] getError was expected value: NO_ERROR : texStorage2D should succeed
-[ 36: PASS ] getError was expected value: NO_ERROR : clearAndDrawQuad should succeed
-[ 37: FAIL ] should draw with [255, 0, 0, 255] at (0, 0) expected: 255,0,0,255 was 0,0,0,255
-[ 38: PASS ] successfullyParsed is true
-[ FAIL ] 15 failures reported
+[ 32: PASS ] getError was expected value: INVALID_OPERATION : generateMipmap should fail for float texture
+[ 33: PASS ] getError was expected value: INVALID_OPERATION : generateMipmap should fail for zero-size texture
+[ 34: PASS ] getError was expected value: NO_ERROR : generateMipmap should succeed
+[ 35: PASS ] getError was expected value: NO_ERROR : texParameter(TEXTURE_MAG_FILTER) should succeed
+[ 36: PASS ] getError was expected value: NO_ERROR : texParameter(TEXTURE_MIN_FILTER) should succeed
+[ 37: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : texParameter(TEXTURE_BASE_LEVEL) should succeed
+[ 38: PASS ] getError was expected value: NO_ERROR : texStorage2D should succeed
+[ 39: PASS ] getError was expected value: NO_ERROR : clearAndDrawQuad should succeed
+[ 40: FAIL ] non-zero base level texStorage2D: should draw with [255, 0, 0, 255] at (0, 0) expected: 255,0,0,255 was 0,0,0,255
+[ 41: PASS ] successfullyParsed is true
+[ FAIL ] 14 failures reported
Modified: trunk/LayoutTests/webgl/2.0.0/resources/webgl_test_files/conformance2/textures/misc/tex-mipmap-levels.html (260907 => 260908)
--- trunk/LayoutTests/webgl/2.0.0/resources/webgl_test_files/conformance2/textures/misc/tex-mipmap-levels.html 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/LayoutTests/webgl/2.0.0/resources/webgl_test_files/conformance2/textures/misc/tex-mipmap-levels.html 2020-04-29 19:01:50 UTC (rev 260908)
@@ -123,13 +123,13 @@
wtu.glErrorShouldBe(gl, gl.NO_ERROR, "texParameter(TEXTURE_MIN_FILTER) should succeed");
wtu.clearAndDrawUnitQuad(gl);
wtu.glErrorShouldBe(gl, gl.NO_ERROR, "clearAndDrawQuad should succeed");
- wtu.checkCanvas(gl, [0, 0, 255, 255], "should draw with [0, 0, 255, 255]");
+ wtu.checkCanvas(gl, [0, 0, 255, 255], "filling partial levels: should draw with [0, 0, 255, 255]");
// Test that generateMipmap works with partial levels.
gl.generateMipmap(gl.TEXTURE_2D);
wtu.glErrorShouldBe(gl, gl.NO_ERROR, "generateMipmap should succeed");
wtu.clearAndDrawUnitQuad(gl);
- wtu.checkCanvas(gl, [255, 0, 0, 255], "should draw with [255, 0, 0, 255]");
+ wtu.checkCanvas(gl, [255, 0, 0, 255], "generateMipmap with partial levels: should draw with [255, 0, 0, 255]");
gl.deleteTexture(tex);
// Test incompleteless for partial levels.
@@ -191,7 +191,7 @@
gl.bindTexture(gl.TEXTURE_2D, tex);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA8, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
gl.generateMipmap(gl.TEXTURE_2D);
- wtu.glErrorShouldBe(gl, gl.NO_ERROR, "generateMipmap should succeed for zero-size texture");
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "generateMipmap should fail for zero-size texture");
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA8, 8, 8, 0, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(8 * 8 * 4));
gl.generateMipmap(gl.TEXTURE_2D);
wtu.glErrorShouldBe(gl, gl.NO_ERROR, "generateMipmap should succeed");
@@ -206,7 +206,7 @@
if (gl.getExtension('EXT_color_buffer_float') && gl.getExtension('OES_texture_float_linear')) {
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA32F, 0, 0, 0, gl.RGBA, gl.FLOAT, null);
gl.generateMipmap(gl.TEXTURE_2D);
- wtu.glErrorShouldBe(gl, gl.NO_ERROR, "generateMipmap should succeed for zero-size texture");
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "generateMipmap should fail for zero-size texture");
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA32F, 8, 8, 0, gl.RGBA, gl.FLOAT, new Float32Array(8 * 8 * 4));
gl.generateMipmap(gl.TEXTURE_2D);
wtu.glErrorShouldBe(gl, gl.NO_ERROR, "generateMipmap should succeed");
@@ -232,7 +232,7 @@
wtu.glErrorShouldBe(gl, gl.NO_ERROR, "texStorage2D should succeed");
wtu.clearAndDrawUnitQuad(gl);
wtu.glErrorShouldBe(gl, gl.NO_ERROR, "clearAndDrawQuad should succeed");
- wtu.checkCanvas(gl, [255, 0, 0, 255], "should draw with [255, 0, 0, 255]");
+ wtu.checkCanvas(gl, [255, 0, 0, 255], "non-zero base level texStorage2D: should draw with [255, 0, 0, 255]");
gl.deleteTexture(tex);
})();
Modified: trunk/Source/WebCore/CMakeLists.txt (260907 => 260908)
--- trunk/Source/WebCore/CMakeLists.txt 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/CMakeLists.txt 2020-04-29 19:01:50 UTC (rev 260908)
@@ -1327,6 +1327,8 @@
list(APPEND WebCore_SOURCES
html/canvas/ANGLEInstancedArrays.cpp
html/canvas/EXTBlendMinMax.cpp
+ html/canvas/EXTColorBufferFloat.cpp
+ html/canvas/EXTColorBufferHalfFloat.cpp
html/canvas/EXTFragDepth.cpp
html/canvas/EXTShaderTextureLOD.cpp
html/canvas/EXTTextureFilterAnisotropic.cpp
@@ -1340,6 +1342,7 @@
html/canvas/OESVertexArrayObject.cpp
html/canvas/WebGL2RenderingContext.cpp
html/canvas/WebGLBuffer.cpp
+ html/canvas/WebGLColorBufferFloat.cpp
html/canvas/WebGLCompressedTextureASTC.cpp
html/canvas/WebGLCompressedTextureATC.cpp
html/canvas/WebGLCompressedTextureETC.cpp
@@ -1377,6 +1380,8 @@
list(APPEND WebCore_IDL_FILES
html/canvas/ANGLEInstancedArrays.idl
html/canvas/EXTBlendMinMax.idl
+ html/canvas/EXTColorBufferFloat.idl
+ html/canvas/EXTColorBufferHalfFloat.idl
html/canvas/EXTFragDepth.idl
html/canvas/EXTShaderTextureLOD.idl
html/canvas/EXTTextureFilterAnisotropic.idl
@@ -1391,6 +1396,7 @@
html/canvas/WebGL2RenderingContext.idl
html/canvas/WebGLActiveInfo.idl
html/canvas/WebGLBuffer.idl
+ html/canvas/WebGLColorBufferFloat.idl
html/canvas/WebGLCompressedTextureASTC.idl
html/canvas/WebGLCompressedTextureATC.idl
html/canvas/WebGLCompressedTextureETC.idl
Modified: trunk/Source/WebCore/ChangeLog (260907 => 260908)
--- trunk/Source/WebCore/ChangeLog 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/ChangeLog 2020-04-29 19:01:50 UTC (rev 260908)
@@ -1,3 +1,83 @@
+2020-04-29 Kenneth Russell <[email protected]>
+
+ REGRESSION (r256784?): Shadertoy demo no longer works in Safari
+ https://bugs.webkit.org/show_bug.cgi?id=210994
+
+ Reviewed by Dean Jackson.
+
+ Certain Shadertoy examples stopped working with the ANGLE backend
+ for WebGL because rendering to floating-point render targets was
+ no longer being enabled implicitly along with the
+ OES_texture_float extension.
+
+ Add support for the WebGL 1.0 extensions
+ EXT_color_buffer_half_float and WEBGL_color_buffer_float, and the
+ WebGL 2.0 extension EXT_color_buffer_float. Enable these
+ implicitly for WebGL 1.0 in the OES_texture_float and
+ OES_texture_half_float extensions, restoring the previous
+ functionality.
+
+ Translate 32-bit floating point texture formats appropriately for
+ the ANGLE backend. Fix some failures in previously-skipped
+ conformance tests. The new code passes the more stringent
+ top-of-tree WebGL 1.0.4 and 2.0.1 conformance tests related to
+ floating-point texture renderability, which are not yet in the
+ WebKit repository.
+
+ * CMakeLists.txt:
+ * DerivedSources-input.xcfilelist:
+ * DerivedSources-output.xcfilelist:
+ * DerivedSources.make:
+ * Sources.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSDOMConvertWebGL.cpp:
+ (WebCore::convertToJSValue):
+ * html/canvas/EXTColorBufferFloat.cpp: Copied from Source/WebCore/html/canvas/OESTextureHalfFloat.cpp.
+ (WebCore::EXTColorBufferFloat::EXTColorBufferFloat):
+ (WebCore::EXTColorBufferFloat::getName const):
+ (WebCore::EXTColorBufferFloat::supported):
+ * html/canvas/EXTColorBufferFloat.h: Copied from Source/WebCore/html/canvas/OESTextureFloat.h.
+ * html/canvas/EXTColorBufferFloat.idl: Added.
+ * html/canvas/EXTColorBufferHalfFloat.cpp: Copied from Source/WebCore/html/canvas/OESTextureFloat.cpp.
+ (WebCore::EXTColorBufferHalfFloat::EXTColorBufferHalfFloat):
+ (WebCore::EXTColorBufferHalfFloat::getName const):
+ (WebCore::EXTColorBufferHalfFloat::supported):
+ * html/canvas/EXTColorBufferHalfFloat.h: Copied from Source/WebCore/html/canvas/OESTextureFloat.h.
+ * html/canvas/EXTColorBufferHalfFloat.idl: Added.
+ * html/canvas/OESTextureFloat.cpp:
+ (WebCore::OESTextureFloat::OESTextureFloat):
+ (WebCore::OESTextureFloat::supported):
+ * html/canvas/OESTextureFloat.h:
+ * html/canvas/OESTextureHalfFloat.cpp:
+ (WebCore::OESTextureHalfFloat::OESTextureHalfFloat):
+ (WebCore::OESTextureHalfFloat::supported):
+ * html/canvas/OESTextureHalfFloat.h:
+ * html/canvas/WebGL2RenderingContext.cpp:
+ (WebCore::WebGL2RenderingContext::getExtension):
+ (WebCore::WebGL2RenderingContext::getSupportedExtensions):
+ (WebCore::WebGL2RenderingContext::getParameter):
+ * html/canvas/WebGLColorBufferFloat.cpp: Copied from Source/WebCore/html/canvas/OESTextureFloat.cpp.
+ (WebCore::WebGLColorBufferFloat::WebGLColorBufferFloat):
+ (WebCore::WebGLColorBufferFloat::getName const):
+ (WebCore::WebGLColorBufferFloat::supported):
+ * html/canvas/WebGLColorBufferFloat.h: Copied from Source/WebCore/html/canvas/OESTextureFloat.h.
+ * html/canvas/WebGLColorBufferFloat.idl: Added.
+ * html/canvas/WebGLExtension.h:
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::getExtension):
+ (WebCore::WebGLRenderingContext::getSupportedExtensions):
+ (WebCore::WebGLRenderingContext::getParameter):
+ * html/canvas/WebGLRenderingContextBase.cpp:
+ (WebCore::WebGLRenderingContextBase::extensionIsEnabled):
+ (WebCore::WebGLRenderingContextBase::copyTexImage2D):
+ * html/canvas/WebGLRenderingContextBase.h:
+ * platform/graphics/angle/ExtensionsGLANGLE.cpp:
+ (WebCore::ExtensionsGLANGLE::adjustWebGL1TextureInternalFormat):
+ (WebCore::ExtensionsGLANGLE::texImage2DRobustANGLE):
+ * platform/graphics/angle/ExtensionsGLANGLE.h:
+ * platform/graphics/angle/GraphicsContextGLANGLE.cpp:
+ (WebCore::GraphicsContextGLOpenGL::texImage2DDirect):
+
2020-04-29 Zalan Bujtas <[email protected]>
Header is blank on https://nader.org
Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (260907 => 260908)
--- trunk/Source/WebCore/DerivedSources-input.xcfilelist 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/DerivedSources-input.xcfilelist 2020-04-29 19:01:50 UTC (rev 260908)
@@ -830,6 +830,8 @@
$(PROJECT_DIR)/html/canvas/CanvasTransform.idl
$(PROJECT_DIR)/html/canvas/CanvasUserInterface.idl
$(PROJECT_DIR)/html/canvas/EXTBlendMinMax.idl
+$(PROJECT_DIR)/html/canvas/EXTColorBufferFloat.idl
+$(PROJECT_DIR)/html/canvas/EXTColorBufferHalfFloat.idl
$(PROJECT_DIR)/html/canvas/EXTFragDepth.idl
$(PROJECT_DIR)/html/canvas/EXTShaderTextureLOD.idl
$(PROJECT_DIR)/html/canvas/EXTTextureFilterAnisotropic.idl
@@ -850,6 +852,7 @@
$(PROJECT_DIR)/html/canvas/WebGL2RenderingContext.idl
$(PROJECT_DIR)/html/canvas/WebGLActiveInfo.idl
$(PROJECT_DIR)/html/canvas/WebGLBuffer.idl
+$(PROJECT_DIR)/html/canvas/WebGLColorBufferFloat.idl
$(PROJECT_DIR)/html/canvas/WebGLCompressedTextureASTC.idl
$(PROJECT_DIR)/html/canvas/WebGLCompressedTextureATC.idl
$(PROJECT_DIR)/html/canvas/WebGLCompressedTextureETC.idl
Modified: trunk/Source/WebCore/DerivedSources-output.xcfilelist (260907 => 260908)
--- trunk/Source/WebCore/DerivedSources-output.xcfilelist 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/DerivedSources-output.xcfilelist 2020-04-29 19:01:50 UTC (rev 260908)
@@ -510,6 +510,10 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDynamicsCompressorNode.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSEXTBlendMinMax.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSEXTBlendMinMax.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSEXTColorBufferFloat.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSEXTColorBufferFloat.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSEXTColorBufferHalfFloat.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSEXTColorBufferHalfFloat.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSEXTFragDepth.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSEXTFragDepth.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSEXTShaderTextureLOD.cpp
@@ -1938,6 +1942,8 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGLActiveInfo.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGLBuffer.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGLBuffer.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGLColorBufferFloat.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGLColorBufferFloat.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGLCompressedTextureASTC.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGLCompressedTextureASTC.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGLCompressedTextureATC.cpp
Modified: trunk/Source/WebCore/DerivedSources.make (260907 => 260908)
--- trunk/Source/WebCore/DerivedSources.make 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/DerivedSources.make 2020-04-29 19:01:50 UTC (rev 260908)
@@ -833,6 +833,8 @@
$(WebCore)/html/canvas/CanvasTransform.idl \
$(WebCore)/html/canvas/CanvasUserInterface.idl \
$(WebCore)/html/canvas/EXTBlendMinMax.idl \
+ $(WebCore)/html/canvas/EXTColorBufferFloat.idl \
+ $(WebCore)/html/canvas/EXTColorBufferHalfFloat.idl \
$(WebCore)/html/canvas/EXTFragDepth.idl \
$(WebCore)/html/canvas/EXTShaderTextureLOD.idl \
$(WebCore)/html/canvas/EXTTextureFilterAnisotropic.idl \
@@ -853,6 +855,7 @@
$(WebCore)/html/canvas/WebGL2RenderingContext.idl \
$(WebCore)/html/canvas/WebGLActiveInfo.idl \
$(WebCore)/html/canvas/WebGLBuffer.idl \
+ $(WebCore)/html/canvas/WebGLColorBufferFloat.idl \
$(WebCore)/html/canvas/WebGLCompressedTextureASTC.idl \
$(WebCore)/html/canvas/WebGLCompressedTextureATC.idl \
$(WebCore)/html/canvas/WebGLCompressedTextureETC.idl \
Modified: trunk/Source/WebCore/Sources.txt (260907 => 260908)
--- trunk/Source/WebCore/Sources.txt 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/Sources.txt 2020-04-29 19:01:50 UTC (rev 260908)
@@ -1291,6 +1291,8 @@
html/canvas/CanvasRenderingContext2DBase.cpp
html/canvas/CanvasStyle.cpp
html/canvas/EXTBlendMinMax.cpp
+html/canvas/EXTColorBufferFloat.cpp
+html/canvas/EXTColorBufferHalfFloat.cpp
html/canvas/EXTFragDepth.cpp
html/canvas/EXTShaderTextureLOD.cpp
html/canvas/EXTsRGB.cpp
@@ -1310,6 +1312,7 @@
html/canvas/PlaceholderRenderingContext.cpp
html/canvas/WebGL2RenderingContext.cpp
html/canvas/WebGLBuffer.cpp
+html/canvas/WebGLColorBufferFloat.cpp
html/canvas/WebGLCompressedTextureASTC.cpp
html/canvas/WebGLCompressedTextureATC.cpp
html/canvas/WebGLCompressedTextureETC.cpp
@@ -3636,6 +3639,8 @@
JSANGLEInstancedArrays.cpp
JSEXTBlendMinMax.cpp
+JSEXTColorBufferFloat.cpp
+JSEXTColorBufferHalfFloat.cpp
JSEXTFragDepth.cpp
JSEXTShaderTextureLOD.cpp
JSEXTTextureFilterAnisotropic.cpp
@@ -3650,6 +3655,7 @@
JSWebGL2RenderingContext.cpp
JSWebGLActiveInfo.cpp
JSWebGLBuffer.cpp
+JSWebGLColorBufferFloat.cpp
JSWebGLCompressedTextureASTC.cpp
JSWebGLCompressedTextureATC.cpp
JSWebGLCompressedTextureETC.cpp
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (260907 => 260908)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-04-29 19:01:50 UTC (rev 260908)
@@ -9374,6 +9374,15 @@
6E4ABCD3138EA0B70071D291 /* JSHTMLUnknownElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLUnknownElement.h; sourceTree = "<group>"; };
6E4E91AA10F7FB3100A2779C /* WebGLContextAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLContextAttributes.h; sourceTree = "<group>"; };
6E4E91AB10F7FB3100A2779C /* WebGLContextAttributes.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebGLContextAttributes.idl; sourceTree = "<group>"; };
+ 6E5388D82458AE180076AE03 /* EXTColorBufferFloat.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = EXTColorBufferFloat.idl; sourceTree = "<group>"; };
+ 6E5388DA2458AE190076AE03 /* EXTColorBufferHalfFloat.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = EXTColorBufferHalfFloat.cpp; sourceTree = "<group>"; };
+ 6E5388DB2458AE1A0076AE03 /* WebGLColorBufferFloat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGLColorBufferFloat.h; sourceTree = "<group>"; };
+ 6E5388DC2458AE1B0076AE03 /* EXTColorBufferFloat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EXTColorBufferFloat.h; sourceTree = "<group>"; };
+ 6E5388DD2458AE1B0076AE03 /* EXTColorBufferFloat.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = EXTColorBufferFloat.cpp; sourceTree = "<group>"; };
+ 6E5388DE2458AE1C0076AE03 /* EXTColorBufferHalfFloat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EXTColorBufferHalfFloat.h; sourceTree = "<group>"; };
+ 6E5388DF2458AE1C0076AE03 /* EXTColorBufferHalfFloat.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = EXTColorBufferHalfFloat.idl; sourceTree = "<group>"; };
+ 6E5388E02458AE1D0076AE03 /* WebGLColorBufferFloat.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGLColorBufferFloat.cpp; sourceTree = "<group>"; };
+ 6E5388E12458AE1D0076AE03 /* WebGLColorBufferFloat.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGLColorBufferFloat.idl; sourceTree = "<group>"; };
6E67D2A41280E8A4008758F7 /* ExtensionsGLOpenGL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExtensionsGLOpenGL.cpp; sourceTree = "<group>"; };
6E67D2A51280E8A4008758F7 /* ExtensionsGLOpenGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtensionsGLOpenGL.h; sourceTree = "<group>"; };
6E67D2A81280E8BD008758F7 /* ExtensionsGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtensionsGL.h; sourceTree = "<group>"; };
@@ -18833,6 +18842,12 @@
724ED3291A3A7E5400F5F13C /* EXTBlendMinMax.cpp */,
724ED32A1A3A7E5400F5F13C /* EXTBlendMinMax.h */,
724ED32B1A3A7E5400F5F13C /* EXTBlendMinMax.idl */,
+ 6E5388DD2458AE1B0076AE03 /* EXTColorBufferFloat.cpp */,
+ 6E5388DC2458AE1B0076AE03 /* EXTColorBufferFloat.h */,
+ 6E5388D82458AE180076AE03 /* EXTColorBufferFloat.idl */,
+ 6E5388DA2458AE190076AE03 /* EXTColorBufferHalfFloat.cpp */,
+ 6E5388DE2458AE1C0076AE03 /* EXTColorBufferHalfFloat.h */,
+ 6E5388DF2458AE1C0076AE03 /* EXTColorBufferHalfFloat.idl */,
72F1AD9F1A3904C300014E18 /* EXTFragDepth.cpp */,
72F1ADA01A3904C300014E18 /* EXTFragDepth.h */,
72F1ADA11A3904C300014E18 /* EXTFragDepth.idl */,
@@ -18895,6 +18910,9 @@
49C7B9A81042D32E0009D447 /* WebGLBuffer.cpp */,
49C7B9A91042D32E0009D447 /* WebGLBuffer.h */,
49C7B9AA1042D32E0009D447 /* WebGLBuffer.idl */,
+ 6E5388E02458AE1D0076AE03 /* WebGLColorBufferFloat.cpp */,
+ 6E5388DB2458AE1A0076AE03 /* WebGLColorBufferFloat.h */,
+ 6E5388E12458AE1D0076AE03 /* WebGLColorBufferFloat.idl */,
D0A20D562092A0A600E0C259 /* WebGLCompressedTextureASTC.cpp */,
D0A20D542092A0A600E0C259 /* WebGLCompressedTextureASTC.h */,
D036DD8D208FFC0C00F9F4B2 /* WebGLCompressedTextureASTC.idl */,
Modified: trunk/Source/WebCore/bindings/js/JSDOMConvertWebGL.cpp (260907 => 260908)
--- trunk/Source/WebCore/bindings/js/JSDOMConvertWebGL.cpp 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertWebGL.cpp 2020-04-29 19:01:50 UTC (rev 260908)
@@ -31,6 +31,8 @@
#include "JSANGLEInstancedArrays.h"
#include "JSDOMConvertBufferSource.h"
#include "JSEXTBlendMinMax.h"
+#include "JSEXTColorBufferFloat.h"
+#include "JSEXTColorBufferHalfFloat.h"
#include "JSEXTFragDepth.h"
#include "JSEXTShaderTextureLOD.h"
#include "JSEXTTextureFilterAnisotropic.h"
@@ -43,6 +45,7 @@
#include "JSOESTextureHalfFloatLinear.h"
#include "JSOESVertexArrayObject.h"
#include "JSWebGLBuffer.h"
+#include "JSWebGLColorBufferFloat.h"
#include "JSWebGLCompressedTextureASTC.h"
#include "JSWebGLCompressedTextureATC.h"
#include "JSWebGLCompressedTextureETC.h"
@@ -202,6 +205,12 @@
return toJS(&lexicalGlobalObject, &globalObject, static_cast<WebGLDrawBuffers&>(extension));
case WebGLExtension::ANGLEInstancedArraysName:
return toJS(&lexicalGlobalObject, &globalObject, static_cast<ANGLEInstancedArrays&>(extension));
+ case WebGLExtension::EXTColorBufferHalfFloatName:
+ return toJS(&lexicalGlobalObject, &globalObject, static_cast<EXTColorBufferHalfFloat&>(extension));
+ case WebGLExtension::WebGLColorBufferFloatName:
+ return toJS(&lexicalGlobalObject, &globalObject, static_cast<WebGLColorBufferFloat&>(extension));
+ case WebGLExtension::EXTColorBufferFloatName:
+ return toJS(&lexicalGlobalObject, &globalObject, static_cast<EXTColorBufferFloat&>(extension));
}
ASSERT_NOT_REACHED();
return jsNull();
Copied: trunk/Source/WebCore/html/canvas/EXTColorBufferFloat.cpp (from rev 260907, trunk/Source/WebCore/html/canvas/OESTextureHalfFloat.cpp) (0 => 260908)
--- trunk/Source/WebCore/html/canvas/EXTColorBufferFloat.cpp (rev 0)
+++ trunk/Source/WebCore/html/canvas/EXTColorBufferFloat.cpp 2020-04-29 19:01:50 UTC (rev 260908)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2020 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(WEBGL)
+#include "EXTColorBufferFloat.h"
+
+#include "ExtensionsGL.h"
+
+namespace WebCore {
+
+EXTColorBufferFloat::EXTColorBufferFloat(WebGLRenderingContextBase& context)
+ : WebGLExtension(context)
+{
+ context.graphicsContextGL()->getExtensions().ensureEnabled("GL_EXT_color_buffer_float"_s);
+ // https://github.com/KhronosGroup/WebGL/pull/2830
+ // Spec requires EXT_float_blend to be turned on implicitly here.
+ context.graphicsContextGL()->getExtensions().ensureEnabled("GL_EXT_float_blend"_s);
+}
+
+EXTColorBufferFloat::~EXTColorBufferFloat() = default;
+
+WebGLExtension::ExtensionName EXTColorBufferFloat::getName() const
+{
+ return EXTColorBufferFloatName;
+}
+
+bool EXTColorBufferFloat::supported(const WebGLRenderingContextBase& context)
+{
+ return context.graphicsContextGL()->getExtensions().supports("GL_EXT_color_buffer_float"_s);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEBGL)
Copied: trunk/Source/WebCore/html/canvas/EXTColorBufferFloat.h (from rev 260907, trunk/Source/WebCore/html/canvas/OESTextureHalfFloat.h) (0 => 260908)
--- trunk/Source/WebCore/html/canvas/EXTColorBufferFloat.h (rev 0)
+++ trunk/Source/WebCore/html/canvas/EXTColorBufferFloat.h 2020-04-29 19:01:50 UTC (rev 260908)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2020 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "WebGLExtension.h"
+
+namespace WebCore {
+
+class EXTColorBufferFloat final : public WebGLExtension {
+public:
+ explicit EXTColorBufferFloat(WebGLRenderingContextBase&);
+ virtual ~EXTColorBufferFloat();
+
+ ExtensionName getName() const override;
+
+ static bool supported(const WebGLRenderingContextBase&);
+};
+
+} // namespace WebCore
Added: trunk/Source/WebCore/html/canvas/EXTColorBufferFloat.idl (0 => 260908)
--- trunk/Source/WebCore/html/canvas/EXTColorBufferFloat.idl (rev 0)
+++ trunk/Source/WebCore/html/canvas/EXTColorBufferFloat.idl 2020-04-29 19:01:50 UTC (rev 260908)
@@ -0,0 +1,31 @@
+/*
+* Copyright (C) 2020 Google Inc. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* 1. Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* 2. Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in the
+* documentation and/or other materials provided with the distribution.
+*
+* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+[
+ NoInterfaceObject,
+ Conditional=WEBGL,
+ GenerateIsReachable=ImplWebGLRenderingContext
+] interface EXTColorBufferFloat {
+};
Copied: trunk/Source/WebCore/html/canvas/EXTColorBufferHalfFloat.cpp (from rev 260907, trunk/Source/WebCore/html/canvas/OESTextureFloat.cpp) (0 => 260908)
--- trunk/Source/WebCore/html/canvas/EXTColorBufferHalfFloat.cpp (rev 0)
+++ trunk/Source/WebCore/html/canvas/EXTColorBufferHalfFloat.cpp 2020-04-29 19:01:50 UTC (rev 260908)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2020 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(WEBGL)
+#include "EXTColorBufferHalfFloat.h"
+
+#include "ExtensionsGL.h"
+
+namespace WebCore {
+
+EXTColorBufferHalfFloat::EXTColorBufferHalfFloat(WebGLRenderingContextBase& context)
+ : WebGLExtension(context)
+{
+ context.graphicsContextGL()->getExtensions().ensureEnabled("GL_EXT_color_buffer_half_float"_s);
+}
+
+EXTColorBufferHalfFloat::~EXTColorBufferHalfFloat() = default;
+
+WebGLExtension::ExtensionName EXTColorBufferHalfFloat::getName() const
+{
+ return EXTColorBufferHalfFloatName;
+}
+
+bool EXTColorBufferHalfFloat::supported(const WebGLRenderingContextBase& context)
+{
+ return context.graphicsContextGL()->getExtensions().supports("GL_OES_texture_half_float"_s)
+ && context.graphicsContextGL()->getExtensions().supports("GL_EXT_color_buffer_half_float"_s);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEBGL)
Copied: trunk/Source/WebCore/html/canvas/EXTColorBufferHalfFloat.h (from rev 260907, trunk/Source/WebCore/html/canvas/OESTextureHalfFloat.h) (0 => 260908)
--- trunk/Source/WebCore/html/canvas/EXTColorBufferHalfFloat.h (rev 0)
+++ trunk/Source/WebCore/html/canvas/EXTColorBufferHalfFloat.h 2020-04-29 19:01:50 UTC (rev 260908)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2020 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "WebGLExtension.h"
+
+namespace WebCore {
+
+class EXTColorBufferHalfFloat final : public WebGLExtension {
+public:
+ explicit EXTColorBufferHalfFloat(WebGLRenderingContextBase&);
+ virtual ~EXTColorBufferHalfFloat();
+
+ ExtensionName getName() const override;
+
+ static bool supported(const WebGLRenderingContextBase&);
+};
+
+} // namespace WebCore
Added: trunk/Source/WebCore/html/canvas/EXTColorBufferHalfFloat.idl (0 => 260908)
--- trunk/Source/WebCore/html/canvas/EXTColorBufferHalfFloat.idl (rev 0)
+++ trunk/Source/WebCore/html/canvas/EXTColorBufferHalfFloat.idl 2020-04-29 19:01:50 UTC (rev 260908)
@@ -0,0 +1,35 @@
+/*
+* Copyright (C) 2020 Google Inc. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* 1. Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* 2. Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in the
+* documentation and/or other materials provided with the distribution.
+*
+* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+[
+ NoInterfaceObject,
+ Conditional=WEBGL,
+ GenerateIsReachable=ImplWebGLRenderingContext
+] interface EXTColorBufferHalfFloat {
+ const unsigned long RGBA16F_EXT = 0x881A;
+ const unsigned long RGB16F_EXT = 0x881B;
+ const unsigned long FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211;
+ const unsigned long UNSIGNED_NORMALIZED_EXT = 0x8C17;
+};
Modified: trunk/Source/WebCore/html/canvas/OESTextureFloat.cpp (260907 => 260908)
--- trunk/Source/WebCore/html/canvas/OESTextureFloat.cpp 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/html/canvas/OESTextureFloat.cpp 2020-04-29 19:01:50 UTC (rev 260908)
@@ -26,14 +26,18 @@
#include "config.h"
#if ENABLE(WEBGL)
-
#include "OESTextureFloat.h"
+#include "ExtensionsGL.h"
+
namespace WebCore {
OESTextureFloat::OESTextureFloat(WebGLRenderingContextBase& context)
: WebGLExtension(context)
{
+ context.graphicsContextGL()->getExtensions().ensureEnabled("GL_OES_texture_float"_s);
+ context.graphicsContextGL()->getExtensions().ensureEnabled("GL_CHROMIUM_color_buffer_float_rgb"_s);
+ context.graphicsContextGL()->getExtensions().ensureEnabled("GL_CHROMIUM_color_buffer_float_rgba"_s);
}
OESTextureFloat::~OESTextureFloat() = default;
@@ -43,6 +47,11 @@
return OESTextureFloatName;
}
+bool OESTextureFloat::supported(const WebGLRenderingContextBase& context)
+{
+ return context.graphicsContextGL()->getExtensions().supports("GL_OES_texture_float"_s);
+}
+
} // namespace WebCore
#endif // ENABLE(WEBGL)
Modified: trunk/Source/WebCore/html/canvas/OESTextureFloat.h (260907 => 260908)
--- trunk/Source/WebCore/html/canvas/OESTextureFloat.h 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/html/canvas/OESTextureFloat.h 2020-04-29 19:01:50 UTC (rev 260908)
@@ -35,6 +35,8 @@
virtual ~OESTextureFloat();
ExtensionName getName() const override;
+
+ static bool supported(const WebGLRenderingContextBase&);
};
} // namespace WebCore
Modified: trunk/Source/WebCore/html/canvas/OESTextureHalfFloat.cpp (260907 => 260908)
--- trunk/Source/WebCore/html/canvas/OESTextureHalfFloat.cpp 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/html/canvas/OESTextureHalfFloat.cpp 2020-04-29 19:01:50 UTC (rev 260908)
@@ -34,6 +34,9 @@
OESTextureHalfFloat::OESTextureHalfFloat(WebGLRenderingContextBase& context)
: WebGLExtension(context)
{
+ context.graphicsContextGL()->getExtensions().ensureEnabled("GL_OES_texture_half_float"_s);
+ // Renderability is implicit when this extension is enabled.
+ context.graphicsContextGL()->getExtensions().ensureEnabled("GL_EXT_color_buffer_half_float"_s);
}
OESTextureHalfFloat::~OESTextureHalfFloat() = default;
@@ -43,6 +46,11 @@
return OESTextureHalfFloatName;
}
+bool OESTextureHalfFloat::supported(const WebGLRenderingContextBase& context)
+{
+ return context.graphicsContextGL()->getExtensions().supports("GL_OES_texture_half_float"_s);
+}
+
} // namespace WebCore
#endif // ENABLE(WEBGL)
Modified: trunk/Source/WebCore/html/canvas/OESTextureHalfFloat.h (260907 => 260908)
--- trunk/Source/WebCore/html/canvas/OESTextureHalfFloat.h 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/html/canvas/OESTextureHalfFloat.h 2020-04-29 19:01:50 UTC (rev 260908)
@@ -35,6 +35,8 @@
virtual ~OESTextureHalfFloat();
ExtensionName getName() const override;
+
+ static bool supported(const WebGLRenderingContextBase&);
};
} // namespace WebCore
Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp (260907 => 260908)
--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp 2020-04-29 19:01:50 UTC (rev 260908)
@@ -29,6 +29,7 @@
#if ENABLE(WEBGL2)
#include "CachedImage.h"
+#include "EXTColorBufferFloat.h"
#include "EXTTextureFilterAnisotropic.h"
#include "EventLoop.h"
#include "ExtensionsGL.h"
@@ -1635,6 +1636,7 @@
ENABLE_IF_REQUESTED(WebGLDepthTexture, m_webglDepthTexture, "WEBGL_depth_texture", WebGLDepthTexture::supported(*graphicsContextGL()));
ENABLE_IF_REQUESTED(WebGLDebugRendererInfo, m_webglDebugRendererInfo, "WEBGL_debug_renderer_info", true);
ENABLE_IF_REQUESTED(WebGLDebugShaders, m_webglDebugShaders, "WEBGL_debug_shaders", m_context->getExtensions().supports("GL_ANGLE_translated_shader_source"_s));
+ ENABLE_IF_REQUESTED(EXTColorBufferFloat, m_extColorBufferFloat, "EXT_color_buffer_float", EXTColorBufferFloat::supported(*this));
return nullptr;
}
@@ -1677,6 +1679,8 @@
if (extensions.supports("GL_ANGLE_translated_shader_source"_s))
result.append("WEBGL_debug_shaders"_s);
result.append("WEBGL_debug_renderer_info"_s);
+ if (EXTColorBufferFloat::supported(*this))
+ result.append("EXT_color_buffer_float"_s);
return result;
}
@@ -2100,9 +2104,16 @@
case GraphicsContextGL::GREEN_BITS:
return getIntParameter(pname);
case GraphicsContextGL::IMPLEMENTATION_COLOR_READ_FORMAT:
- return getIntParameter(pname);
- case GraphicsContextGL::IMPLEMENTATION_COLOR_READ_TYPE:
- return getIntParameter(pname);
+ FALLTHROUGH;
+ case GraphicsContextGL::IMPLEMENTATION_COLOR_READ_TYPE: {
+ int value = getIntParameter(pname);
+ if (!value) {
+ // This indicates the read framebuffer is incomplete and an
+ // INVALID_OPERATION has been generated.
+ return nullptr;
+ }
+ return value;
+ }
case GraphicsContextGL::LINE_WIDTH:
return getFloatParameter(pname);
case GraphicsContextGL::MAX_COMBINED_TEXTURE_IMAGE_UNITS:
Copied: trunk/Source/WebCore/html/canvas/WebGLColorBufferFloat.cpp (from rev 260907, trunk/Source/WebCore/html/canvas/OESTextureFloat.cpp) (0 => 260908)
--- trunk/Source/WebCore/html/canvas/WebGLColorBufferFloat.cpp (rev 0)
+++ trunk/Source/WebCore/html/canvas/WebGLColorBufferFloat.cpp 2020-04-29 19:01:50 UTC (rev 260908)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2020 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(WEBGL)
+#include "WebGLColorBufferFloat.h"
+
+#include "ExtensionsGL.h"
+
+namespace WebCore {
+
+WebGLColorBufferFloat::WebGLColorBufferFloat(WebGLRenderingContextBase& context)
+ : WebGLExtension(context)
+{
+ context.graphicsContextGL()->getExtensions().ensureEnabled("GL_CHROMIUM_color_buffer_float_rgba"_s);
+ // Optimistically enable RGB floating-point render targets also, if possible.
+ context.graphicsContextGL()->getExtensions().ensureEnabled("GL_CHROMIUM_color_buffer_float_rgb"_s);
+ // https://github.com/KhronosGroup/WebGL/pull/2830
+ // Spec requires EXT_float_blend to be turned on implicitly here.
+ context.graphicsContextGL()->getExtensions().ensureEnabled("GL_EXT_float_blend"_s);
+}
+
+WebGLColorBufferFloat::~WebGLColorBufferFloat() = default;
+
+WebGLExtension::ExtensionName WebGLColorBufferFloat::getName() const
+{
+ return WebGLColorBufferFloatName;
+}
+
+bool WebGLColorBufferFloat::supported(const WebGLRenderingContextBase& context)
+{
+ return context.graphicsContextGL()->getExtensions().supports("GL_OES_texture_float"_s)
+ && context.graphicsContextGL()->getExtensions().supports("GL_CHROMIUM_color_buffer_float_rgba"_s);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEBGL)
Copied: trunk/Source/WebCore/html/canvas/WebGLColorBufferFloat.h (from rev 260907, trunk/Source/WebCore/html/canvas/OESTextureFloat.h) (0 => 260908)
--- trunk/Source/WebCore/html/canvas/WebGLColorBufferFloat.h (rev 0)
+++ trunk/Source/WebCore/html/canvas/WebGLColorBufferFloat.h 2020-04-29 19:01:50 UTC (rev 260908)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2020 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(WEBGL)
+
+#include "WebGLExtension.h"
+
+namespace WebCore {
+
+class WebGLColorBufferFloat final : public WebGLExtension {
+public:
+ explicit WebGLColorBufferFloat(WebGLRenderingContextBase&);
+ virtual ~WebGLColorBufferFloat();
+
+ ExtensionName getName() const override;
+
+ static bool supported(const WebGLRenderingContextBase&);
+};
+
+} // namespace WebCore
+
+#endif
Added: trunk/Source/WebCore/html/canvas/WebGLColorBufferFloat.idl (0 => 260908)
--- trunk/Source/WebCore/html/canvas/WebGLColorBufferFloat.idl (rev 0)
+++ trunk/Source/WebCore/html/canvas/WebGLColorBufferFloat.idl 2020-04-29 19:01:50 UTC (rev 260908)
@@ -0,0 +1,34 @@
+/*
+* Copyright (C) 2020 Google Inc. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* 1. Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* 2. Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in the
+* documentation and/or other materials provided with the distribution.
+*
+* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+[
+ NoInterfaceObject,
+ Conditional=WEBGL,
+ GenerateIsReachable=ImplWebGLRenderingContext
+] interface WebGLColorBufferFloat {
+ const unsigned long RGBA32F_EXT = 0x8814;
+ const unsigned long FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211;
+ const unsigned long UNSIGNED_NORMALIZED_EXT = 0x8C17;
+};
Modified: trunk/Source/WebCore/html/canvas/WebGLExtension.h (260907 => 260908)
--- trunk/Source/WebCore/html/canvas/WebGLExtension.h 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/html/canvas/WebGLExtension.h 2020-04-29 19:01:50 UTC (rev 260908)
@@ -60,6 +60,9 @@
WebGLCompressedTexturePVRTCName,
WebGLCompressedTextureASTCName,
ANGLEInstancedArraysName,
+ EXTColorBufferHalfFloatName,
+ WebGLColorBufferFloatName,
+ EXTColorBufferFloatName,
};
void ref() { m_context.ref(); }
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (260907 => 260908)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp 2020-04-29 19:01:50 UTC (rev 260908)
@@ -31,6 +31,7 @@
#include "ANGLEInstancedArrays.h"
#include "CachedImage.h"
#include "EXTBlendMinMax.h"
+#include "EXTColorBufferHalfFloat.h"
#include "EXTFragDepth.h"
#include "EXTShaderTextureLOD.h"
#include "EXTTextureFilterAnisotropic.h"
@@ -50,6 +51,7 @@
#include "OESVertexArrayObject.h"
#include "RenderBox.h"
#include "RuntimeEnabledFeatures.h"
+#include "WebGLColorBufferFloat.h"
#include "WebGLCompressedTextureASTC.h"
#include "WebGLCompressedTextureATC.h"
#include "WebGLCompressedTextureETC.h"
@@ -148,9 +150,9 @@
}
ENABLE_IF_REQUESTED(EXTTextureFilterAnisotropic, m_extTextureFilterAnisotropic, "EXT_texture_filter_anisotropic", enableSupportedExtension("GL_EXT_texture_filter_anisotropic"_s));
ENABLE_IF_REQUESTED(OESStandardDerivatives, m_oesStandardDerivatives, "OES_standard_derivatives", enableSupportedExtension("GL_OES_standard_derivatives"_s));
- ENABLE_IF_REQUESTED(OESTextureFloat, m_oesTextureFloat, "OES_texture_float", enableSupportedExtension("GL_OES_texture_float"_s));
+ ENABLE_IF_REQUESTED(OESTextureFloat, m_oesTextureFloat, "OES_texture_float", OESTextureFloat::supported(*this));
ENABLE_IF_REQUESTED(OESTextureFloatLinear, m_oesTextureFloatLinear, "OES_texture_float_linear", enableSupportedExtension("GL_OES_texture_float_linear"_s));
- ENABLE_IF_REQUESTED(OESTextureHalfFloat, m_oesTextureHalfFloat, "OES_texture_half_float", enableSupportedExtension("GL_OES_texture_half_float"_s));
+ ENABLE_IF_REQUESTED(OESTextureHalfFloat, m_oesTextureHalfFloat, "OES_texture_half_float", OESTextureHalfFloat::supported(*this));
ENABLE_IF_REQUESTED(OESTextureHalfFloatLinear, m_oesTextureHalfFloatLinear, "OES_texture_half_float_linear", enableSupportedExtension("GL_OES_texture_half_float_linear"_s));
ENABLE_IF_REQUESTED(OESVertexArrayObject, m_oesVertexArrayObject, "OES_vertex_array_object", enableSupportedExtension("GL_OES_vertex_array_object"_s));
ENABLE_IF_REQUESTED(OESElementIndexUint, m_oesElementIndexUint, "OES_element_index_uint", enableSupportedExtension("GL_OES_element_index_uint"_s));
@@ -188,6 +190,8 @@
}
ENABLE_IF_REQUESTED(WebGLDebugRendererInfo, m_webglDebugRendererInfo, "WEBGL_debug_renderer_info", true);
ENABLE_IF_REQUESTED(WebGLDebugShaders, m_webglDebugShaders, "WEBGL_debug_shaders", m_context->getExtensions().supports("GL_ANGLE_translated_shader_source"_s));
+ ENABLE_IF_REQUESTED(EXTColorBufferHalfFloat, m_extColorBufferHalfFloat, "EXT_color_buffer_half_float", EXTColorBufferHalfFloat::supported(*this));
+ ENABLE_IF_REQUESTED(WebGLColorBufferFloat, m_webglColorBufferFloat, "WEBGL_color_buffer_float", WebGLColorBufferFloat::supported(*this));
return nullptr;
}
@@ -247,6 +251,10 @@
if (m_context->getExtensions().supports("GL_ANGLE_translated_shader_source"_s))
result.append("WEBGL_debug_shaders"_s);
result.append("WEBGL_debug_renderer_info"_s);
+ if (EXTColorBufferHalfFloat::supported(*this))
+ result.append("EXT_color_buffer_half_float"_s);
+ if (WebGLColorBufferFloat::supported(*this))
+ result.append("WEBGL_color_buffer_float"_s);
return result;
}
@@ -498,9 +506,16 @@
case GraphicsContextGL::GREEN_BITS:
return getIntParameter(pname);
case GraphicsContextGL::IMPLEMENTATION_COLOR_READ_FORMAT:
- return getIntParameter(pname);
- case GraphicsContextGL::IMPLEMENTATION_COLOR_READ_TYPE:
- return getIntParameter(pname);
+ FALLTHROUGH;
+ case GraphicsContextGL::IMPLEMENTATION_COLOR_READ_TYPE: {
+ int value = getIntParameter(pname);
+ if (!value) {
+ // This indicates the read framebuffer is incomplete and an
+ // INVALID_OPERATION has been generated.
+ return nullptr;
+ }
+ return value;
+ }
case GraphicsContextGL::LINE_WIDTH:
return getFloatParameter(pname);
case GraphicsContextGL::MAX_COMBINED_TEXTURE_IMAGE_UNITS:
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (260907 => 260908)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp 2020-04-29 19:01:50 UTC (rev 260908)
@@ -35,6 +35,8 @@
#include "DiagnosticLoggingKeys.h"
#include "Document.h"
#include "EXTBlendMinMax.h"
+#include "EXTColorBufferFloat.h"
+#include "EXTColorBufferHalfFloat.h"
#include "EXTFragDepth.h"
#include "EXTShaderTextureLOD.h"
#include "EXTTextureFilterAnisotropic.h"
@@ -70,6 +72,7 @@
#include "WebGL2RenderingContext.h"
#include "WebGLActiveInfo.h"
#include "WebGLBuffer.h"
+#include "WebGLColorBufferFloat.h"
#include "WebGLCompressedTextureASTC.h"
#include "WebGLCompressedTextureATC.h"
#include "WebGLCompressedTextureETC.h"
@@ -3194,6 +3197,9 @@
CHECK_EXTENSION(m_webglDepthTexture, "WEBGL_depth_texture");
CHECK_EXTENSION(m_webglDrawBuffers, "WEBGL_draw_buffers");
CHECK_EXTENSION(m_angleInstancedArrays, "ANGLE_instanced_arrays");
+ CHECK_EXTENSION(m_extColorBufferHalfFloat, "EXT_color_buffer_half_float");
+ CHECK_EXTENSION(m_webglColorBufferFloat, "WEBGL_color_buffer_float");
+ CHECK_EXTENSION(m_extColorBufferFloat, "EXT_color_buffer_float");
return false;
}
@@ -5021,8 +5027,11 @@
{
if (isContextLostOrPending())
return;
+#if !USE(ANGLE)
+ // ANGLE subsumes this validation.
if (!validateTexFuncParameters("copyTexImage2D", CopyTexImage, target, level, internalFormat, width, height, border, internalFormat, GraphicsContextGL::UNSIGNED_BYTE))
return;
+#endif
if (!validateSettableTexInternalFormat("copyTexImage2D", internalFormat))
return;
auto tex = validateTextureBinding("copyTexImage2D", target, true);
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h (260907 => 260908)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h 2020-04-29 19:01:50 UTC (rev 260908)
@@ -55,6 +55,8 @@
class ANGLEInstancedArrays;
class EXTBlendMinMax;
+class EXTColorBufferFloat;
+class EXTColorBufferHalfFloat;
class EXTTextureFilterAnisotropic;
class EXTShaderTextureLOD;
class EXTsRGB;
@@ -73,8 +75,7 @@
class OffscreenCanvas;
#endif
class WebGLActiveInfo;
-class WebGLContextGroup;
-class WebGLContextObject;
+class WebGLColorBufferFloat;
class WebGLCompressedTextureASTC;
class WebGLCompressedTextureATC;
class WebGLCompressedTextureETC;
@@ -81,6 +82,8 @@
class WebGLCompressedTextureETC1;
class WebGLCompressedTexturePVRTC;
class WebGLCompressedTextureS3TC;
+class WebGLContextGroup;
+class WebGLContextObject;
class WebGLDebugRendererInfo;
class WebGLDebugShaders;
class WebGLDepthTexture;
@@ -623,6 +626,9 @@
std::unique_ptr<WebGLDepthTexture> m_webglDepthTexture;
std::unique_ptr<WebGLDrawBuffers> m_webglDrawBuffers;
std::unique_ptr<ANGLEInstancedArrays> m_angleInstancedArrays;
+ std::unique_ptr<EXTColorBufferHalfFloat> m_extColorBufferHalfFloat;
+ std::unique_ptr<WebGLColorBufferFloat> m_webglColorBufferFloat;
+ std::unique_ptr<EXTColorBufferFloat> m_extColorBufferFloat;
// Helpers for getParameter and other similar functions.
bool getBooleanParameter(GCGLenum);
Modified: trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.cpp (260907 => 260908)
--- trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.cpp 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.cpp 2020-04-29 19:01:50 UTC (rev 260908)
@@ -246,6 +246,21 @@
return String(reinterpret_cast<const char*>(gl::GetString(GL_EXTENSIONS)));
}
+GCGLenum ExtensionsGLANGLE::adjustWebGL1TextureInternalFormat(GCGLenum internalformat, GCGLenum format, GCGLenum type)
+{
+ // The implementation of WEBGL_color_buffer_float for WebGL 1.0 / ES 2.0 requires a sized
+ // internal format. Adjust it if necessary at this lowest level. Note that it does not matter at
+ // this point whether the WEBGL_color_buffer_float extension has actually been enabled at higher
+ // levels; the enum will be valid or invalid either way.
+ if (type == GL_FLOAT) {
+ if (format == GL_RGBA && internalformat == GL_RGBA)
+ return GL_RGBA32F;
+ if (format == GL_RGB && internalformat == GL_RGB)
+ return GL_RGB32F;
+ }
+ return internalformat;
+}
+
// GL_ANGLE_robust_client_memory
void ExtensionsGLANGLE::getBooleanvRobustANGLE(GCGLenum pname, GCGLsizei bufSize, GCGLsizei *length, GCGLboolean *data)
{
@@ -329,6 +344,8 @@
void ExtensionsGLANGLE::texImage2DRobustANGLE(GCGLenum target, int level, int internalformat, GCGLsizei width, GCGLsizei height, int border, GCGLenum format, GCGLenum type, GCGLsizei bufSize, const void *pixels)
{
+ if (!m_context->m_isForWebGL2)
+ internalformat = adjustWebGL1TextureInternalFormat(internalformat, format, type);
gl::TexImage2DRobustANGLE(target, level, internalformat, width, height, border, format, type, bufSize, pixels);
}
Modified: trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.h (260907 => 260908)
--- trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.h 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.h 2020-04-29 19:01:50 UTC (rev 260908)
@@ -147,6 +147,9 @@
void getQueryObjecti64vRobustANGLE(GCGLuint id, GCGLenum pname, GCGLsizei bufSize, GCGLsizei *length, GCGLint64 *params) override;
void getQueryObjectui64vRobustANGLE(GCGLuint id, GCGLenum pname, GCGLsizei bufSize, GCGLsizei *length, GCGLuint64 *params) override;
+ // Only for non-WebGL 2.0 contexts.
+ static GCGLenum adjustWebGL1TextureInternalFormat(GCGLenum internalformat, GCGLenum format, GCGLenum type);
+
private:
bool supportsExtension(const WTF::String&);
String getExtensions();
Modified: trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp (260907 => 260908)
--- trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp 2020-04-29 18:53:44 UTC (rev 260907)
+++ trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp 2020-04-29 19:01:50 UTC (rev 260908)
@@ -1811,6 +1811,8 @@
void GraphicsContextGLOpenGL::texImage2DDirect(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, const void* pixels)
{
makeContextCurrent();
+ if (!m_isForWebGL2)
+ internalformat = ExtensionsGLANGLE::adjustWebGL1TextureInternalFormat(internalformat, format, type);
gl::TexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
m_state.textureSeedCount.add(m_state.currentBoundTexture());
}