Bug 183321
Summary: | texImage2D with HALF_FLOAT_OES doesn't work on iOS | ||
---|---|---|---|
Product: | WebKit | Reporter: | nkronlage |
Component: | WebGL | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | alonzakai, dino, jonlee, jonobrandel, jujjyl, justin_fan, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 11 | ||
Hardware: | Unspecified | ||
OS: | iOS 11 | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=196418 |
nkronlage
Steps to Reproduce:
Go to the page https://jsfiddle.net/b1pgLwwn/ on an iOS device.
Attach the device to a Mac and debug the page in Safari.
Press the 'Run' button in the jsfiddle
Expected Results:
No errors. The texture should be filled with the Uint16Array data.
Actual Results:
You get the following error:
WebGL: INVALID_OPERATION: texImage2D: type HALF_FLOAT_OES but ArrayBufferView is not NULL
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
jonobr1
I get this error as well
jonobr1
I found this behavior as well when developing http://cornelius.patatap.com/ • iOS refused both float32Array for Floating Point Textures as well as the Half Float Type described by nkronlage@
jonobr1
The jsfiddle still throws an error on Safari 12 on my iPad.
Radar WebKit Bug Importer
<rdar://problem/45500207>
jujjyl
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.
jujjyl
To be more precise, it looks like the issue affects both iOS and macOS systems (not just iOS).
Dean Jackson
WIll be fixed by https://bugs.webkit.org/show_bug.cgi?id=169999
*** This bug has been marked as a duplicate of bug 169999 ***