Bug 47697

Summary: [chromium] context-attributes-etc conformance test fails in DRT
Product: WebKit Reporter: Adrienne Walker <enne>
Component: WebGLAssignee: Adrienne Walker <enne>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, enne, kbr, zmo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Bug Depends on:    
Bug Blocks: 47853    
Attachments:
Description Flags
Patch none

Description Adrienne Walker 2010-10-14 16:13:50 PDT
I updated context-attributes-alpha-depth-stencil-antialias.html in the Khronos repository and was hoping to push that updated test into WebKit.

This test runs correctly in Chromium on Linux, but fails the antialias=true test when running in DRT on the same machine.  I tried several variations on the existing test, but could not get Mesa to produce anything other than a pixel that was fully obscured or unobscured.  Mesa reports that it is using multisampling, which is why the test fails.

One possibility to fix this might be to have Mesa not use multisampling at all for WebGL.  We already do this for the canvas case.
Comment 1 Kenneth Russell 2010-10-14 17:42:08 PDT
(In reply to comment #0)
> One possibility to fix this might be to have Mesa not use multisampling at all for WebGL.  We already do this for the canvas case.

This should be pretty easy. By including app/gfx/gl_implementation.h you can query whether Mesa is in use after creating the context.
Comment 2 Adrienne Walker 2010-10-15 14:31:27 PDT
Created attachment 70898 [details]
Patch
Comment 3 Kenneth Russell 2010-10-18 14:04:01 PDT
Comment on attachment 70898 [details]
Patch

Generally looks good, but have you checked in the modified context-attributes-alpha-depth-stencil-antialias.html upstream to the Khronos repository?
Comment 4 Adrienne Walker 2010-10-18 14:07:57 PDT
(In reply to comment #3)
> (From update of attachment 70898 [details])
> Generally looks good, but have you checked in the modified context-attributes-alpha-depth-stencil-antialias.html upstream to the Khronos repository?

I did that first.  It was when I tried to push it into WebKit that I ran into this issue with Mesa.
Comment 5 Kenneth Russell 2010-10-18 14:19:02 PDT
Comment on attachment 70898 [details]
Patch

OK. One issue. Using shouldBeNonNull in the updated tests is not really correct. There should probably be a new predicate "shouldNotBeUndefined" in js-test-pre.js. Adding this will require updating several layout tests:

fast/js/script-tests/global-constructors.js
fast/dom/script-tests/constructed-objects-prototypes.js
fast/dom/script-tests/prototype-inheritance-2.js
fast/dom/script-tests/prototype-inheritance.js
fast/dom/Window/script-tests/window-property-descriptors.js
fast/dom/Window/window-properties.html

I'll r+/cq+ this but please file a bug to add this primitive and update the test to use it.
Comment 6 Adrienne Walker 2010-10-18 14:46:03 PDT
(In reply to comment #5)
> (From update of attachment 70898 [details])
> OK. One issue. Using shouldBeNonNull in the updated tests is not really correct. There should probably be a new predicate "shouldNotBeUndefined" in js-test-pre.js. Adding this will require updating several layout tests:
> 
> fast/js/script-tests/global-constructors.js
> fast/dom/script-tests/constructed-objects-prototypes.js
> fast/dom/script-tests/prototype-inheritance-2.js
> fast/dom/script-tests/prototype-inheritance.js
> fast/dom/Window/script-tests/window-property-descriptors.js
> fast/dom/Window/window-properties.html
> 
> I'll r+/cq+ this but please file a bug to add this primitive and update the test to use it.

Ah, you're quite right that I should be testing against undefined instead of null.

Why does adding this function to js-test-pre.js require touching all those other tests?
Comment 7 WebKit Commit Bot 2010-10-18 14:54:07 PDT
Comment on attachment 70898 [details]
Patch

Clearing flags on attachment: 70898

Committed r69996: <http://trac.webkit.org/changeset/69996>
Comment 8 WebKit Commit Bot 2010-10-18 14:54:12 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Adrienne Walker 2010-10-18 14:55:14 PDT
> I'll r+/cq+ this but please file a bug to add this primitive and update the test to use it.

Filed here: https://bugs.webkit.org/show_bug.cgi?id=47853
Comment 10 Kenneth Russell 2010-10-18 14:58:27 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > (From update of attachment 70898 [details] [details])
> > OK. One issue. Using shouldBeNonNull in the updated tests is not really correct. There should probably be a new predicate "shouldNotBeUndefined" in js-test-pre.js. Adding this will require updating several layout tests:
> > 
> > fast/js/script-tests/global-constructors.js
> > fast/dom/script-tests/constructed-objects-prototypes.js
> > fast/dom/script-tests/prototype-inheritance-2.js
> > fast/dom/script-tests/prototype-inheritance.js
> > fast/dom/Window/script-tests/window-property-descriptors.js
> > fast/dom/Window/window-properties.html
> > 
> > I'll r+/cq+ this but please file a bug to add this primitive and update the test to use it.
> 
> Ah, you're quite right that I should be testing against undefined instead of null.
> 
> Why does adding this function to js-test-pre.js require touching all those other tests?

Those tests verify that the identifiers attached to the window object are all known. They prevent accidental introduction of new functions at the global scope.