Module: Mesa Branch: master Commit: d80be517750ba5e89432f962175bf996a6f52ce0 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d80be517750ba5e89432f962175bf996a6f52ce0
Author: Ian Romanick <[email protected]> Date: Tue Dec 12 09:05:46 2017 -0800 mesa: Fold _mesa_record_error into its only caller Also, the comment on _mesa_record_error was wrong. dd_function_table::Error was not called because that function does not exist. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> --- src/mesa/main/context.c | 25 ------------------------- src/mesa/main/context.h | 4 ---- src/mesa/main/errors.c | 3 ++- 3 files changed, 2 insertions(+), 30 deletions(-) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 3fa9f69f88..53261fea51 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1829,31 +1829,6 @@ _mesa_get_dispatch(struct gl_context *ctx) /** \name Miscellaneous functions */ /**********************************************************************/ /*@{*/ - -/** - * Record an error. - * - * \param ctx GL context. - * \param error error code. - * - * Records the given error code and call the driver's dd_function_table::Error - * function if defined. - * - * \sa - * This is called via _mesa_error(). - */ -void -_mesa_record_error(struct gl_context *ctx, GLenum error) -{ - if (!ctx) - return; - - if (ctx->ErrorValue == GL_NO_ERROR) { - ctx->ErrorValue = error; - } -} - - /** * Flush commands. */ diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index 309d25cf3b..17fb86c323 100644 --- a/src/mesa/main/context.h +++ b/src/mesa/main/context.h @@ -154,10 +154,6 @@ _mesa_set_context_lost_dispatch(struct gl_context *ctx); /*@{*/ extern void -_mesa_record_error( struct gl_context *ctx, GLenum error ); - - -extern void _mesa_flush(struct gl_context *ctx); extern void GLAPIENTRY diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index 35a2f66c31..a968791362 100644 --- a/src/mesa/main/errors.c +++ b/src/mesa/main/errors.c @@ -327,7 +327,8 @@ _mesa_error( struct gl_context *ctx, GLenum error, const char *fmtString, ... ) } /* Set the GL context error state for glGetError. */ - _mesa_record_error(ctx, error); + if (ctx->ErrorValue == GL_NO_ERROR) + ctx->ErrorValue = error; } void _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
