mesa/gles3: Generate error on draw call if transform feedback would overflow.
authorPaul Berry <stereotype441@gmail.com>
Thu, 13 Dec 2012 17:30:09 +0000 (09:30 -0800)
committerPaul Berry <stereotype441@gmail.com>
Tue, 18 Dec 2012 16:31:38 +0000 (08:31 -0800)
commitb87e65c3b61caeaa4f97a34d62e148e59a0dd5b8
treed3cdac4f4cb681b525c9bae6e22865fc27b144b4
parentfebc237141ab06a478d05752dedc858c2b4b8599
mesa/gles3: Generate error on draw call if transform feedback would overflow.

In desktop GL, if a draw call would cause transform feedback buffers
to overflow, the draw call should succeed, and the extra primitives
should simply not be recorded in the transform feedback buffers.

In GLES3, however, if a draw call would cause transform feedback
buffers to overflow, the draw call is supposed to produce an
INVALID_OPERATION error and no drawing should occur.

This patch implements the GLES3-required behaviour.

Fixes GLES3 conformance test "transform_feedback_overflow.test".

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/main/api_validate.c
src/mesa/main/mtypes.h
src/mesa/main/transformfeedback.c