<?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>112298</bug_id>
          
          <creation_ts>2013-03-13 16:24:27 -0700</creation_ts>
          <short_desc>[WebGL] array-bounds-clamping should use less dramatic numbers</short_desc>
          <delta_ts>2013-03-13 19:17:29 -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>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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 name="Dean Jackson">dino</reporter>
          <assigned_to name="Dean Jackson">dino</assigned_to>
          <cc>gman</cc>
    
    <cc>kbr</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>854776</commentid>
    <comment_count>0</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2013-03-13 16:24:27 -0700</bug_when>
    <thetext>Some architectures seem unable to handle the cast int(infinity) (where infinity is a float) in GLSL, which causes array-bounds-clamping to fail. From what I&apos;ve seen, they always return 0 in this case, so we&apos;re still doing acceptable clamping. Unfortunately we can&apos;t use the isinf() function to test for this because it isn&apos;t in GLSLES 1.0.

I suggest replacing the MAX_NUMBER (infinity) values in the test with some large but not huge numbers, although maybe we should also be explicitly testing our casts from infinity as well?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>854777</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2013-03-13 16:25:05 -0700</bug_when>
    <thetext>&lt;rdar://problem/13415829&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>854783</commentid>
    <comment_count>2</comment_count>
      <attachid>193021</attachid>
    <who name="Dean Jackson">dino</who>
    <bug_when>2013-03-13 16:29:28 -0700</bug_when>
    <thetext>Created attachment 193021
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>854803</commentid>
    <comment_count>3</comment_count>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2013-03-13 17:13:07 -0700</bug_when>
    <thetext>I noticed this too on Windows platforms using ANGLE. It looks like Direct3D doesn&apos;t specify the result of HLSL intrinsics like clamp when the inputs are +/-infinity.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>854810</commentid>
    <comment_count>4</comment_count>
      <attachid>193021</attachid>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2013-03-13 17:25:20 -0700</bug_when>
    <thetext>Comment on attachment 193021
Patch

Seems fine for this layout test. It would be good to add more tests verifying out-of-range access behavior works according to spec. Currently conformance/uniforms/out-of-bounds-uniform-array-access.html is the only conformance test in this area. r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>854823</commentid>
    <comment_count>5</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2013-03-13 17:46:54 -0700</bug_when>
    <thetext>It&apos;s pretty disappointing how small a number can trigger this :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>854864</commentid>
    <comment_count>6</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2013-03-13 19:17:29 -0700</bug_when>
    <thetext>Committed r145780: &lt;http://trac.webkit.org/changeset/145780&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>193021</attachid>
            <date>2013-03-13 16:29:28 -0700</date>
            <delta_ts>2013-03-13 17:25:19 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-112298-20130314102524.patch</filename>
            <type>text/plain</type>
            <size>1567</size>
            <attacher name="Dean Jackson">dino</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTQ1NzUxCmRpZmYgLS1naXQgYS9MYXlvdXRUZXN0cy9DaGFu
Z2VMb2cgYi9MYXlvdXRUZXN0cy9DaGFuZ2VMb2cKaW5kZXggZjI5YWNkMzgyODk1N2YzNjFjNDVk
NjM2OTYxNGE0MmQ5ZGY4ODlhYS4uZjFlNjYzMTU3OTU4NmY5Yjc5YjJiY2JkNDMyZDNjNmRkNWUz
Y2VmYSAxMDA2NDQKLS0tIGEvTGF5b3V0VGVzdHMvQ2hhbmdlTG9nCisrKyBiL0xheW91dFRlc3Rz
L0NoYW5nZUxvZwpAQCAtMSwzICsxLDE0IEBACisyMDEzLTAzLTEzICBEZWFuIEphY2tzb24gIDxk
aW5vQGFwcGxlLmNvbT4KKworICAgICAgICBbV2ViR0xdIGFycmF5LWJvdW5kcy1jbGFtcGluZyBz
aG91bGQgdXNlIGxlc3MgZHJhbWF0aWMgbnVtYmVycworICAgICAgICBodHRwczovL2J1Z3Mud2Vi
a2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTEyMjk4CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9C
T0RZIChPT1BTISkuCisKKyAgICAgICAgUmVwbGFjZSBOdW1iZXIuTUFYX1ZBTFVFIHdpdGggYSBu
b24taW5maW5pdGUgbnVtYmVyLgorCisgICAgICAgICogZmFzdC9jYW52YXMvd2ViZ2wvYXJyYXkt
Ym91bmRzLWNsYW1waW5nLmh0bWw6CisKIDIwMTMtMDMtMTMgIFRhbyBCYWkgIDxtaWNoYWVsYmFp
QGNocm9taXVtLm9yZz4KIAogICAgICAgICBBZGQgdGhlIGRlZmF1bHQgdmlkZW8gcG9zdGVyIGlm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bmFibGVWZXJ0ZXhBdHRyaWJBcnJheSgxKTsKICAgICBnbC52ZXJ0ZXhBdHRyaWJQb2ludGVyKDEs
IDEsIGdsLkZMT0FULCBmYWxzZSwgMCwgMCk7Cg==
</data>
<flag name="review"
          id="214431"
          type_id="1"
          status="+"
          setter="kbr"
    />
          </attachment>
      

    </bug>

</bugzilla>