Skip to content

arb_framebuffer: Test clearing of incomplete framebuffer

Dmitriy Nester requested to merge GL/piglit:test/Framebuffer-completness into main

From OpenGL 4.6, section 9.4.4 "Effects of Framebuffer Completeness on Framebuffer Operations", page 332:

"An INVALID_FRAMEBUFFER_OPERATION error is generated by attempts to render to or read from a framebuffer which is not framebuffer complete. This error is generated regardless of whether fragments are actually read from or written to the framebuffer. For example, it is generated when a rendering command is called and the framebuffer is incomplete, even if RASTERIZER_DISCARD is enabled."

Test that glClear*buffer functions generate INVALID_FRAMEBUFFER_OPERATION when trying to clear an incomplete framebuffer. To do this, we create an incomplete framebuffer, try to clear it and check if INVALID_FRAMEBUFFER_OPERATION is generated, then we make the buffer complete and clear again, the second clearing should be successful.

This test is created to test a regression mesa#2072 (closed), it was caused by testing buffer's completeness in clearing function before updating the completeness state of a buffer.

Signed-off-by: Dmytro Nester dmytro.nester@globallogic.com

Edited by Jordan Justen

Merge request reports