diff options
author | Brian Paul <[email protected]> | 2017-06-19 12:22:09 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2017-06-20 08:03:18 -0600 |
commit | d8148ed10ae5faea6f88f2f964797f4b0590c083 (patch) | |
tree | 05c96f82a10d8797e8a4286f3ca26ec5403e23fb /src/SConscript | |
parent | 2a9d8a45a6edec7c8f6f670951b0fe6fd781c33f (diff) |
gallium/vbuf: avoid segfault when we get invalid glDrawRangeElements()
A common user error is to call glDrawRangeElements() with the 'end'
argument being one too large. If we use the vbuf module to translate
some vertex attributes this error can cause us to read past the end of
the mapped hardware buffer, resulting in a crash.
This patch adjusts the vertex count to avoid that issue. Typically,
the vertex_count gets decremented by one.
This fixes crashes with the Unigine Tropics and Sanctuary demos with older
VMware hardware versions. The issue isn't hit with VGPU10 because we
don't hit this fallback.
No piglit changes.
CC: [email protected]
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/SConscript')
0 files changed, 0 insertions, 0 deletions