mesa: INVALID_VALUE for wrong type or format in Clear*Buffer*Data
authorAndres Gomez <agomez@igalia.com>
Tue, 12 Feb 2019 09:19:49 +0000 (11:19 +0200)
committerAndres Gomez <agomez@igalia.com>
Fri, 15 Feb 2019 12:28:06 +0000 (14:28 +0200)
commita43596df624678c39bc7108a04c8d1afc74663b0
tree86ddf202cbc33bbadafc41f75720a62f232502ee
parent67426ccd428706b558ae1d8697831ce337f97412
mesa: INVALID_VALUE for wrong type or format in Clear*Buffer*Data

Instead of generating a GL_INVALID_ENUM error when the type or format
is incorrect while using glClear{Named}Buffer{Sub}Data, generate
GL_INVALID_VALUE.

From page 72 (page 94 of the PDF) of the OpenGL 4.6 spec:

  " An INVALID_VALUE error is generated if type is not one of the
    types in table 8.2.

    An INVALID_VALUE error is generated if format is not one of the
    formats in table 8.3."

Fixes the following test:
KHR-GL45.direct_state_access.buffers_errors

v2: correct the doxygen documentation.

Cc: Pi Tabred <servuswiegehtz@yahoo.de>
Cc: Brian Paul <brianp@vmware.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/mesa/main/bufferobj.c