Bug 100789 - glsl-function-atan.html WebGL conformance test fails after https://bugs.webkit.org/show_bug.cgi?id=99154
Summary: glsl-function-atan.html WebGL conformance test fails after https://bugs.webki...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-30 14:40 PDT by Roger Fong
Modified: 2012-10-31 22:56 PDT (History)
6 users (show)

See Also:


Attachments
patch (1.45 KB, patch)
2012-10-30 20:41 PDT, Yuqiang Xian
fpizlo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!