summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/samplerobj.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-07-21 14:42:05 +0200
committerSamuel Pitoiset <[email protected]>2017-07-24 16:43:38 +0200
commitb2448468213e5157d1d12545d049b02104f4edc2 (patch)
treeef5eadf54cce0e82df5cc1e33e443f1f2cb692a6 /src/mesa/main/samplerobj.c
parent0bc8315e63d8df76260cc3e3865bc9e3711e7553 (diff)
mesa: pass the 'caller' function to create_samplers()
To return GL_OUT_OF_MEMORY if NewSamplerObject fails. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main/samplerobj.c')
-rw-r--r--src/mesa/main/samplerobj.c9
1 files changed, 5 insertions, 4 deletions
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