diff options
author | Eric Anholt <[email protected]> | 2014-08-12 15:01:30 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-09-24 20:51:15 -0700 |
commit | a04605a8ca55ee2ea3a1509bff2d8ff37e0a8477 (patch) | |
tree | 06e9c73770ee5e2f87cf2b8afb1d5c19c5d41773 /src/mesa/main/feedback.h | |
parent | 61cb08ab4fb7bf9266d6c6e70f3fb8cc4b9bb00c (diff) |
vc4: Compute max_index instead of trusting the rest of userspace.
max_index was coming from either the user telling us as part of
glDrawRangeElements, or from an incidental calculation as part of some
sort of primitive conversion fallback. Sometimes, it was just set to the
default "I don't know" ~0 value.
If it wasn't set to the actual max index, then the kernel would reject the
draw call for allowing out-of-bounds VBO reads. So, compute the max index
from the sizes of the VBOs, which isn't too expensive (unlike mapping and
reading the index buffer) and is reliable.
Fixes piglit vao-element-array-buffer.
Diffstat (limited to 'src/mesa/main/feedback.h')
0 files changed, 0 insertions, 0 deletions