-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 */
}
-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 */
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;
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;