mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 15:00:11 +01:00
mesa: add KHR_no_error support to glMultiDraw*Indirect*()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
eb6b299720
commit
f60b16ef27
1 changed files with 42 additions and 14 deletions
|
|
@ -1714,9 +1714,16 @@ vbo_exec_MultiDrawArraysIndirect(GLenum mode, const GLvoid *indirect,
|
|||
if (stride == 0)
|
||||
stride = 4 * sizeof(GLuint); /* sizeof(DrawArraysIndirectCommand) */
|
||||
|
||||
if (!_mesa_validate_MultiDrawArraysIndirect(ctx, mode, indirect,
|
||||
primcount, stride))
|
||||
return;
|
||||
if (_mesa_is_no_error_enabled(ctx)) {
|
||||
FLUSH_CURRENT(ctx, 0);
|
||||
|
||||
if (ctx->NewState)
|
||||
_mesa_update_state(ctx);
|
||||
} else {
|
||||
if (!_mesa_validate_MultiDrawArraysIndirect(ctx, mode, indirect,
|
||||
primcount, stride))
|
||||
return;
|
||||
}
|
||||
|
||||
if (skip_validated_draw(ctx))
|
||||
return;
|
||||
|
|
@ -1742,9 +1749,16 @@ vbo_exec_MultiDrawElementsIndirect(GLenum mode, GLenum type,
|
|||
if (stride == 0)
|
||||
stride = 5 * sizeof(GLuint); /* sizeof(DrawElementsIndirectCommand) */
|
||||
|
||||
if (!_mesa_validate_MultiDrawElementsIndirect(ctx, mode, type, indirect,
|
||||
primcount, stride))
|
||||
return;
|
||||
if (_mesa_is_no_error_enabled(ctx)) {
|
||||
FLUSH_CURRENT(ctx, 0);
|
||||
|
||||
if (ctx->NewState)
|
||||
_mesa_update_state(ctx);
|
||||
} else {
|
||||
if (!_mesa_validate_MultiDrawElementsIndirect(ctx, mode, type, indirect,
|
||||
primcount, stride))
|
||||
return;
|
||||
}
|
||||
|
||||
if (skip_validated_draw(ctx))
|
||||
return;
|
||||
|
|
@ -1832,10 +1846,17 @@ vbo_exec_MultiDrawArraysIndirectCount(GLenum mode, GLintptr indirect,
|
|||
if (stride == 0)
|
||||
stride = 4 * sizeof(GLuint); /* sizeof(DrawArraysIndirectCommand) */
|
||||
|
||||
if (!_mesa_validate_MultiDrawArraysIndirectCount(ctx, mode,
|
||||
indirect, drawcount,
|
||||
maxdrawcount, stride))
|
||||
return;
|
||||
if (_mesa_is_no_error_enabled(ctx)) {
|
||||
FLUSH_CURRENT(ctx, 0);
|
||||
|
||||
if (ctx->NewState)
|
||||
_mesa_update_state(ctx);
|
||||
} else {
|
||||
if (!_mesa_validate_MultiDrawArraysIndirectCount(ctx, mode,
|
||||
indirect, drawcount,
|
||||
maxdrawcount, stride))
|
||||
return;
|
||||
}
|
||||
|
||||
if (skip_validated_draw(ctx))
|
||||
return;
|
||||
|
|
@ -1863,10 +1884,17 @@ vbo_exec_MultiDrawElementsIndirectCount(GLenum mode, GLenum type,
|
|||
if (stride == 0)
|
||||
stride = 5 * sizeof(GLuint); /* sizeof(DrawElementsIndirectCommand) */
|
||||
|
||||
if (!_mesa_validate_MultiDrawElementsIndirectCount(ctx, mode, type,
|
||||
indirect, drawcount,
|
||||
maxdrawcount, stride))
|
||||
return;
|
||||
if (_mesa_is_no_error_enabled(ctx)) {
|
||||
FLUSH_CURRENT(ctx, 0);
|
||||
|
||||
if (ctx->NewState)
|
||||
_mesa_update_state(ctx);
|
||||
} else {
|
||||
if (!_mesa_validate_MultiDrawElementsIndirectCount(ctx, mode, type,
|
||||
indirect, drawcount,
|
||||
maxdrawcount, stride))
|
||||
return;
|
||||
}
|
||||
|
||||
if (skip_validated_draw(ctx))
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue