summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/prog_parameter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/prog_parameter.c')
-rw-r--r--src/mesa/shader/prog_parameter.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c
index d4970c4e44e..25bb4f3d441 100644
--- a/src/mesa/shader/prog_parameter.c
+++ b/src/mesa/shader/prog_parameter.c
@@ -54,16 +54,16 @@ _mesa_new_parameter_list_sized(unsigned size)
/* alloc arrays */
p->Parameters = (struct gl_program_parameter *)
- _mesa_calloc(size * sizeof(struct gl_program_parameter));
+ calloc(1, size * sizeof(struct gl_program_parameter));
p->ParameterValues = (GLfloat (*)[4])
_mesa_align_malloc(size * 4 *sizeof(GLfloat), 16);
if ((p->Parameters == NULL) || (p->ParameterValues == NULL)) {
- _mesa_free(p->Parameters);
+ free(p->Parameters);
_mesa_align_free(p->ParameterValues);
- _mesa_free(p);
+ free(p);
p = NULL;
}
}
@@ -81,12 +81,12 @@ _mesa_free_parameter_list(struct gl_program_parameter_list *paramList)
GLuint i;
for (i = 0; i < paramList->NumParameters; i++) {
if (paramList->Parameters[i].Name)
- _mesa_free((void *) paramList->Parameters[i].Name);
+ free((void *) paramList->Parameters[i].Name);
}
- _mesa_free(paramList->Parameters);
+ free(paramList->Parameters);
if (paramList->ParameterValues)
_mesa_align_free(paramList->ParameterValues);
- _mesa_free(paramList);
+ free(paramList);
}
@@ -146,8 +146,8 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList,
paramList->NumParameters = oldNum + sz4;
- _mesa_memset(&paramList->Parameters[oldNum], 0,
- sz4 * sizeof(struct gl_program_parameter));
+ memset(&paramList->Parameters[oldNum], 0,
+ sz4 * sizeof(struct gl_program_parameter));
for (i = 0; i < sz4; i++) {
struct gl_program_parameter *p = paramList->Parameters + oldNum + i;
@@ -215,7 +215,7 @@ _mesa_add_named_constant(struct gl_program_parameter_list *paramList,
pvals[1] == values[1] &&
pvals[2] == values[2] &&
pvals[3] == values[3] &&
- _mesa_strcmp(paramList->Parameters[pos].Name, name) == 0) {
+ strcmp(paramList->Parameters[pos].Name, name) == 0) {
/* Same name and value is already in the param list - reuse it */
return pos;
}
@@ -325,7 +325,7 @@ _mesa_use_uniform(struct gl_program_parameter_list *paramList,
for (i = 0; i < paramList->NumParameters; i++) {
struct gl_program_parameter *p = paramList->Parameters + i;
if ((p->Type == PROGRAM_UNIFORM || p->Type == PROGRAM_SAMPLER) &&
- _mesa_strcmp(p->Name, name) == 0) {
+ strcmp(p->Name, name) == 0) {
p->Used = GL_TRUE;
/* Note that large uniforms may occupy several slots so we're
* not done searching yet.
@@ -486,7 +486,7 @@ _mesa_add_state_reference(struct gl_program_parameter_list *paramList,
paramList->StateFlags |= _mesa_program_state_flags(stateTokens);
/* free name string here since we duplicated it in add_parameter() */
- _mesa_free(name);
+ free(name);
return index;
}
@@ -529,7 +529,7 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList,
/* name is null-terminated */
for (i = 0; i < (GLint) paramList->NumParameters; i++) {
if (paramList->Parameters[i].Name &&
- _mesa_strcmp(paramList->Parameters[i].Name, name) == 0)
+ strcmp(paramList->Parameters[i].Name, name) == 0)
return i;
}
}
@@ -537,8 +537,8 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList,
/* name is not null-terminated, use nameLen */
for (i = 0; i < (GLint) paramList->NumParameters; i++) {
if (paramList->Parameters[i].Name &&
- _mesa_strncmp(paramList->Parameters[i].Name, name, nameLen) == 0
- && _mesa_strlen(paramList->Parameters[i].Name) == (size_t)nameLen)
+ strncmp(paramList->Parameters[i].Name, name, nameLen) == 0
+ && strlen(paramList->Parameters[i].Name) == (size_t)nameLen)
return i;
}
}
@@ -723,7 +723,7 @@ _mesa_longest_parameter_name(const struct gl_program_parameter_list *list,
return 0;
for (i = 0; i < list->NumParameters; i++) {
if (list->Parameters[i].Type == type) {
- GLuint len = _mesa_strlen(list->Parameters[i].Name);
+ GLuint len = strlen(list->Parameters[i].Name);
if (len > maxLen)
maxLen = len;
}