mesa: Draw Indirect return wrong error code on unalinged
authorMarta Lofstedt <marta.lofstedt@intel.com>
Mon, 26 Oct 2015 10:22:27 +0000 (11:22 +0100)
committerMarta Lofstedt <marta.lofstedt@linux.intel.com>
Tue, 27 Oct 2015 07:49:21 +0000 (08:49 +0100)
commit2c91e086563541271668f9ea6ca58689c0c97d44
treed55cc2109c2a40113e37675fb1cb753e6ca9d31b
parent4565b6f4fb59d261f9128ffe91c0787af4b15ea4
mesa: Draw Indirect return wrong error code on unalinged

From OpenGL 4.4 specification, section 10.4 and
Open GL Es 3.1 section 10.5:
"An INVALID_VALUE error is generated if indirect is not a multiple
of the size, in basic machine units, of uint."

However, the current code follow the ARB_draw_indirect:
https://www.opengl.org/registry/specs/ARB/draw_indirect.txt
"INVALID_OPERATION is generated by DrawArraysIndirect and
DrawElementsIndirect if commands source data beyond the end
of a buffer object or if <indirect> is not word aligned."

V2: After discussions on the list, it was suggested to
only keep the INVALID_VALUE error.

Signed-off-by: Marta Lofstedt <marta.lofstedt@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/mesa/main/api_validate.c