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>
This commit is contained in:
parent
103378f332
commit
88d665830f
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 );
|
_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) {
|
switch (buffer) {
|
||||||
case GL_STENCIL:
|
case GL_STENCIL:
|
||||||
/* Page 264 (page 280 of the PDF) of the OpenGL 3.0 spec says:
|
/* 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);
|
drawbuffer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
|
||||||
|
_mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
|
||||||
|
"glClearBufferfi(incomplete framebuffer)");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx->RasterDiscard)
|
if (ctx->RasterDiscard)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue