Home | History | Annotate | Download | only in nv30

Lines Matching refs:mt

39    struct nv30_miptree *mt = nv30_miptree(pt);
40 struct nv30_miptree_level *lvl = &mt->level[level];
43 return (layer * mt->layer_size) + lvl->offset;
53 struct nv30_miptree *mt = nv30_miptree(pt);
56 if (!mt || !mt->base.bo)
59 stride = mt->level[0].pitch;
61 return nouveau_screen_bo_get_handle(pscreen, mt->base.bo, stride, handle);
67 struct nv30_miptree *mt = nv30_miptree(pt);
69 nouveau_bo_ref(NULL, &mt->base.bo);
70 FREE(mt);
92 struct nv30_miptree *mt = nv30_miptree(pt);
93 struct nv30_miptree_level *lvl = &mt->level[level];
95 rect->w = u_minify(pt->width0, level) << mt->ms_x;
97 rect->h = u_minify(pt->height0, level) << mt->ms_y;
101 if (mt->swizzled) {
111 rect->bo = mt->base.bo;
116 rect->x0 = util_format_get_nblocksx(pt->format, x) << mt->ms_x;
117 rect->y0 = util_format_get_nblocksy(pt->format, y) << mt->ms_y;
118 rect->x1 = rect->x0 + (w << mt->ms_x);
119 rect->y1 = rect->y0 + (h << mt->ms_y);
274 struct nv30_miptree *mt = CALLOC_STRUCT(nv30_miptree);
275 struct pipe_resource *pt = &mt->base.base;
282 mt->ms_mode = 0x00004000;
283 mt->ms_x = 1;
284 mt->ms_y = 1;
287 mt->ms_mode = 0x00003000;
288 mt->ms_x = 1;
289 mt->ms_y = 0;
292 mt->ms_mode = 0x00000000;
293 mt->ms_x = 0;
294 mt->ms_y = 0;
298 mt->base.vtbl = &nv30_miptree_vtbl;
303 w = pt->width0 << mt->ms_x;
304 h = pt->height0 << mt->ms_y;
313 util_format_is_float(pt->format) || mt->ms_mode) {
314 mt->uniform_pitch = util_format_get_nblocksx(pt->format, w) * blocksz;
315 mt->uniform_pitch = align(mt->uniform_pitch, 64);
318 if (!mt->uniform_pitch)
319 mt->swizzled = TRUE;
323 struct nv30_miptree_level *lvl = &mt->level[l];
328 lvl->pitch = mt->uniform_pitch;
340 mt->layer_size = size;
342 if (!mt->uniform_pitch)
343 mt->layer_size = align(mt->layer_size, 128);
344 size = mt->layer_size * 6;
347 ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 256, size, NULL, &mt->base.bo);
349 FREE(mt);
353 mt->base.domain = NOUVEAU_BO_VRAM;
354 return &mt->base.base;
362 struct nv30_miptree *mt;
373 mt = CALLOC_STRUCT(nv30_miptree);
374 if (!mt)
377 mt->base.bo = nouveau_screen_bo_from_handle(pscreen, handle, &stride);
378 if (mt->base.bo == NULL) {
379 FREE(mt);
383 mt->base.base = *tmpl;
384 mt->base.vtbl = &nv30_miptree_vtbl;
385 pipe_reference_init(&mt->base.base.reference, 1);
386 mt->base.base.screen = pscreen;
387 mt->uniform_pitch = stride;
388 mt->level[0].pitch = mt->uniform_pitch;
389 mt->level[0].offset = 0;
392 return &mt->base.base;
400 struct nv30_miptree *mt = nv30_miptree(pt); /* guaranteed */
403 struct nv30_miptree_level *lvl = &mt->level[tmpl->u.tex.level];
423 if (mt->swizzled)