mesa: check draw buffer completeness on glClearBufferfv/glClearBufferuiv

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

Signed-off-by: Dmytro Nester <>
Reviewed-by: Marek Olšák <>
Part-of: <mesa/mesa!4833>
53 jobs for !22 with fix/ClearIncompleteBuffer in 30 minutes and 30 seconds (queued for 4 seconds)
merge request