Merge branch 'mesa_7_6_branch'
[mesa.git] / src / mesa / state_tracker / st_cb_program.c
index ea0fa20012ef3bfff334238df0b4af2120e0df06..b2d5c39a3a0d139676432de96616e482d7308e57 100644 (file)
@@ -45,6 +45,7 @@
 #include "st_context.h"
 #include "st_program.h"
 #include "st_atom_shader.h"
+#include "st_mesa_to_tgsi.h"
 #include "st_cb_program.h"
 
 
@@ -99,7 +100,7 @@ static struct gl_program *st_new_program( GLcontext *ctx,
 {
    switch (target) {
    case GL_VERTEX_PROGRAM_ARB: {
-      struct st_vertex_program *prog = CALLOC_STRUCT(st_vertex_program);
+      struct st_vertex_program *prog = ST_CALLOC_STRUCT(st_vertex_program);
 
       prog->serialNo = SerialNo++;
 
@@ -111,7 +112,7 @@ static struct gl_program *st_new_program( GLcontext *ctx,
 
    case GL_FRAGMENT_PROGRAM_ARB:
    case GL_FRAGMENT_PROGRAM_NV: {
-      struct st_fragment_program *prog = CALLOC_STRUCT(st_fragment_program);
+      struct st_fragment_program *prog = ST_CALLOC_STRUCT(st_fragment_program);
 
       prog->serialNo = SerialNo++;
 
@@ -152,7 +153,7 @@ st_delete_program(GLcontext *ctx, struct gl_program *prog)
          }
 
          if (stvp->state.tokens) {
-            FREE((void *) stvp->state.tokens);
+            st_free_tokens(stvp->state.tokens);
             stvp->state.tokens = NULL;
          }
       }
@@ -167,7 +168,7 @@ st_delete_program(GLcontext *ctx, struct gl_program *prog)
          }
          
          if (stfp->state.tokens) {
-            FREE((void *) stfp->state.tokens);
+            st_free_tokens(stfp->state.tokens);
             stfp->state.tokens = NULL;
          }
 
@@ -214,7 +215,7 @@ static void st_program_string_notify( GLcontext *ctx,
       }
 
       if (stfp->state.tokens) {
-         FREE((void *) stfp->state.tokens);
+         st_free_tokens(stfp->state.tokens);
          stfp->state.tokens = NULL;
       }
 
@@ -242,7 +243,7 @@ static void st_program_string_notify( GLcontext *ctx,
       }
 
       if (stvp->state.tokens) {
-         FREE((void *) stvp->state.tokens);
+         st_free_tokens(stvp->state.tokens);
          stvp->state.tokens = NULL;
       }