Bug 41092 - Index validation caches buffer size information too aggressively
Summary: Index validation caches buffer size information too aggressively
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: 41108
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-23 12:14 PDT by Kenneth Russell
Modified: 2010-06-28 10:43 PDT (History)
5 users (show)

See Also:


Attachments
Patch (11.93 KB, patch)
2010-06-23 19:46 PDT, Kenneth Russell
dglazkov: review+
kbr: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Russell 2010-06-23 12:14:26 PDT
Gregg Tavares discovered that the index validation code is caching buffer size information too aggressively. If vertexAttribPointer is called with a given buffer which is not large enough to cover a given draw call, but is subsequently resized via bufferData, the draw call is failing rather than succeeding.
Comment 1 Kenneth Russell 2010-06-23 19:46:48 PDT
Created attachment 59605 [details]
Patch

From the ChangeLog:

Do not cache the buffer size during vertexAttribPointer, only the attributes used to compute the number of required elements. Compute the number of valid elements each time based on the latched buffer.

Tested in Safari and Chromium on Mac OS X in both debug and release mode to ensure no performance regressions.
Comment 2 Gregg Tavares 2010-06-25 09:19:18 PDT
LGTM
Comment 3 Dimitri Glazkov (Google) 2010-06-25 14:33:08 PDT
Comment on attachment 59605 [details]
Patch

ok.
Comment 4 Kenneth Russell 2010-06-28 10:42:00 PDT
Committed r62018: <http://trac.webkit.org/changeset/62018>
Comment 5 Kenneth Russell 2010-06-28 10:43:48 PDT
Note that the patch landed was slightly different than the one reviewed due to merging with the fix for https://bugs.webkit.org/show_bug.cgi?id=41108 .