nv04..nv30: fix pipe_surface init
authorPekka Paalanen <pq@iki.fi>
Wed, 12 Nov 2008 20:37:01 +0000 (22:37 +0200)
committerPekka Paalanen <pq@iki.fi>
Wed, 12 Nov 2008 21:13:42 +0000 (23:13 +0200)
Signed-off-by: Pekka Paalanen <pq@iki.fi>
src/gallium/drivers/nv04/nv04_miptree.c
src/gallium/drivers/nv10/nv10_miptree.c
src/gallium/drivers/nv20/nv20_miptree.c
src/gallium/drivers/nv30/nv30_miptree.c

index 02f7d21..0cbb91e 100644 (file)
@@ -109,6 +109,8 @@ nv04_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_texture *pt,
        ps->nblocksx = pt->nblocksx[level];
        ps->nblocksy = pt->nblocksy[level];
        ps->stride = nv04mt->level[level].pitch;
+       ps->refcount = 1;
+       ps->winsys = pscreen->winsys;
 
        if (pt->target == PIPE_TEXTURE_CUBE) {
                ps->offset = nv04mt->level[level].image_offset[face];
index ad084e7..943f9e2 100644 (file)
@@ -121,6 +121,8 @@ nv10_miptree_surface_get(struct pipe_screen *screen, struct pipe_texture *pt,
        ps->nblocksx = pt->nblocksx[level];
        ps->nblocksy = pt->nblocksy[level];
        ps->stride = nv10mt->level[level].pitch;
+       ps->refcount = 1;
+       ps->winsys = screen->winsys;
 
        if (pt->target == PIPE_TEXTURE_CUBE) {
                ps->offset = nv10mt->level[level].image_offset[face];
index b014f4c..c6106d5 100644 (file)
@@ -116,6 +116,8 @@ nv20_miptree_surface_get(struct pipe_screen *screen, struct pipe_texture *pt,
        ps->stride = nv20mt->level[level].pitch;
        ps->usage = flags;
        ps->status = PIPE_SURFACE_STATUS_DEFINED;
+       ps->refcount = 1;
+       ps->winsys = screen->winsys;
 
        if (pt->target == PIPE_TEXTURE_CUBE) {
                ps->offset = nv20mt->level[level].image_offset[face];
index 5c4f4da..9124db0 100644 (file)
@@ -121,6 +121,8 @@ nv30_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_texture *pt,
        ps->stride = nv30mt->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 = nv30mt->level[level].image_offset[face];