nv40: init pipe_surface correctly
authorBen Skeggs <skeggsb@gmail.com>
Mon, 10 Nov 2008 05:12:28 +0000 (16:12 +1100)
committerBen Skeggs <skeggsb@gmail.com>
Mon, 10 Nov 2008 05:12:28 +0000 (16:12 +1100)
src/gallium/drivers/nv40/nv40_miptree.c

index f8d4497bf7561551a0c635b8d6b29a15328629ca..f321b721492cdd0e67e3d1bcfb4b5c8d1fb6240c 100644 (file)
@@ -123,6 +123,8 @@ nv40_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_texture *pt,
        ps->stride = mt->level[level].pitch;
        ps->usage = flags;
        ps->status = PIPE_SURFACE_STATUS_DEFINED;
+       ps->refcount = 1;
+       ps->winsys = pscreen->winsys;
 
        if (pt->target == PIPE_TEXTURE_CUBE) {
                ps->offset = mt->level[level].image_offset[face];