diff options
Diffstat (limited to 'src/mesa/shader/slang')
-rw-r--r-- | src/mesa/shader/slang/slang_codegen.c | 6 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_compile.c | 2 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_compile_variable.c | 2 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_emit.c | 6 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_label.c | 2 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_link.c | 26 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_log.c | 4 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_mem.c | 14 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_utility.c | 2 |
9 files changed, 32 insertions, 32 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 2280ceb9ee8..6901b93d5de 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -3639,7 +3639,7 @@ make_constant_array(slang_assemble_ctx *A, assert(initializer->type == SLANG_OPER_CALL); assert(initializer->array_constructor); - values = (GLfloat *) _mesa_malloc(numElements * 4 * sizeof(GLfloat)); + values = (GLfloat *) malloc(numElements * 4 * sizeof(GLfloat)); /* convert constructor params into ordinary floats */ for (i = 0; i < numElements; i++) { @@ -3670,7 +3670,7 @@ make_constant_array(slang_assemble_ctx *A, } assert(var->store->Size == size); - _mesa_free(values); + free(values); return GL_TRUE; } @@ -5321,7 +5321,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) /* free codegen context */ /* - _mesa_free(A->codegen); + free(A->codegen); */ return success; diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 41d51cd98a5..4280698cc94 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -2948,7 +2948,7 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader) /* free shader's prev info log */ if (shader->InfoLog) { - _mesa_free(shader->InfoLog); + free(shader->InfoLog); shader->InfoLog = NULL; } diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index eab912710e8..23c08a9039d 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -182,7 +182,7 @@ slang_variable_destruct(slang_variable * var) } #if 0 if (var->aux) { - _mesa_free(var->aux); + free(var->aux); } #endif } diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index b621e892c33..8bd699ff9dc 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -2528,7 +2528,7 @@ _slang_resolve_subroutines(slang_emit_info *emitInfo) GLuint *subroutineLoc, i, total; subroutineLoc - = (GLuint *) _mesa_malloc(emitInfo->NumSubroutines * sizeof(GLuint)); + = (GLuint *) malloc(emitInfo->NumSubroutines * sizeof(GLuint)); /* total number of instructions */ total = mainP->NumInstructions; @@ -2566,7 +2566,7 @@ _slang_resolve_subroutines(slang_emit_info *emitInfo) /* free subroutine list */ if (emitInfo->Subroutines) { - _mesa_free(emitInfo->Subroutines); + free(emitInfo->Subroutines); emitInfo->Subroutines = NULL; } emitInfo->NumSubroutines = 0; @@ -2585,7 +2585,7 @@ _slang_resolve_subroutines(slang_emit_info *emitInfo) } } - _mesa_free(subroutineLoc); + free(subroutineLoc); } diff --git a/src/mesa/shader/slang/slang_label.c b/src/mesa/shader/slang/slang_label.c index 12406213656..7e00b5787fb 100644 --- a/src/mesa/shader/slang/slang_label.c +++ b/src/mesa/shader/slang/slang_label.c @@ -34,7 +34,7 @@ _slang_label_new_unique(const char *name) if (l) { l->Name = (char *) _slang_alloc(strlen(name) + 10); if (!l->Name) { - _mesa_free(l); + free(l); return NULL; } _mesa_sprintf(l->Name, "%s_%d", name, id); diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index 68129d4c5a0..89658c1a398 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -68,7 +68,7 @@ static void link_error(struct gl_shader_program *shProg, const char *msg) { if (shProg->InfoLog) { - _mesa_free(shProg->InfoLog); + free(shProg->InfoLog); } shProg->InfoLog = _mesa_strdup(msg); shProg->LinkStatus = GL_FALSE; @@ -103,7 +103,7 @@ link_varying_vars(GLcontext *ctx, GLuint *map, i, firstVarying, newFile; GLbitfield *inOutFlags; - map = (GLuint *) _mesa_malloc(prog->Varying->NumParameters * sizeof(GLuint)); + map = (GLuint *) malloc(prog->Varying->NumParameters * sizeof(GLuint)); if (!map) return GL_FALSE; @@ -134,7 +134,7 @@ link_varying_vars(GLcontext *ctx, &shProg->Varying->Parameters[j]; if (var->Size != v->Size) { link_error(shProg, "mismatched varying variable types"); - _mesa_free(map); + free(map); return GL_FALSE; } if (!bits_agree(var->Flags, v->Flags, PROG_PARAM_BIT_CENTROID)) { @@ -142,7 +142,7 @@ link_varying_vars(GLcontext *ctx, _mesa_snprintf(msg, sizeof(msg), "centroid modifier mismatch for '%s'", var->Name); link_error(shProg, msg); - _mesa_free(map); + free(map); return GL_FALSE; } if (!bits_agree(var->Flags, v->Flags, PROG_PARAM_BIT_INVARIANT)) { @@ -150,7 +150,7 @@ link_varying_vars(GLcontext *ctx, _mesa_snprintf(msg, sizeof(msg), "invariant modifier mismatch for '%s'", var->Name); link_error(shProg, msg); - _mesa_free(map); + free(map); return GL_FALSE; } } @@ -162,7 +162,7 @@ link_varying_vars(GLcontext *ctx, if (shProg->Varying->NumParameters > ctx->Const.MaxVarying) { link_error(shProg, "Too many varying variables"); - _mesa_free(map); + free(map); return GL_FALSE; } @@ -202,7 +202,7 @@ link_varying_vars(GLcontext *ctx, } } - _mesa_free(map); + free(map); /* these will get recomputed before linking is completed */ prog->InputsRead = 0x0; @@ -594,7 +594,7 @@ concat_shaders(struct gl_shader_program *shProg, GLenum shaderType) GLuint totalLen = 0, len = 0; GLuint i; - shaderLengths = (GLuint *)_mesa_malloc(shProg->NumShaders * sizeof(GLuint)); + shaderLengths = (GLuint *)malloc(shProg->NumShaders * sizeof(GLuint)); if (!shaderLengths) { return NULL; } @@ -611,13 +611,13 @@ concat_shaders(struct gl_shader_program *shProg, GLenum shaderType) } if (totalLen == 0) { - _mesa_free(shaderLengths); + free(shaderLengths); return NULL; } - source = (GLchar *) _mesa_malloc(totalLen + 1); + source = (GLchar *) malloc(totalLen + 1); if (!source) { - _mesa_free(shaderLengths); + free(shaderLengths); return NULL; } @@ -634,13 +634,13 @@ concat_shaders(struct gl_shader_program *shProg, GLenum shaderType) _mesa_printf("---NEW CONCATENATED SHADER---:\n%s\n------------\n", source); */ - _mesa_free(shaderLengths); + free(shaderLengths); remove_extra_version_directives(source); newShader = CALLOC_STRUCT(gl_shader); if (!newShader) { - _mesa_free(source); + free(source); return NULL; } diff --git a/src/mesa/shader/slang/slang_log.c b/src/mesa/shader/slang/slang_log.c index 4f6b8541c5a..23917fbd2cf 100644 --- a/src/mesa/shader/slang/slang_log.c +++ b/src/mesa/shader/slang/slang_log.c @@ -43,7 +43,7 @@ void slang_info_log_destruct(slang_info_log * log) { if (!log->dont_free_text) - _mesa_free(log->text); + free(log->text); } static int @@ -63,7 +63,7 @@ slang_info_log_message(slang_info_log * log, const char *prefix, _mesa_realloc(log->text, old_len + 1, old_len + size); } else { - log->text = (char *) (_mesa_malloc(size)); + log->text = (char *) (malloc(size)); if (log->text != NULL) log->text[0] = '\0'; } diff --git a/src/mesa/shader/slang/slang_mem.c b/src/mesa/shader/slang/slang_mem.c index 54f5196617f..5eaa7c44272 100644 --- a/src/mesa/shader/slang/slang_mem.c +++ b/src/mesa/shader/slang/slang_mem.c @@ -56,12 +56,12 @@ struct slang_mempool_ slang_mempool * _slang_new_mempool(GLuint initialSize) { - slang_mempool *pool = (slang_mempool *) _mesa_calloc(sizeof(slang_mempool)); + slang_mempool *pool = (slang_mempool *) calloc(1, sizeof(slang_mempool)); if (pool) { - pool->Data = (char *) _mesa_calloc(initialSize); + pool->Data = (char *) calloc(1, initialSize); /*printf("ALLOC MEMPOOL %d at %p\n", initialSize, pool->Data);*/ if (!pool->Data) { - _mesa_free(pool); + free(pool); return NULL; } pool->Size = initialSize; @@ -82,8 +82,8 @@ _slang_delete_mempool(slang_mempool *pool) pool->Used, pool->Size, pool->Count, pool->Largest); */ total += pool->Used; - _mesa_free(pool->Data); - _mesa_free(pool); + free(pool->Data); + free(pool); pool = next; } /*printf("TOTAL ALLOCATED: %u\n", total);*/ @@ -125,7 +125,7 @@ void * _slang_alloc(GLuint bytes) { #if USE_MALLOC_FREE - return _mesa_calloc(bytes); + return calloc(1, bytes); #else slang_mempool *pool; GET_CURRENT_CONTEXT(ctx); @@ -231,7 +231,7 @@ void _slang_free(void *addr) { #if USE_MALLOC_FREE - _mesa_free(addr); + free(addr); #else if (addr) { GET_CURRENT_CONTEXT(ctx); diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c index 56a33e6f6b5..dc1e196bde5 100644 --- a/src/mesa/shader/slang/slang_utility.c +++ b/src/mesa/shader/slang/slang_utility.c @@ -54,7 +54,7 @@ GLvoid slang_string_free (slang_string *self) { if (self->data != NULL) - _mesa_free (self->data); + free(self->data); } GLvoid |