WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
83665
[TexmapGL] Reduce the number of glTexSubImage2D calls
https://bugs.webkit.org/show_bug.cgi?id=83665
Summary
[TexmapGL] Reduce the number of glTexSubImage2D calls
Igor Trindade Oliveira
Reported
2012-04-10 23:18:05 PDT
When the OpenGLES driver does not support GL_EXT_unpack_subimage, BitmapTextureGL::updateContents is transfering the pixels row by row, sometimes calling glTexSubImage2D more than 40 times. This approach is ok for almost all drivers, however for some low end drivers can be a problem.
Attachments
Patch
(2.80 KB, patch)
2012-04-10 23:24 PDT
,
Igor Trindade Oliveira
no flags
Details
Formatted Diff
Diff
Patch
(2.78 KB, patch)
2012-04-11 10:41 PDT
,
Igor Trindade Oliveira
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Igor Trindade Oliveira
Comment 1
2012-04-10 23:24:24 PDT
Created
attachment 136630
[details]
Patch Proposed patch.
Noam Rosenthal
Comment 2
2012-04-11 05:07:06 PDT
Comment on
attachment 136630
[details]
Patch Any idea if this is actually faster?
Igor Trindade Oliveira
Comment 3
2012-04-11 10:41:13 PDT
Created
attachment 136695
[details]
Patch Proposed patch v2.
Igor Trindade Oliveira
Comment 4
2012-04-11 10:47:07 PDT
i did some tests using callgrind and it shows improvements. But it also depends of the graphics driver, in mali drivers i believe the memory is shared between the cpu and gpu so the old code can be fast. (In reply to
comment #2
)
> (From update of
attachment 136630
[details]
) > Any idea if this is actually faster?
Noam Rosenthal
Comment 5
2012-04-11 11:02:37 PDT
Comment on
attachment 136695
[details]
Patch This still feels a bit like a micro-optimization that might have different results on different graphics drivers... I'd rather come back to this after we know the pros/cons better.
Dongseong Hwang
Comment 6
2012-06-15 22:24:47 PDT
I think less glTexSubImage2D call is better, although I have no clue to convince you.
http://origin-developer.nvidia.com/docs/IO/8230/BatchBatchBatch.pdf?q=docs/IO/8230/BatchBatchBatch.pdf
It is be widely known that less drawing call, better performance. So, I think the fact may apply glTexSubImage2D, also, because glTexSubImage2D causes data transfer from cpu to gpu like drawing call.
Noam Rosenthal
Comment 7
2012-06-16 06:57:55 PDT
Comment on
attachment 136695
[details]
Patch OK, I think you have some merit.
WebKit Review Bot
Comment 8
2012-06-16 09:16:36 PDT
Comment on
attachment 136695
[details]
Patch Clearing flags on attachment: 136695 Committed
r120527
: <
http://trac.webkit.org/changeset/120527
>
WebKit Review Bot
Comment 9
2012-06-16 09:16:40 PDT
All reviewed patches have been landed. Closing bug.
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