|author||Paul Berry <email@example.com>||2012-01-03 13:59:13 -0800|
|committer||Paul Berry <firstname.lastname@example.org>||2012-01-05 13:27:12 -0800|
mesa: Avoid segfault when getting an unbound transform feedback buffer name.
Previously we were using gl_transform_feedback_object::Buffers[i]->Name to service an indexed get request for GL_TRANSFORM_FEEDBACK_BUFFER_BINDING. However, if no buffer has been bound, gl_transform_feedback_object::Buffers[i] is NULL, so this was causing a segfault. This patch switches to using gl_transform_feedback_object::BufferNames[i], which is equal to gl_transform_feedback_object::Buffers[i]->Name if gl_transform_feedback_object::Buffers[i] is not NULL, and 0 if it is NULL. Fixes piglit test "EXT_transform_feedback/get-buffer-state indexed_binding". Reviewed-by: Eric Anholt <email@example.com> Reviewed-by: Kenneth Graunke <firstname.lastname@example.org>
Diffstat (limited to 'bin')
0 files changed, 0 insertions, 0 deletions