mesa: error out in indirect draw when vertex bindings mismatch
authorTapani Pälli <tapani.palli@intel.com>
Fri, 13 Nov 2015 09:13:05 +0000 (11:13 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Thu, 26 Nov 2015 06:01:31 +0000 (08:01 +0200)
commitc2e146f4879b806e7178b8145645268c1ce0b4cd
tree048342c20d14b19ce55f648d9b1327ed5dd657b8
parent22d2dda03be32d23bc8e9f5823a4f2469737ddbe
mesa: error out in indirect draw when vertex bindings mismatch

Patch adds additional mask for tracking which vertex arrays have
associated vertex buffer binding set. This array can be directly
compared to which vertex arrays are enabled and should match when
drawing.

Fixes following CTS tests:

   ES31-CTS.draw_indirect.negative-noVBO-arrays
   ES31-CTS.draw_indirect.negative-noVBO-elements

v2: update mask in vertex_array_attrib_binding
v3: rename mask and make it track _BoundArrays which matches what
    was actually originally wanted (Fredrik Höglund)
v4: code cleanup, check for GLES 3.1 (Fredrik Höglund)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
src/mesa/main/api_validate.c
src/mesa/main/mtypes.h
src/mesa/main/varray.c