mesa: Check that all buffers are bound in BeginTransformFeedback.
authorPaul Berry <stereotype441@gmail.com>
Thu, 29 Dec 2011 23:55:01 +0000 (15:55 -0800)
committerPaul Berry <stereotype441@gmail.com>
Wed, 4 Jan 2012 22:54:48 +0000 (14:54 -0800)
commitebfad9f6a125738b9bfc5d5f7d09a8b57856674a
tree1c27d79680f7e1bf6c91e13dae96ef2f21f789c1
parent1979e22e13dd28553bcc67cc51e56684e6ee4768
mesa: Check that all buffers are bound in BeginTransformFeedback.

From the EXT_transform_feedback spec:

    The error INVALID_OPERATION is generated by
    BeginTransformFeedbackEXT if any transform feedback buffer object
    binding point used in transform feedback mode does not have a
    buffer object bound.

This required adding a new NumBuffers field to the
gl_transform_feedback_info struct, to keep track of how many transform
feedback buffers are required by the current program.

Fixes Piglit tests:
- EXT_transform_feedback/api-errors interleaved_unbound
- EXT_transform_feedback/api-errors separate_unbound_0_1
- EXT_transform_feedback/api-errors separate_unbound_0_2
- EXT_transform_feedback/api-errors separate_unbound_1_2

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/glsl/linker.cpp
src/mesa/main/mtypes.h
src/mesa/main/transformfeedback.c