diff options
author | Alejandro Piñeiro <[email protected]> | 2016-12-13 08:58:59 -0200 |
---|---|---|
committer | Alejandro Piñeiro <[email protected]> | 2017-01-12 08:21:03 -0200 |
commit | d54bc7e01f3f2e3178adecf53ea243470a3d5d93 (patch) | |
tree | 47cc7356f4fe977803808bf779cf85cadfe4b2e0 /src/mesa/main/texparam.c | |
parent | e33910b0d977071dc715e8d0927ebb63c0b4647c (diff) |
main/buffers: update error handling on DrawBuffers for 4.5
Before 4.5, GL_BACK was not allowed as a value of bufs. Since 4.5 it
is allowed under some circumstances:
From the OpenGL 4.5 specification, Section 17.4.1 "Selecting Buffers
for Writing", page 493 (page 515 of the PDF):
"An INVALID_ENUM error is generated if any value in bufs is FRONT,
LEFT, RIGHT, or FRONT_AND_BACK . This restriction applies to both
the de- fault framebuffer and framebuffer objects, and exists
because these constants may themselves refer to multiple buffers, as
shown in table 17.4."
And on page 492 (page 514 of the PDF):
"If the default framebuffer is affected, then each of the constants
must be one of the values listed in table 17.6 or the special value
BACK . When BACK is used, n must be 1 and color values are written
into the left buffer for single-buffered contexts, or into the back
left buffer for double-buffered contexts."
This patch keeps the same behaviour if OpenGL version is < 4. We
assume that for 4.x this is the intended behaviour, so a fix, but for
3.x the intended behaviour is the already in place.
Part of the fix for:
GL45-CTS.direct_state_access.framebuffers_draw_read_buffers_errors
v2: remove forgot printf
v3: remove spaces before commas on spec quote, split line too
long (Anuj)
Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/mesa/main/texparam.c')
0 files changed, 0 insertions, 0 deletions