mesa: check draw buffer completeness on glClearBufferfv/glClearBufferuiv
authorDmitriy Nester <dmitriynester@gmail.com>
Thu, 30 Apr 2020 13:25:04 +0000 (16:25 +0300)
committerDmitriy Nester <dmitriynester@gmail.com>
Mon, 4 May 2020 10:16:30 +0000 (13:16 +0300)
commit58bb8172574cf9a911af03326903034daa30a481
treeca997f3f785b01a96bd15096fdc85eb068025fa2
parentf1a40a26a90d65c8cb2881b9a2679ed089bf2ead
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
RASTERIZER_DISCARD is enabled."

Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4833>
src/mesa/main/clear.c