[Mesa-dev] [PATCH 1/2] mesa: pass the 'caller' function to create_samplers()
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Jul 21 12:42:05 UTC 2017
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)
{
-
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
--
2.13.3
More information about the mesa-dev
mailing list