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)

ARM
Android
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 697990

People

(Reporter: ajuma, Assigned: ajuma)

References

Details

Attachments

(1 file)

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.
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
Attachment #570729 - Flags: review?(jmuizelaar)
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 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+
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.

Attachment

General

Created:
Updated:
Size: