diff options
author | Christoph Bumiller <[email protected]> | 2010-04-10 19:07:28 +0200 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2010-04-10 19:08:45 +0200 |
commit | 51430c21ffd212d801f129d625f3ae8713372f68 (patch) | |
tree | 30ffe4abc82308cc249692b039a652adb38425bf /src/gallium/drivers/nv50/nv50_miptree.c | |
parent | cd499e76123f075c3201058f5fcda66425c4e5a8 (diff) |
nv50: plug in miptree resource vtbl
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_miptree.c')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_miptree.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv50/nv50_miptree.c b/src/gallium/drivers/nv50/nv50_miptree.c index 6484f924d0b..b7cd92158fe 100644 --- a/src/gallium/drivers/nv50/nv50_miptree.c +++ b/src/gallium/drivers/nv50/nv50_miptree.c @@ -111,7 +111,7 @@ nv50_miptree_get_handle(struct pipe_screen *pscreen, } -struct u_resource_vtbl nv50_miptree_vtbl = +const struct u_resource_vtbl nv50_miptree_vtbl = { nv50_miptree_get_handle, /* get_handle */ nv50_miptree_destroy, /* resource_destroy */ @@ -137,7 +137,11 @@ nv50_miptree_create(struct pipe_screen *pscreen, const struct pipe_resource *tmp uint32_t tile_flags; int ret, i, l; + if (!mt) + return NULL; + *pt = *tmp; + mt->base.vtbl = &nv50_miptree_vtbl; pipe_reference_init(&pt->reference, 1); pt->screen = pscreen; @@ -248,6 +252,7 @@ nv50_miptree_from_handle(struct pipe_screen *pscreen, mt->base.base = *template; + mt->base.vtbl = &nv50_miptree_vtbl; pipe_reference_init(&mt->base.base.reference, 1); mt->base.base.screen = pscreen; mt->image_nr = 1; |