[Mesa-dev] [PATCH 3/3] mesa/main: Check for 0 size draws after validation.

Brian Paul brianp at vmware.com
Tue Jun 18 07:53:45 PDT 2013


On 05/25/2013 05:33 AM, Fabian Bieler wrote:
> When validating draw parameters move check for 0 draw count last
> (drawing with count 0 is not an error), so that other parameters (e.g.: the
> primitive type) are validated and the correct errors (if applicable) are
> generated.
>
>>From the OpenGL 3.3 spec page 33 (page 48 of the PDF):
> "[Regarding DrawArraysOneInstance, in terms of which other draw operations
> are defined:]
> If count is negative, an INVALID_VALUE error is generated."
>
> This patch also changes the bahavior of MultiDrawElements to perform the draw
> operation if some primitive's index counts are zero.
>
> Signed-off-by: Fabian Bieler <fabianbieler at fastmail.fm>


Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the mesa-dev mailing list