Bug 126468

Summary: [WebGL] CGLPixelFormat should specify SampleBuffer and Sample count when using MSAA
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebGLAssignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, dino, kondapallykalyan, roger_fong, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: All   
Attachments:
Description Flags
Patch none

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>