mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
mesa: check draw buffer completeness on glClearBufferfi/glClearBufferiv
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 88d665830f)
This commit is contained in:
parent
5fbc187720
commit
aab604398d
1 changed files with 12 additions and 0 deletions
|
|
@ -350,6 +350,12 @@ clear_bufferiv(struct gl_context *ctx, GLenum buffer, GLint drawbuffer,
|
|||
_mesa_update_state( ctx );
|
||||
}
|
||||
|
||||
if (!no_error && ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
|
||||
_mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
|
||||
"glClearBufferiv(incomplete framebuffer)");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (buffer) {
|
||||
case GL_STENCIL:
|
||||
/* Page 264 (page 280 of the PDF) of the OpenGL 3.0 spec says:
|
||||
|
|
@ -686,6 +692,12 @@ clear_bufferfi(struct gl_context *ctx, GLenum buffer, GLint drawbuffer,
|
|||
drawbuffer);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
|
||||
_mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
|
||||
"glClearBufferfi(incomplete framebuffer)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (ctx->RasterDiscard)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue