<?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>243819</bug_id>
          
          <creation_ts>2022-08-11 03:55:53 -0700</creation_ts>
          <short_desc>webgl/2.0.y/deqp/functional/gles3/negativetextureapi.html assertion failure</short_desc>
          <delta_ts>2022-08-17 17:12:02 -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>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=242614</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>
          
          <blocked>222812</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Kimmo Kinnunen">kkinnunen</reporter>
          <assigned_to name="Dan Glastonbury">djg</assigned_to>
          <cc>dino</cc>
    
    <cc>kbr</cc>
    
    <cc>kkinnunen</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1890543</commentid>
    <comment_count>0</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2022-08-11 03:55:53 -0700</bug_when>
    <thetext>webgl/2.0.y/deqp/functional/gles3/negativetextureapi.html assertion failure

The validation is not run when pixels == nullptr

Due to bug 242614</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890544</commentid>
    <comment_count>1</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2022-08-11 03:57:30 -0700</bug_when>
    <thetext>&lt;rdar://98347913&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890545</commentid>
    <comment_count>2</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2022-08-11 03:58:21 -0700</bug_when>
    <thetext>The issue is that validation is not done when user passes pixels=null, where as the teximage3dbase expect that the validation is done.

WebGL defines pixels=null means pixels=sufficiently large 0 filled pixels.

The philosophical rabbit hole:
Current WebGL implementation naturally &quot;optimizes&quot; so that it doesn&apos;t create the sufficiently large 0 filled pixels buffer, rather that it just passes pixels=nullptr down.

However, it also validates other arguments based on pixels. The validation shoudn&apos;t be done this way, it should be done based on the GL type, since pixels isn&apos;t always there.

The other philosophical rabbit hole:
the ASSERT_UNUSED(ok) is the smell that reveals the bug. Instead, the validation should return the computed properties, if the validation passes. This way the computation is done once</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890844</commentid>
    <comment_count>3</comment_count>
    <who name="Dan Glastonbury">djg</who>
    <bug_when>2022-08-12 03:04:39 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/3263</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1892095</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-08-17 17:11:59 -0700</bug_when>
    <thetext>Committed 253543@main (592cd219941f): &lt;https://commits.webkit.org/253543@main&gt;

Reviewed commits have been landed. Closing PR #3263 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>