nv50: hehe, damage from tex-surfaces.. surface_fill() reenabled now :)
authorBen Skeggs <skeggsb@gmail.com>
Sun, 8 Jun 2008 02:27:36 +0000 (12:27 +1000)
committerBen Skeggs <skeggsb@gmail.com>
Sun, 29 Jun 2008 05:46:15 +0000 (15:46 +1000)
src/gallium/drivers/nv50/nv50_miptree.c

index 6c838998fd0170d7f5e3c98bed654d288f4478a9..be85c3fd5ce3701bd2fdf05330cb3085fd6decfa 100644 (file)
@@ -21,7 +21,7 @@ nv50_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
 {
        struct pipe_winsys *ws = pscreen->winsys;
        struct nv50_miptree *mt = CALLOC_STRUCT(nv50_miptree);
-       
+
        NOUVEAU_ERR("unimplemented\n");
 
        mt->base = *pt;
@@ -29,7 +29,7 @@ nv50_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
        mt->base.screen = pscreen;
 
        mt->buffer = ws->buffer_create(ws, 256, PIPE_BUFFER_USAGE_PIXEL,
-                                      512*32*4);
+                                      pt->width[0] * pt->cpp * pt->height[0]);
        if (!mt->buffer) {
                FREE(mt);
                return NULL;