summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-01-07 12:02:06 +0000
committerJosé Fonseca <[email protected]>2009-01-08 12:06:07 +0000
commit2d3953fd5ff91d9717d806a1fa3c8537efb8b67c (patch)
treedf3baf789b8bc298ed9dd164f3992ad4d14c73bf /src/mesa/shader/slang
parentb57797f3a81bd04a992868c48a6d98d66e692f3d (diff)
mesa: Add _mesa_snprintf.
On Windows snprintf is renamed as _snprintf.
Diffstat (limited to 'src/mesa/shader/slang')
-rw-r--r--src/mesa/shader/slang/slang_codegen.c2
-rw-r--r--src/mesa/shader/slang/slang_emit.c4
-rw-r--r--src/mesa/shader/slang/slang_link.c8
3 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 8e28be8abd1..66615d3afd6 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -1976,7 +1976,7 @@ _slang_make_array_constructor(slang_assemble_ctx *A, slang_operation *oper)
*/
slang_variable *p = slang_variable_scope_grow(fun->parameters);
char name[10];
- snprintf(name, sizeof(name), "p%d", i);
+ _mesa_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 1c0a7bbbd6e..d3b4e64b78d 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -2099,8 +2099,8 @@ emit_var_ref(slang_emit_info *emitInfo, slang_ir_node *n)
if (index < 0) {
/* error */
char s[100];
- snprintf(s, sizeof(s), "Undefined variable '%s'",
- (char *) n->Var->a_name);
+ _mesa_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_link.c b/src/mesa/shader/slang/slang_link.c
index 3ff94d21a33..3f953d86e74 100644
--- a/src/mesa/shader/slang/slang_link.c
+++ b/src/mesa/shader/slang/slang_link.c
@@ -137,15 +137,15 @@ link_varying_vars(struct gl_shader_program *shProg, struct gl_program *prog)
}
if (!bits_agree(var->Flags, v->Flags, PROG_PARAM_BIT_CENTROID)) {
char msg[100];
- snprintf(msg, sizeof(msg),
- "centroid modifier mismatch for '%s'", var->Name);
+ _mesa_snprintf(msg, sizeof(msg),
+ "centroid modifier mismatch for '%s'", var->Name);
link_error(shProg, msg);
return GL_FALSE;
}
if (!bits_agree(var->Flags, v->Flags, PROG_PARAM_BIT_INVARIANT)) {
char msg[100];
- snprintf(msg, sizeof(msg),
- "invariant modifier mismatch for '%s'", var->Name);
+ _mesa_snprintf(msg, sizeof(msg),
+ "invariant modifier mismatch for '%s'", var->Name);
link_error(shProg, msg);
return GL_FALSE;
}