<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>183321</bug_id>
          
          <creation_ts>2018-03-04 09:43:19 -0800</creation_ts>
          <short_desc>texImage2D with HALF_FLOAT_OES doesn&apos;t work on iOS</short_desc>
          <delta_ts>2019-10-17 18:31:59 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebGL</component>
          <version>Safari 11</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>iOS 11</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>169999</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=196418</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>nkronlage</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>alonzakai</cc>
    
    <cc>dino</cc>
    
    <cc>jonlee</cc>
    
    <cc>jonobrandel</cc>
    
    <cc>jujjyl</cc>
    
    <cc>justin_fan</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1403536</commentid>
    <comment_count>0</comment_count>
    <who name="">nkronlage</who>
    <bug_when>2018-03-04 09:43:19 -0800</bug_when>
    <thetext>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 &apos;Run&apos; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1421788</commentid>
    <comment_count>1</comment_count>
    <who name="jonobr1">jonobrandel</who>
    <bug_when>2018-05-08 10:43:39 -0700</bug_when>
    <thetext>I get this error as well</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1421793</commentid>
    <comment_count>2</comment_count>
    <who name="jonobr1">jonobrandel</who>
    <bug_when>2018-05-08 10:45:03 -0700</bug_when>
    <thetext>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@</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471179</commentid>
    <comment_count>3</comment_count>
    <who name="jonobr1">jonobrandel</who>
    <bug_when>2018-10-21 23:44:56 -0700</bug_when>
    <thetext>The jsfiddle still throws an error on Safari 12 on my iPad.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471676</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-10-23 14:42:44 -0700</bug_when>
    <thetext>&lt;rdar://problem/45500207&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1559118</commentid>
    <comment_count>5</comment_count>
    <who name="">jujjyl</who>
    <bug_when>2019-08-07 08:03:26 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1559119</commentid>
    <comment_count>6</comment_count>
    <who name="">jujjyl</who>
    <bug_when>2019-08-07 08:12:22 -0700</bug_when>
    <thetext>To be more precise, it looks like the issue affects both iOS and macOS systems (not just iOS).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1581257</commentid>
    <comment_count>7</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2019-10-17 18:31:59 -0700</bug_when>
    <thetext>WIll be fixed by https://bugs.webkit.org/show_bug.cgi?id=169999

*** This bug has been marked as a duplicate of bug 169999 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>