<?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>229508</bug_id>
          
          <creation_ts>2021-08-25 11:50:28 -0700</creation_ts>
          <short_desc>Link program fails if shader contains 0.0/0.0</short_desc>
          <delta_ts>2021-08-30 11:13:10 -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 Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>229439</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=229439</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Pessimistress">cxiaoji</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dino</cc>
    
    <cc>kbr</cc>
    
    <cc>kkinnunen</cc>
    
    <cc>kpiddington</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1787240</commentid>
    <comment_count>0</comment_count>
    <who name="Pessimistress">cxiaoji</who>
    <bug_when>2021-08-25 11:50:28 -0700</bug_when>
    <thetext>Version: Safari 15.0 (Webkit 16612.1.26.1.5)

Minimal sample to reproduce:

- Open https://codepen.io/Pessimistress/pen/dyRPjOd, link program fails with message &quot;Internal error compiling shader with Metal backend.\nPlease submit this shader, or website as a bug to https://bugs.webkit.org&quot;
- Change `0.0 / 0.0` to `1.0 / 0.0`, renders successfully
- Either fails in Firefox or Chrome

According to https://www.khronos.org/registry/OpenGL/specs/es/3.0/GLSL_ES_Specification_3.00.pdf, section 5.9:

&quot;Dividing by zero does not cause an exception but does result in an unspecified value.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1787268</commentid>
    <comment_count>1</comment_count>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2021-08-25 13:17:56 -0700</bug_when>
    <thetext>This is probably a duplicate of Bug 229439, in which infinities / NaNs are being fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1788581</commentid>
    <comment_count>2</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2021-08-30 11:13:10 -0700</bug_when>
    <thetext>Thanks for the report! I think this is now fixed.

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

    </bug>

</bugzilla>