mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
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 <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
This commit is contained in:
parent
0158565924
commit
d80be51775
3 changed files with 2 additions and 30 deletions
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -153,10 +153,6 @@ _mesa_set_context_lost_dispatch(struct gl_context *ctx);
|
|||
/** \name Miscellaneous */
|
||||
/*@{*/
|
||||
|
||||
extern void
|
||||
_mesa_record_error( struct gl_context *ctx, GLenum error );
|
||||
|
||||
|
||||
extern void
|
||||
_mesa_flush(struct gl_context *ctx);
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue