WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
153000
[iOS] WebGL Antialiasing doesn't work
https://bugs.webkit.org/show_bug.cgi?id=153000
Summary
[iOS] WebGL Antialiasing doesn't work
Dean Jackson
Reported
2016-01-11 18:10:57 PST
We never set up multisampling correctly on iOS. Fix this. <
rdar://problem/9165531
>
Attachments
Patch
(12.94 KB, patch)
2016-01-11 18:13 PST
,
Dean Jackson
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews100 for mac-yosemite
(894.38 KB, application/zip)
2016-01-11 18:42 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews115 for mac-yosemite
(871.35 KB, application/zip)
2016-01-11 19:06 PST
,
Build Bot
no flags
Details
Patch
(13.82 KB, patch)
2016-01-12 15:00 PST
,
Dean Jackson
achristensen
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Dean Jackson
Comment 1
2016-01-11 18:13:04 PST
Created
attachment 268737
[details]
Patch
Build Bot
Comment 2
2016-01-11 18:42:20 PST
Comment on
attachment 268737
[details]
Patch
Attachment 268737
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/680718
New failing tests: fast/canvas/webgl/antialiasing-enabled.html
Build Bot
Comment 3
2016-01-11 18:42:23 PST
Created
attachment 268739
[details]
Archive of layout-test-results from ews100 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 4
2016-01-11 19:06:04 PST
Comment on
attachment 268737
[details]
Patch
Attachment 268737
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/680765
New failing tests: fast/canvas/webgl/antialiasing-enabled.html
Build Bot
Comment 5
2016-01-11 19:06:07 PST
Created
attachment 268741
[details]
Archive of layout-test-results from ews115 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-yosemite Platform: Mac OS X 10.10.5
Dean Jackson
Comment 6
2016-01-11 20:08:50 PST
Letting EWS chew on it, since I'm not sure about the bots, software rendering, EFL and GTK.
Dean Jackson
Comment 7
2016-01-12 14:05:30 PST
I don't understand why it wouldn't get a context on Yosemite.
Dean Jackson
Comment 8
2016-01-12 14:07:33 PST
Oh, WK1
Dean Jackson
Comment 9
2016-01-12 15:00:25 PST
Created
attachment 268814
[details]
Patch
Alex Christensen
Comment 10
2016-01-12 15:33:05 PST
Comment on
attachment 268814
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=268814&action=review
> Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm:404 > + resolveMultisamplingIfNecessary();
Is this needed on non-iOS WebGL implementations?
> Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:143 > + ::glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, sampleCount, GL_RGBA8_OES, width, height);
Why not m_internalColorFormat?
> Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:245 > + ::glBindFramebuffer(GL_FRAMEBUFFER, boundFrameBuffer);
Is this needed for non-iOS implementations of WebGL?
> LayoutTests/ChangeLog:8 > + New test to check if WebGL antialiasing happened on a rendered canvas.
This test is great, but we already have tests that fail if antialiasing doesn't happen.
Dean Jackson
Comment 11
2016-01-12 15:43:13 PST
Comment on
attachment 268814
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=268814&action=review
>> Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm:404 >> + resolveMultisamplingIfNecessary(); > > Is this needed on non-iOS WebGL implementations?
It's called from prepareTexture on non-iOS. endPaint() is an iOS-only bit of code. At some point we should clean all this up. I think we don't really need the GL CALayer types. Instead we should create IOSurfaces and render directly to them, just like we do for other stuff. At the same time we should combine the rendering code so that iOS and other ports are more similar.
>> Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:143 >> + ::glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, sampleCount, GL_RGBA8_OES, width, height); > > Why not m_internalColorFormat?
This is specific to iOS multisampling. m_internalColorFormat is probably defined to be GL_RGBA8 which doesn't work :(
>> Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:245 >> + ::glBindFramebuffer(GL_FRAMEBUFFER, boundFrameBuffer); > > Is this needed for non-iOS implementations of WebGL?
Not really. I could move it into the PLATFORM(IOS) bit, but it shouldn't harm anything.
Alex Christensen
Comment 12
2016-01-12 15:43:17 PST
Comment on
attachment 268814
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=268814&action=review
>> Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:143 >> + ::glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, sampleCount, GL_RGBA8_OES, width, height); > > Why not m_internalColorFormat?
m_internalColorFormat seems to only be used for non-iOS elsewhere. This is just continuing that.
Dean Jackson
Comment 13
2016-01-12 15:47:51 PST
Comment on
attachment 268814
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=268814&action=review
>> LayoutTests/ChangeLog:8 >> + New test to check if WebGL antialiasing happened on a rendered canvas. > > This test is great, but we already have tests that fail if antialiasing doesn't happen.
Let's add this one too!
Alex Christensen
Comment 14
2016-01-12 15:54:26 PST
Comment on
attachment 268814
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=268814&action=review
r=me hooray! Now all the WebGL will look so nice!
>>> Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm:404 >>> + resolveMultisamplingIfNecessary(); >> >> Is this needed on non-iOS WebGL implementations? > > It's called from prepareTexture on non-iOS. endPaint() is an iOS-only bit of code. > > At some point we should clean all this up. I think we don't really need the GL CALayer types. Instead we should create IOSurfaces and render directly to them, just like we do for other stuff. At the same time we should combine the rendering code so that iOS and other ports are more similar.
Sure enough.
>>> Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:245 >>> + ::glBindFramebuffer(GL_FRAMEBUFFER, boundFrameBuffer); >> >> Is this needed for non-iOS implementations of WebGL? > > Not really. I could move it into the PLATFORM(IOS) bit, but it shouldn't harm anything.
It adds unnecessary operations to the other implementations.
Dean Jackson
Comment 15
2016-01-12 16:13:11 PST
Committed
r194933
: <
http://trac.webkit.org/changeset/194933
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug