mesa: Additional error checks for transform feedback.
authorPaul Berry <stereotype441@gmail.com>
Fri, 30 Dec 2011 18:14:35 +0000 (10:14 -0800)
committerPaul Berry <stereotype441@gmail.com>
Wed, 4 Jan 2012 22:54:53 +0000 (14:54 -0800)
commit86bb45ffc36280263ba99fdca0c341489ad99e7f
tree9094d01f79f99225f82c60340bd712a40d5aa17f
parentebfad9f6a125738b9bfc5d5f7d09a8b57856674a
mesa: Additional error checks for transform feedback.

From the EXT_transform_feedback spec:

    The error INVALID_OPERATION is also generated by BeginTransformFeedbackEXT
    if no binding points would be used, either because no program object is
    active or because the active program object has specified no varying
    variables to record.

    ...

    The error INVALID_VALUE is generated by BindBufferRangeEXT or
    BindBufferOffsetEXT if <offset> is not word-aligned.

Fixes Piglit tests:
- EXT_transform_feedback/api-errors no_prog_active
- EXT_transform_feedback/api-errors interleaved_no_varyings
- EXT_transform_feedback/api-errors separate_no_varyings
- EXT_transform_feedback/api-errors bind_offset_offset_1
- EXT_transform_feedback/api-errors bind_offset_offset_2
- EXT_transform_feedback/api-errors bind_offset_offset_3
- EXT_transform_feedback/api-errors bind_offset_offset_5

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