Closed
Bug 698197
Opened 13 years ago
Closed 13 years ago
Improve efficiency of GLContext::TexSubImage2D when GL_UNPACK_ROW_LENGTH isn't supported
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 697990
People
(Reporter: ajuma, Assigned: ajuma)
References
Details
Attachments
(1 file)
5.78 KB,
patch
|
jrmuizel
:
review+
BenWa
:
feedback+
|
Details | Diff | Splinter Review |
On GPUs that don't support GL_UNPACK_ROW_LENGTH, we are currently doing a row-by-row upload when the row length of the source surface doesn't match the width of the region being uploaded. This means calling fTexSubImage2D once per row. It's probably more efficient to instead do a row-by-row memcpy of the region being uploaded from the source surface into a temporary buffer, and then make a single call to fTexSubImage2D to upload from the temporary buffer.
Assignee | ||
Comment 1•13 years ago
|
||
Doing a memcpy to a temporary buffer followed by a single call to fTexSubImage2D gives us roughly a 10X speedup for our slowest uploads.
Assignee: nobody → ajuma
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•13 years ago
|
||
Attachment #570729 -
Flags: review?(jmuizelaar)
Comment 3•13 years ago
|
||
Comment on attachment 570729 [details] [diff] [review]
Copy to a temporary buffer when GL_UNPACK_ROW_LENGTH isn't supported.
Patchs look good! Let's get this in ASAP. Gives us a good perf win on Nexus S.
Attachment #570729 -
Flags: feedback+
Comment 4•13 years ago
|
||
Comment on attachment 570729 [details] [diff] [review]
Copy to a temporary buffer when GL_UNPACK_ROW_LENGTH isn't supported.
Not thrilled with this patch, but it's clearly better than what we have. Please add a comment about why we choose the new approach instead of the old one.
Attachment #570729 -
Flags: review?(jmuizelaar) → review+
Assignee | ||
Comment 5•13 years ago
|
||
This was folded into Bug 697990.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•