summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2011-01-21 14:32:31 -0800
committerKenneth Graunke <[email protected]>2011-01-31 10:17:09 -0800
commitd3073f58c17d8675a2ecdd5dfa83e5520c78e1a8 (patch)
tree31cdec04f53e61fb4b44d05d9b82795e591c71c2 /src/mesa/main
parentdc55254f5b23e5ad7a07c974ce772f93b4c11cb0 (diff)
Convert everything from the talloc API to the ralloc API.
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/shaderapi.c8
-rw-r--r--src/mesa/main/shaderobj.c12
2 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index a5e90d7cbd1..f2b8aa449ef 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -48,7 +48,7 @@
#include "program/program.h"
#include "program/prog_parameter.h"
#include "program/prog_uniform.h"
-#include "talloc.h"
+#include "ralloc.h"
#include <stdbool.h>
#include "../glsl/glsl_parser_extras.h"
@@ -1137,9 +1137,9 @@ validate_program(struct gl_context *ctx, GLuint program)
if (!shProg->Validated) {
/* update info log */
if (shProg->InfoLog) {
- talloc_free(shProg->InfoLog);
+ ralloc_free(shProg->InfoLog);
}
- shProg->InfoLog = talloc_strdup(shProg, errMsg);
+ shProg->InfoLog = ralloc_strdup(shProg, errMsg);
}
}
@@ -1855,7 +1855,7 @@ _mesa_CreateShaderProgramEXT(GLenum type, const GLchar *string)
#endif
}
- shProg->InfoLog = talloc_strdup_append(shProg->InfoLog, sh->InfoLog);
+ ralloc_strcat(&shProg->InfoLog, sh->InfoLog);
}
delete_shader(ctx, shader);
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
index 647fd31cab4..1d75845590f 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -38,7 +38,7 @@
#include "program/program.h"
#include "program/prog_parameter.h"
#include "program/prog_uniform.h"
-#include "talloc.h"
+#include "ralloc.h"
/**********************************************************************/
/*** Shader object functions ***/
@@ -105,7 +105,7 @@ _mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type)
struct gl_shader *shader;
assert(type == GL_FRAGMENT_SHADER || type == GL_VERTEX_SHADER ||
type == GL_GEOMETRY_SHADER_ARB);
- shader = talloc_zero(NULL, struct gl_shader);
+ shader = rzalloc(NULL, struct gl_shader);
if (shader) {
shader->Type = type;
shader->Name = name;
@@ -125,7 +125,7 @@ _mesa_delete_shader(struct gl_context *ctx, struct gl_shader *sh)
if (sh->Source)
free((void *) sh->Source);
_mesa_reference_program(ctx, &sh->Program, NULL);
- talloc_free(sh);
+ ralloc_free(sh);
}
@@ -252,7 +252,7 @@ static struct gl_shader_program *
_mesa_new_shader_program(struct gl_context *ctx, GLuint name)
{
struct gl_shader_program *shProg;
- shProg = talloc_zero(NULL, struct gl_shader_program);
+ shProg = rzalloc(NULL, struct gl_shader_program);
if (shProg) {
shProg->Name = name;
_mesa_init_shader_program(ctx, shProg);
@@ -316,7 +316,7 @@ _mesa_free_shader_program_data(struct gl_context *ctx,
}
if (shProg->InfoLog) {
- talloc_free(shProg->InfoLog);
+ ralloc_free(shProg->InfoLog);
shProg->InfoLog = NULL;
}
@@ -347,7 +347,7 @@ _mesa_delete_shader_program(struct gl_context *ctx, struct gl_shader_program *sh
{
_mesa_free_shader_program_data(ctx, shProg);
- talloc_free(shProg);
+ ralloc_free(shProg);
}