mesa: Check that draw buffers are valid for glDrawBuffers on GLES3
authorEduardo Lima Mitev <elima@igalia.com>
Fri, 20 Feb 2015 08:32:42 +0000 (09:32 +0100)
committerSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Fri, 20 Feb 2015 08:35:12 +0000 (09:35 +0100)
commit097b933b55eea6181678b34ede94bbc588dc94ff
tree56c8eb7963da6408778ce70faa27e199c834883e
parentfe1e89a026fb85cc7dffbd3f967687186796631e
mesa: Check that draw buffers are valid for glDrawBuffers on GLES3

Section 4.2 (Whole Framebuffer Operations) of the OpenGL 3.0 specification
says:

    "Each buffer listed in bufs must be BACK, NONE, or one of the values from
     table 4.3 (NONE, COLOR_ATTACHMENTi)".

Fixes 1 dEQP test:
* dEQP-GLES3.functional.negative_api.buffer.draw_buffers

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/main/buffers.c