summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-02-19 12:32:24 -0500
committerKristian Høgsberg <[email protected]>2010-02-19 12:32:24 -0500
commit298be2b028263b2c343a707662c6fbfa18293cb2 (patch)
tree97ebdbbd457cbb2803ab03125355885c49d22f55 /src/mesa/shader/slang
parent32f2fd1c5d6088692551c80352b7d6fa35b0cd09 (diff)
Replace the _mesa_*printf() wrappers with the plain libc versions
Diffstat (limited to 'src/mesa/shader/slang')
-rw-r--r--src/mesa/shader/slang/slang_codegen.c4
-rw-r--r--src/mesa/shader/slang/slang_emit.c4
-rw-r--r--src/mesa/shader/slang/slang_label.c2
-rw-r--r--src/mesa/shader/slang/slang_link.c26
-rw-r--r--src/mesa/shader/slang/slang_log.c6
-rw-r--r--src/mesa/shader/slang/slang_utility.c2
6 files changed, 22 insertions, 22 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 6901b93d5de..b17256bb1e1 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -1643,7 +1643,7 @@ _slang_gen_function_call(slang_assemble_ctx *A, slang_function *fun,
if (A->pragmas->Debug) {
char s[1000];
- _mesa_snprintf(s, sizeof(s), "Call/inline %s()", (char *) fun->header.a_name);
+ snprintf(s, sizeof(s), "Call/inline %s()", (char *) fun->header.a_name);
n->Comment = _slang_strdup(s);
}
@@ -2190,7 +2190,7 @@ _slang_make_array_constructor(slang_assemble_ctx *A, slang_operation *oper)
*/
slang_variable *p = slang_variable_scope_grow(fun->parameters);
char name[10];
- _mesa_snprintf(name, sizeof(name), "p%d", i);
+ snprintf(name, sizeof(name), "p%d", i);
p->a_name = slang_atom_pool_atom(A->atoms, name);
p->type.qualifier = SLANG_QUAL_CONST;
p->type.specifier.type = baseType;
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index 8bd699ff9dc..52fe7868906 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -2303,8 +2303,8 @@ emit_var_ref(slang_emit_info *emitInfo, slang_ir_node *n)
/* error */
char s[100];
/* XXX isn't this really an out of memory/resources error? */
- _mesa_snprintf(s, sizeof(s), "Undefined variable '%s'",
- (char *) n->Var->a_name);
+ snprintf(s, sizeof(s), "Undefined variable '%s'",
+ (char *) n->Var->a_name);
slang_info_log_error(emitInfo->log, s);
return NULL;
}
diff --git a/src/mesa/shader/slang/slang_label.c b/src/mesa/shader/slang/slang_label.c
index 7e00b5787fb..225612a9369 100644
--- a/src/mesa/shader/slang/slang_label.c
+++ b/src/mesa/shader/slang/slang_label.c
@@ -37,7 +37,7 @@ _slang_label_new_unique(const char *name)
free(l);
return NULL;
}
- _mesa_sprintf(l->Name, "%s_%d", name, id);
+ sprintf(l->Name, "%s_%d", name, id);
id++;
l->Location = -1;
}
diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c
index 89658c1a398..b59fc0a43a9 100644
--- a/src/mesa/shader/slang/slang_link.c
+++ b/src/mesa/shader/slang/slang_link.c
@@ -139,16 +139,16 @@ link_varying_vars(GLcontext *ctx,
}
if (!bits_agree(var->Flags, v->Flags, PROG_PARAM_BIT_CENTROID)) {
char msg[100];
- _mesa_snprintf(msg, sizeof(msg),
- "centroid modifier mismatch for '%s'", var->Name);
+ snprintf(msg, sizeof(msg),
+ "centroid modifier mismatch for '%s'", var->Name);
link_error(shProg, msg);
free(map);
return GL_FALSE;
}
if (!bits_agree(var->Flags, v->Flags, PROG_PARAM_BIT_INVARIANT)) {
char msg[100];
- _mesa_snprintf(msg, sizeof(msg),
- "invariant modifier mismatch for '%s'", var->Name);
+ snprintf(msg, sizeof(msg),
+ "invariant modifier mismatch for '%s'", var->Name);
link_error(shProg, msg);
free(map);
return GL_FALSE;
@@ -269,8 +269,8 @@ link_uniform_vars(GLcontext *ctx,
GLuint newSampNum = *numSamplers;
if (newSampNum >= ctx->Const.MaxTextureImageUnits) {
char s[100];
- _mesa_sprintf(s, "Too many texture samplers (%u, max is %u)",
- newSampNum, ctx->Const.MaxTextureImageUnits);
+ sprintf(s, "Too many texture samplers (%u, max is %u)",
+ newSampNum, ctx->Const.MaxTextureImageUnits);
link_error(shProg, s);
return GL_FALSE;
}
@@ -631,7 +631,7 @@ concat_shaders(struct gl_shader_program *shProg, GLenum shaderType)
}
source[len] = '\0';
/*
- _mesa_printf("---NEW CONCATENATED SHADER---:\n%s\n------------\n", source);
+ printf("---NEW CONCATENATED SHADER---:\n%s\n------------\n", source);
*/
free(shaderLengths);
@@ -875,11 +875,11 @@ _slang_link(GLcontext *ctx,
vertNotify = ctx->Driver.ProgramStringNotify(ctx, GL_FRAGMENT_PROGRAM_ARB,
&shProg->FragmentProgram->Base);
if (ctx->Shader.Flags & GLSL_DUMP) {
- _mesa_printf("Mesa pre-link fragment program:\n");
+ printf("Mesa pre-link fragment program:\n");
_mesa_print_program(&fragProg->Base);
_mesa_print_program_parameters(ctx, &fragProg->Base);
- _mesa_printf("Mesa post-link fragment program:\n");
+ printf("Mesa post-link fragment program:\n");
_mesa_print_program(&shProg->FragmentProgram->Base);
_mesa_print_program_parameters(ctx, &shProg->FragmentProgram->Base);
}
@@ -893,11 +893,11 @@ _slang_link(GLcontext *ctx,
fragNotify = ctx->Driver.ProgramStringNotify(ctx, GL_VERTEX_PROGRAM_ARB,
&shProg->VertexProgram->Base);
if (ctx->Shader.Flags & GLSL_DUMP) {
- _mesa_printf("Mesa pre-link vertex program:\n");
+ printf("Mesa pre-link vertex program:\n");
_mesa_print_program(&vertProg->Base);
_mesa_print_program_parameters(ctx, &vertProg->Base);
- _mesa_printf("Mesa post-link vertex program:\n");
+ printf("Mesa post-link vertex program:\n");
_mesa_print_program(&shProg->VertexProgram->Base);
_mesa_print_program_parameters(ctx, &shProg->VertexProgram->Base);
}
@@ -912,10 +912,10 @@ _slang_link(GLcontext *ctx,
}
if (ctx->Shader.Flags & GLSL_DUMP) {
- _mesa_printf("Varying vars:\n");
+ printf("Varying vars:\n");
_mesa_print_parameter_list(shProg->Varying);
if (shProg->InfoLog) {
- _mesa_printf("Info Log: %s\n", shProg->InfoLog);
+ printf("Info Log: %s\n", shProg->InfoLog);
}
}
diff --git a/src/mesa/shader/slang/slang_log.c b/src/mesa/shader/slang/slang_log.c
index 23917fbd2cf..9ff21417bc5 100644
--- a/src/mesa/shader/slang/slang_log.c
+++ b/src/mesa/shader/slang/slang_log.c
@@ -86,7 +86,7 @@ slang_info_log_print(slang_info_log * log, const char *msg, ...)
char buf[1024];
va_start(va, msg);
- _mesa_vsprintf(buf, msg, va);
+ vsprintf(buf, msg, va);
va_end(va);
return slang_info_log_message(log, NULL, buf);
}
@@ -98,7 +98,7 @@ slang_info_log_error(slang_info_log * log, const char *msg, ...)
char buf[1024];
va_start(va, msg);
- _mesa_vsprintf(buf, msg, va);
+ vsprintf(buf, msg, va);
va_end(va);
log->error_flag = GL_TRUE;
if (slang_info_log_message(log, "Error", buf))
@@ -114,7 +114,7 @@ slang_info_log_warning(slang_info_log * log, const char *msg, ...)
char buf[1024];
va_start(va, msg);
- _mesa_vsprintf(buf, msg, va);
+ vsprintf(buf, msg, va);
va_end(va);
if (slang_info_log_message(log, "Warning", buf))
return 1;
diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c
index dc1e196bde5..e77404f6928 100644
--- a/src/mesa/shader/slang/slang_utility.c
+++ b/src/mesa/shader/slang/slang_utility.c
@@ -120,7 +120,7 @@ slang_string_pushi (slang_string *self, GLint i)
{
char buffer[12];
- _mesa_sprintf (buffer, "%d", i);
+ sprintf (buffer, "%d", i);
slang_string_pushs (self, buffer, strlen (buffer));
}