[Mesa-dev] [PATCH 1/2] mesa: pass the 'caller' function to create_samplers()
Timothy Arceri
tarceri at itsqueeze.com
Mon Jul 24 01:24:46 UTC 2017
On 21/07/17 22:42, Samuel Pitoiset wrote:
> To return GL_OUT_OF_MEMORY if NewSamplerObject fails.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/mesa/main/samplerobj.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c
> index 26e7725249..a9c004fe71 100644
> --- a/src/mesa/main/samplerobj.c
> +++ b/src/mesa/main/samplerobj.c
> @@ -154,7 +154,8 @@ _mesa_new_sampler_object(struct gl_context *ctx, GLuint name)
> }
>
> static void
> -create_samplers(struct gl_context *ctx, GLsizei count, GLuint *samplers)
> +create_samplers(struct gl_context *ctx, GLsizei count, GLuint *samplers,
> + const char *caller)
> {
> GLuint first;
> GLint i;
> @@ -181,7 +182,6 @@ static void
> create_samplers_err(struct gl_context *ctx, GLsizei count, GLuint *samplers,
> const char *caller)
> {
> -
I've been letting some of these go but white space fixes should be going
into separate patches. Please try to do this in future.
> if (MESA_VERBOSE & VERBOSE_API)
> _mesa_debug(ctx, "%s(%d)\n", caller, count);
>
> @@ -190,14 +190,14 @@ create_samplers_err(struct gl_context *ctx, GLsizei count, GLuint *samplers,
> return;
> }
>
> - create_samplers(ctx, count, samplers);
> + create_samplers(ctx, count, samplers, caller);
> }
>
> void GLAPIENTRY
> _mesa_GenSamplers_no_error(GLsizei count, GLuint *samplers)
> {
> GET_CURRENT_CONTEXT(ctx);
> - create_samplers(ctx, count, samplers);
> + create_samplers(ctx, count, samplers, "glGenSamplers");
> }
>
> void GLAPIENTRY
> @@ -211,7 +211,7 @@ void GLAPIENTRY
> _mesa_CreateSamplers_no_error(GLsizei count, GLuint *samplers)
> {
> GET_CURRENT_CONTEXT(ctx);
> - create_samplers(ctx, count, samplers);
> + create_samplers(ctx, count, samplers, "glCreateSamplers");
> }
>
> void GLAPIENTRY
>
More information about the mesa-dev
mailing list