Bug 100789

Summary: glsl-function-atan.html WebGL conformance test fails after https://bugs.webkit.org/show_bug.cgi?id=99154
Product: WebKit Reporter: Roger Fong <roger_fong>
Component: WebGLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, dino, fpizlo, hausmann, roger_fong, yuqiang.xian
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch fpizlo: review+

Description Roger Fong 2012-10-30 14:40:00 PDT
Hello, I'm not savvy enough with Javascript, Compilers or MacroAssemblers to know what's causing this but a WebGL conformance test started failing after this patch (https://bugs.webkit.org/show_bug.cgi?id=99154 / r131858) landed. 

The test is here https://www.khronos.org/registry/webgl/conformance-suites/1.0.1/conformance/glsl/functions/glsl-function-atan.html.
In particular the part of the test that is failing is this.

  tests: [
    {
      source: ["$(output) = vec4(",
               "    $(func)($(input).x * 8.0 - 4.0) / k2PI + 0.5,",
               "    0.5,",
               "    0,",
               "    1);"].join("\n"),
      generator: function(x, y, z, w) {
        return [ atan(x * 8.0 - 4.0) / k2PI + 0.5,
                 0.5,
                 0,
                 1 ];
      },
    },


The "generator" is the reference for the test and it seems to be having trouble with the second (green) element of the array, which is set to .5. 

I noticed however, that if I set it to anything besides .5 (like .50001)  the test passes.

Could someone take a look at it? 
Thanks
Comment 1 Yuqiang Xian 2012-10-30 17:51:13 PDT
I'm looking.

Thanks.
Comment 2 Yuqiang Xian 2012-10-30 20:41:00 PDT
Created attachment 171571 [details]
patch

Sorry for introducing the bug.
Comment 3 Yuqiang Xian 2012-10-31 00:00:38 PDT
Fix landed: https://trac.webkit.org/changeset/132991
Comment 4 Roger Fong 2012-10-31 22:56:49 PDT
Many thanks!