Bug 86877 - Must set/reset pixel unpack alignment to 1 during texSubImage2D
Summary: Must set/reset pixel unpack alignment to 1 during texSubImage2D
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Kenneth Russell
URL:
Keywords:
Depends on:
Blocks: 87042 87136
  Show dependency treegraph
 
Reported: 2012-05-18 11:22 PDT by Kenneth Russell
Modified: 2012-05-22 09:26 PDT (History)
9 users (show)

See Also:


Attachments
Patch (63.76 KB, patch)
2012-05-21 14:27 PDT, Kenneth Russell
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Russell 2012-05-18 11:22:22 PDT
Most of WebGLRenderingContext's texImage2D and texSubImage2D code paths, in particular those taking DOM elements and ImageData, have to pack the texture data into a temporary buffer before uploading. This temporary buffer is tightly packed, so the UNPACK_ALIGNMENT pixel store parameter has to be set to 1 during the upload. This was done for texImage2D a long time ago but is missing in the texSubImage2D code paths.
Comment 1 Kenneth Russell 2012-05-21 14:27:00 PDT
Created attachment 143095 [details]
Patch
Comment 2 James Robinson 2012-05-21 14:32:24 PDT
Comment on attachment 143095 [details]
Patch

R=me.  C++ changes look fine, I haven't carefully looked at the layout tests but since they are imports I'm assuming they are fine.
Comment 3 WebKit Review Bot 2012-05-21 23:57:21 PDT
Comment on attachment 143095 [details]
Patch

Clearing flags on attachment: 143095

Committed r117918: <http://trac.webkit.org/changeset/117918>
Comment 4 WebKit Review Bot 2012-05-21 23:57:31 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Brady Eidson 2012-05-22 08:56:28 PDT
(In reply to comment #2)
> (From update of attachment 143095 [details])
> R=me.  C++ changes look fine, I haven't carefully looked at the layout tests but since they are imports I'm assuming they are fine.

They weren't.  This started 4 failures on Mac bots

http://build.webkit.org/results/Lion%20Release%20(Tests)/r117918%20(8526)/results.html