Commit 51430c21 authored by Christoph Bumiller's avatar Christoph Bumiller

nv50: plug in miptree resource vtbl

parent cd499e76
......@@ -67,7 +67,7 @@ static void nv50_buffer_transfer_unmap( struct pipe_context *pipe,
struct u_resource_vtbl nv50_buffer_vtbl =
const struct u_resource_vtbl nv50_buffer_vtbl =
{
u_default_resource_get_handle, /* get_handle */
nv50_buffer_destroy, /* resource_destroy */
......
......@@ -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;
......
......@@ -16,7 +16,7 @@ struct nouveau_bo;
*/
struct nv50_resource {
struct pipe_resource base;
struct u_resource_vtbl *vtbl;
const struct u_resource_vtbl *vtbl;
struct nouveau_bo *bo;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment