nv10: use the gallium alloc/free wrappers.
authorStephane Marchesin <marchesin@icps.u-strasbg.fr>
Tue, 8 Jul 2008 18:26:04 +0000 (20:26 +0200)
committerStephane Marchesin <marchesin@icps.u-strasbg.fr>
Tue, 8 Jul 2008 18:26:04 +0000 (20:26 +0200)
src/gallium/drivers/nv10/nv10_state.c

index 11664fae2afa51ede43f7bd9024d3a7ef3b9770b..9b8b7801cdf34d837fe43ff79d381990288b74fc 100644 (file)
@@ -14,7 +14,7 @@ nv10_blend_state_create(struct pipe_context *pipe,
 {
        struct nv10_blend_state *cb;
 
-       cb = malloc(sizeof(struct nv10_blend_state));
+       cb = MALLOC(sizeof(struct nv10_blend_state));
 
        cb->b_enable = cso->blend_enable ? 1 : 0;
        cb->b_srcfunc = ((nvgl_blend_func(cso->alpha_src_factor)<<16) |
@@ -88,7 +88,7 @@ nv10_sampler_state_create(struct pipe_context *pipe,
        struct nv10_sampler_state *ps;
        uint32_t filter = 0;
 
-       ps = malloc(sizeof(struct nv10_sampler_state));
+       ps = MALLOC(sizeof(struct nv10_sampler_state));
 
        ps->wrap = ((wrap_mode(cso->wrap_s) << NV10TCL_TX_FORMAT_WRAP_S_SHIFT) |
                    (wrap_mode(cso->wrap_t) << NV10TCL_TX_FORMAT_WRAP_T_SHIFT));
@@ -249,7 +249,7 @@ nv10_rasterizer_state_create(struct pipe_context *pipe,
         *      multisample
         *      offset_units / offset_scale
         */
-       rs = malloc(sizeof(struct nv10_rasterizer_state));
+       rs = MALLOC(sizeof(struct nv10_rasterizer_state));
 
        rs->templ = cso;
        
@@ -335,7 +335,7 @@ nv10_depth_stencil_alpha_state_create(struct pipe_context *pipe,
 {
        struct nv10_depth_stencil_alpha_state *hw;
 
-       hw = malloc(sizeof(struct nv10_depth_stencil_alpha_state));
+       hw = MALLOC(sizeof(struct nv10_depth_stencil_alpha_state));
 
        hw->depth.func          = nvgl_comparison_op(cso->depth.func);
        hw->depth.write_enable  = cso->depth.writemask ? 1 : 0;