[Mesa-dev] [PATCH] i965: Remove interleaved user array upload optimization
eric at anholt.net
Wed Jun 19 17:25:14 PDT 2013
Ian Romanick <idr at freedesktop.org> writes:
> From: Ian Romanick <ian.d.romanick at intel.com>
> The checks to determine when the data can be uploaded in an interleaved
> fashion can be tricked by certain data layouts. For example,
> float data[...];
> glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 16, &data);
> glVertexAttribPointer(1, 4, GL_FLOAT, GL_FALSE, 16, &data);
> glDrawArrays(GL_POINTS, 0, 1);
> will hit the interleaved path with an incorrect size (16 bytes instead
> of 32 bytes). As a result, the data for attribute 1 never gets
> uploaded. The single element draw case is the only sensible case I can
> think of for non-interleaved-that-looks-like-interleaved data, but there
> may be others as well.
> I don't see an easy way to fix the checks, so I have chosen to just rip
> out the optimization. This may cause performance issues on applications
> that use large arrays of data that are not in VBOs.
Check that count * strideb actually contains the data you're hoping to
read from the later attributes? Seems pretty doable.
As is, this hurts cairo-gl performance by 1.9034% +/- 0.441538%
(n=33/34, 3 throttling outliers removed)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the mesa-dev