Bug 126468 - [WebGL] CGLPixelFormat should specify SampleBuffer and Sample count when using MSAA
Summary: [WebGL] CGLPixelFormat should specify SampleBuffer and Sample count when usin...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac All
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-01-03 15:49 PST by Brent Fulgham
Modified: 2014-01-03 16:16 PST (History)
6 users (show)

See Also:


Attachments
Patch (4.19 KB, patch)
2014-01-03 15:53 PST, Brent Fulgham
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2014-01-03 15:49:51 PST
I found this while trying to debug the failure of webgl/1.0.2/resources/webgl_test_files/conformance/rendering/gl-scissor-test.html.

The WebGL code assumes we are using multisampling when the WebGL "antialias" attribute is set, but the Mac port does not enable these flags in the underlying CGPixelFormat for the OpenGL context. This causes the gl-scissor-test to render garbage for the "antialias" case.
Comment 1 Brent Fulgham 2014-01-03 15:53:32 PST
Created attachment 220348 [details]
Patch
Comment 2 Dean Jackson 2014-01-03 16:10:27 PST
Comment on attachment 220348 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=220348&action=review

> Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm:145
> +    bool useMultisampling = m_attrs.antialias;
> +    
> +    setPixelFormat(attribs, 32, 32, !attrs.forceSoftwareRenderer, true, false, useMultisampling);

This preserves our existing behaviour to request supersampling when anti-aliasing was false. I guess that's ok.
Comment 3 Brent Fulgham 2014-01-03 16:16:34 PST
Comment on attachment 220348 [details]
Patch

Clearing flags on attachment: 220348

Committed r161294: <http://trac.webkit.org/changeset/161294>
Comment 4 Brent Fulgham 2014-01-03 16:16:36 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2014-01-03 16:16:41 PST
<rdar://problem/15747163>