diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2010-06-19 11:24:33 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2010-06-19 11:36:15 -0700 |
commit | 32cf482215f698c46fd782104ca2e0560da5be17 (patch) | |
tree | cfe258a5fc49f2a847b31d394ac944b845b9789d /main.cpp | |
parent | 57d0fc413976d0a80391080ee2b95369ecace4ad (diff) |
Make shader a talloc context.
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -29,6 +29,10 @@ #include <fcntl.h> #include <unistd.h> +extern "C" { +#include <talloc.h> +} + #include "ast.h" #include "glsl_parser_extras.h" #include "glsl_parser.h" @@ -186,8 +190,8 @@ main(int argc, char **argv) sizeof(struct glsl_shader *) * (whole_program.NumShaders + 1)); assert(whole_program.Shaders != NULL); - struct glsl_shader *shader = new glsl_shader; - memset(shader, 0, sizeof(*shader)); + /* talloc context should probably be whole_program */ + struct glsl_shader *shader = talloc_zero(NULL, glsl_shader); whole_program.Shaders[whole_program.NumShaders] = shader; whole_program.NumShaders++; |