i965: allow unsourced enabled VAO
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Thu, 3 Nov 2016 07:56:23 +0000 (08:56 +0100)
committerJuan A. Suarez Romero <jasuarez@igalia.com>
Wed, 21 Dec 2016 11:37:22 +0000 (12:37 +0100)
commitc32a9ec5f5bd74ae03b84be4c51d8d174ddf3e17
tree91bd9ed850828f2f07db39a91a66ba93c21ee096
parent8801734da701d95608e39d829e0a31a191ee68f2
i965: allow unsourced enabled VAO

The GL 4.5 spec says:
    "If any enabled array’s buffer binding is zero when DrawArrays
    or one of the other drawing commands defined in section 10.4 is
    called, the result is undefined."

This commits avoids crashing the code, which is not a very good
"undefined result".

This fixes spec/!opengl 3.1/vao-broken-attrib piglit test.
src/mesa/drivers/dri/i965/brw_draw_upload.c