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 02f7d210e3117051cb10962262b78f84c591e241..0cbb91e187bfb3b505314a82b807153b072ce91f 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 ad084e72b8152d6c1262cf505ca97017054fc24e..943f9e21e98173179f18df49a9903003e2d0663f 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 b014f4c22e3f2fa44c836cfbb5dd51ff48ad44a7..c6106d58c434dcc2492b7191b33c5bc3840cd891 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 5c4f4da9481bfcd242a6f9215498d05f0a27bd44..9124db03e83ae49f7dfc103f4879a28169a890b4 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];