WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
137897
Use glFinish instead of glFlush when drawing final GL output to screen
https://bugs.webkit.org/show_bug.cgi?id=137897
Summary
Use glFinish instead of glFlush when drawing final GL output to screen
Roger Fong
Reported
2014-10-20 15:51:31 PDT
When we want to draw the final WebGL output to the screen we call drawInCGLContext which in turn calls GraphicsContext3D::prepareTexture. We used to call glFinish here, which pushes all buffered gl operations and blocks until every operation has been completed and every last pixel has been drawn. glFlush also pushes all buffered gl operations but returns immediately. Using glFinish is a huge performance hit and based on my testing does not seem to offer any particular benefit over glFlush. Thus we will switch to using glFlush. This gives us a 20% performance boost on Unity 3d tests and a 33% boost on the frame rate on
http://threejs.org/examples/#webgl_performance
.
Attachments
patch
(1.49 KB, patch)
2014-10-20 15:54 PDT
,
Roger Fong
bfulgham
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Roger Fong
Comment 1
2014-10-20 15:54:52 PDT
Created
attachment 240154
[details]
patch
Roger Fong
Comment 2
2014-10-20 15:57:02 PDT
We should commit this, live on it, and keep an eye out for any unforeseen consequences.
Roger Fong
Comment 3
2014-10-20 15:58:09 PDT
rdar://problem/15846550
Brent Fulgham
Comment 4
2014-10-20 16:16:31 PDT
Comment on
attachment 240154
[details]
patch Looks good! r=me.
Roger Fong
Comment 5
2014-10-20 18:07:56 PDT
http://trac.webkit.org/changeset/174915
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