From: Samuel Pitoiset Date: Fri, 21 Jul 2017 12:42:05 +0000 (+0200) Subject: mesa: pass the 'caller' function to create_samplers() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b2448468213e5157d1d12545d049b02104f4edc2;p=mesa.git mesa: pass the 'caller' function to create_samplers() To return GL_OUT_OF_MEMORY if NewSamplerObject fails. Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c index 26e77252490..326eceb1aa2 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; @@ -190,14 +191,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 +212,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