main/fbobject: throw invalid operation when get_attachment fails if needed
authorAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 12 Jan 2017 18:09:17 +0000 (16:09 -0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Fri, 13 Jan 2017 10:52:14 +0000 (08:52 -0200)
commit84e3e12b2582f4707a837ebb960ea7ce19e1c263
treee9bdce93e591b44ef4c729e759767b9331a25a2e
parentc6eb3aeba530fe82087c1c3c06ded23cb79bc199
main/fbobject: throw invalid operation when get_attachment fails if needed

In most cases, if a call to get_attachment fails is because attachment
is a INVALID_ENUM. But for some specific cases, if COLOR_ATTACHMENTm
(where m >= MAX_COLOR_ATTACHMENTS) is used, it should raise an
INVALID_OPERATION exception instead.

Fixes:
GL45-CTS.direct_state_access.framebuffers_get_attachment_parameter_errors
GL45-CTS.direct_state_access.framebuffers_renderbuffer_attachment_errors

v2: extra new line before quote block. Include "color attachment" on both
    new message errors (Nicolai).

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/main/fbobject.c