Calling texImage2D for a half-float texture only accepts null on iOS. The WebGL specification states that acceptable values are null, - The specification states that texImage2D for half-float has to accept null, Uint16Array, <image>, <video> and <canvas>: https://www.khronos.org/registry/webgl/extensions/OES_texture_half_float/ - The conformance test for WebGL tests for the upload behavior fails on iOS: https://www.khronos.org/registry/webgl/sdk/tests/conformance/extensions/oes-texture-half-float.html
Just run into the same issue as well. The conformance suite fails in Version 10.1 (12603.1.30.0.34) Release 27 (Safari 10.2, WebKit 12604.1.15.2)
<rdar://problem/31713571>
Tested on OSX/macOS 10.12, Safari Technology Preview (Release 47, Safari 11.1, WebKit 12605.1.19.1) -go to https://files.unity3d.com/stefan/bugs/webkit_errors/index.html --this is just a default empty scene from lates Unity (2017.3) -open browser console -see the following error being logged twice: --WebGL: INVALID_OPERATION: texImage2D: type HALF_FLOAT_OES but ArrayBufferView is not NULL -appears to have no visual effects on the scene -error is not being thrown on latest Firefox or Chrome on same OSX
I'm running into the same issue as well. Found in this bug: https://bugs.webkit.org/show_bug.cgi?id=183321
Unity3D engine runs into this issue as well. Safari 8 - Safari 12 are affected. Tested as a workaround to use GL.texImage2D(..., null); to create an uninitialized texture, but then immediately afterwards using GL.texSubImage2D(..., /*type=*/0x8d61/*GL_HALF_FLOAT_OES*/, uint16Array); to upload the content, but unfortunately that fails too, i.e. GL.texSubImage2D() neither allows passing a half-float array. Also tried a workaround to pass a Float32Array, or a Float64Array instead of a Uint16Array, wishfully thinking that perhaps the error message would be wrong, and half-float textures could be populated by submitting another array type instead, but that does not work either. As result, Unity3D support of half-float textures is disabled, which prevents Safari from running new Unity3D content, which utilize half-floats.
Created attachment 381258 [details] Patch
*** Bug 183321 has been marked as a duplicate of this bug. ***
Created attachment 381332 [details] EWS run 2
Committed r251303: <https://trac.webkit.org/changeset/251303>