Home | History | Annotate | Download | only in nv50

Lines Matching refs:tx

259    struct nv50_transfer *tx;
266 tx = CALLOC_STRUCT(nv50_transfer);
267 if (!tx)
270 pipe_resource_reference(&tx->base.resource, res);
272 tx->base.level = level;
273 tx->base.usage = usage;
274 tx->base.box = *box;
277 tx->nblocksx = box->width << mt->ms_x;
278 tx->nblocksy = box->height << mt->ms_x;
280 tx->nblocksx = util_format_get_nblocksx(res->format, box->width);
281 tx->nblocksy = util_format_get_nblocksy(res->format, box->height);
284 tx->base.stride = tx->nblocksx * util_format_get_blocksize(res->format);
285 tx->base.layer_stride = tx->nblocksy * tx->base.stride;
287 nv50_m2mf_rect_setup(&tx->rect[0], res, level, box->x, box->y, box->z);
289 size = tx->base.layer_stride;
292 size * tx->base.box.depth, NULL, &tx->rect[1].bo);
294 FREE(tx);
298 tx->rect[1].cpp = tx->rect[0].cpp;
299 tx->rect[1].width = tx->nblocksx;
300 tx->rect[1].height = tx->nblocksy;
301 tx->rect[1].depth = 1;
302 tx->rect[1].pitch = tx->base.stride;
303 tx->rect[1].domain = NOUVEAU_BO_GART;
306 unsigned base = tx->rect[0].base;
307 unsigned z = tx->rect[0].z;
310 nv50_m2mf_transfer_rect(nv50, &tx->rect[1], &tx->rect[0],
311 tx->nblocksx, tx->nblocksy);
313 tx->rect[0].z++;
315 tx->rect[0].base += mt->layer_stride;
316 tx->rect[1].base += size;
318 tx->rect[0].z = z;
319 tx->rect[0].base = base;
320 tx->rect[1].base = 0;
323 return &tx->base;
331 struct nv50_transfer *tx = (struct nv50_transfer *)transfer;
332 struct nv50_miptree *mt = nv50_miptree(tx->base.resource);
335 if (tx->base.usage & PIPE_TRANSFER_WRITE) {
336 for (i = 0; i < tx->base.box.depth; ++i) {
337 nv50_m2mf_transfer_rect(nv50, &tx->rect[0], &tx->rect[1],
338 tx->nblocksx, tx->nblocksy);
340 tx->rect[0].z++;
342 tx->rect[0].base += mt->layer_stride;
343 tx->rect[1].base += tx->nblocksy * tx->base.stride;
347 nouveau_bo_ref(NULL, &tx->rect[1].bo);
350 FREE(tx);
358 struct nv50_transfer *tx = (struct nv50_transfer *)transfer;
362 if (tx->rect[1].bo->map)
363 return tx->rect[1].bo->map;
370 ret = nouveau_bo_map(tx->rect[1].bo, flags, screen->base.client);
373 return tx->rect[1].bo->map;