cso: Use MALLOC
authorKeith Whitwell <keith@tungstengraphics.com>
Sun, 9 Mar 2008 16:05:46 +0000 (17:05 +0100)
committerKeith Whitwell <keith@tungstengraphics.com>
Sun, 9 Mar 2008 20:23:04 +0000 (20:23 +0000)
src/gallium/auxiliary/cso_cache/cso_context.c

index 7723746..051e7d9 100644 (file)
@@ -117,7 +117,7 @@ void cso_set_blend(struct cso_context *ctx,
    void *handle;\r
 \r
    if (cso_hash_iter_is_null(iter)) {\r
-      struct cso_blend *cso = malloc(sizeof(struct cso_blend));\r
+      struct cso_blend *cso = MALLOC(sizeof(struct cso_blend));\r
 \r
       cso->state = *templ;\r
       cso->data = ctx->pipe->create_blend_state(ctx->pipe, &cso->state);\r
@@ -150,7 +150,7 @@ void cso_single_sampler(struct cso_context *ctx,
                                                           (void*)templ);\r
 \r
       if (cso_hash_iter_is_null(iter)) {\r
-         struct cso_sampler *cso = malloc(sizeof(struct cso_sampler));\r
+         struct cso_sampler *cso = MALLOC(sizeof(struct cso_sampler));\r
          \r
          cso->state = *templ;\r
          cso->data = ctx->pipe->create_sampler_state(ctx->pipe, &cso->state);\r
@@ -220,7 +220,7 @@ void cso_set_depth_stencil_alpha(struct cso_context *ctx,
    void *handle;\r
 \r
    if (cso_hash_iter_is_null(iter)) {\r
-      struct cso_depth_stencil_alpha *cso = malloc(sizeof(struct cso_depth_stencil_alpha));\r
+      struct cso_depth_stencil_alpha *cso = MALLOC(sizeof(struct cso_depth_stencil_alpha));\r
 \r
       cso->state = *templ;\r
       cso->data = ctx->pipe->create_depth_stencil_alpha_state(ctx->pipe, &cso->state);\r
@@ -253,7 +253,7 @@ void cso_set_rasterizer(struct cso_context *ctx,
    void *handle = NULL;\r
 \r
    if (cso_hash_iter_is_null(iter)) {\r
-      struct cso_rasterizer *cso = malloc(sizeof(struct cso_rasterizer));\r
+      struct cso_rasterizer *cso = MALLOC(sizeof(struct cso_rasterizer));\r
 \r
       cso->state = *templ;\r
       cso->data = ctx->pipe->create_rasterizer_state(ctx->pipe, &cso->state);\r
@@ -288,7 +288,7 @@ void cso_set_fragment_shader(struct cso_context *ctx,
    void *handle = NULL;\r
 \r
    if (cso_hash_iter_is_null(iter)) {\r
-      struct cso_fragment_shader *cso = malloc(sizeof(struct cso_fragment_shader));\r
+      struct cso_fragment_shader *cso = MALLOC(sizeof(struct cso_fragment_shader));\r
 \r
       cso->state = *templ;\r
       cso->data = ctx->pipe->create_fs_state(ctx->pipe, &cso->state);\r
@@ -319,7 +319,7 @@ void cso_set_vertex_shader(struct cso_context *ctx,
    void *handle = NULL;\r
 \r
    if (cso_hash_iter_is_null(iter)) {\r
-      struct cso_vertex_shader *cso = malloc(sizeof(struct cso_vertex_shader));\r
+      struct cso_vertex_shader *cso = MALLOC(sizeof(struct cso_vertex_shader));\r
 \r
       cso->state = *templ;\r
       cso->data = ctx->pipe->create_vs_state(ctx->pipe, &cso->state);\r