llvmpipe: Portability fixes.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 22 Apr 2010 18:24:30 +0000 (19:24 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 22 Apr 2010 18:25:00 +0000 (19:25 +0100)
src/gallium/drivers/llvmpipe/lp_rast.c
src/gallium/drivers/llvmpipe/lp_texture.c

index 4046701b85a2a24f7c252235351dd4e7b1d9d9b9..0a41b6406bd372aeba5a6647ac0d01d1e466a982 100644 (file)
@@ -123,8 +123,8 @@ lp_rast_end( struct lp_rasterizer *rast )
    rast->curr_scene = NULL;
 
    if (0)
-      printf("Post render scene: tile read: %d  tile write: %d\n",
-             tile_read_count, tile_write_count);
+      debug_printf("Post render scene: tile read: %d  tile write: %d\n",
+                   tile_read_count, tile_write_count);
 }
 
 
index f766ab2300a2a59d5a005d8f7674b32e5580d38c..336b487bd4ef5faf5a0f80524ca01024cc5580b3 100644 (file)
@@ -85,7 +85,7 @@ alloc_layout_array(unsigned num_slices, unsigned width, unsigned height)
    assert(LP_TEX_LAYOUT_NONE == 0); /* calloc'ing LP_TEX_LAYOUT_NONE here */
 
    return (enum lp_texture_layout *)
-      calloc(num_slices * tx * ty, sizeof(enum lp_texture_layout));
+      CALLOC(num_slices * tx * ty, sizeof(enum lp_texture_layout));
 }
 
 
@@ -265,7 +265,7 @@ llvmpipe_resource_destroy(struct pipe_screen *pscreen,
 
       /* free layout flag arrays */
       for (level = 0; level < Elements(lpr->tiled); level++) {
-         free(lpr->layout[level]);
+         FREE(lpr->layout[level]);
          lpr->layout[level] = NULL;
       }
    }