summaryrefslogtreecommitdiff
path: root/src/glx
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2013-06-20 05:43:32 -0700
committerIan Romanick <ian.d.romanick@intel.com>2013-06-26 12:27:23 -0700
commit329cd6a9b145d5b3b5a2acca1b6c2019d01c9355 (patch)
treeb694e71c2032135e6d41fd6a8c8dfaa11c3d22ae /src/glx
parentb7d9478f36bde0f7b27321378c1bb799fdd4eaa1 (diff)
i965: Be more careful with the interleaved user array upload optimization
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[0]); glVertexAttribPointer(1, 4, GL_FLOAT, GL_FALSE, 16, &data[4]); 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. To fix this, make sure that the end of the element in the array being checked is within the stride "window." Previously the code would check that the begining of the element was within the window. NOTE: This is a candidate for stable branches. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/glx')
0 files changed, 0 insertions, 0 deletions