Lines Matching defs:usage

26                               unsigned level, unsigned usage,
282 unsigned usage)
286 tx->base.usage = usage;
357 nouveau_buffer_should_discard(struct nv04_resource *buf, unsigned usage)
359 if (!(usage & PIPE_MAP_DISCARD_WHOLE_RESOURCE))
363 if (unlikely(usage & PIPE_MAP_PERSISTENT))
375 * The usage indicates what the caller plans to do with the map:
394 unsigned level, unsigned usage,
402 return nouveau_user_ptr_transfer_map(pipe, resource, level, usage, box, ptransfer);
410 nouveau_buffer_transfer_init(tx, resource, box, usage);
413 if (usage & PIPE_MAP_READ)
415 if (usage & PIPE_MAP_WRITE)
425 if ((usage & PIPE_MAP_WRITE) &&
427 usage |= PIPE_MAP_DISCARD_RANGE | PIPE_MAP_UNSYNCHRONIZED;
430 if (usage & NOUVEAU_TRANSFER_DISCARD) {
433 if (usage & PIPE_MAP_DISCARD_WHOLE_RESOURCE)
451 if (usage & PIPE_MAP_WRITE)
465 if (nouveau_buffer_should_discard(buf, usage)) {
479 buf->mm ? 0 : nouveau_screen_transfer_flags(usage),
488 if ((usage & PIPE_MAP_UNSYNCHRONIZED) || !buf->mm)
495 if (nouveau_buffer_busy(buf, usage & PIPE_MAP_READ_WRITE)) {
496 if (unlikely(usage & (PIPE_MAP_DISCARD_WHOLE_RESOURCE |
500 nouveau_buffer_sync(nv, buf, usage & PIPE_MAP_READ_WRITE);
502 if (usage & PIPE_MAP_DISCARD_RANGE) {
509 if (usage & PIPE_MAP_DONTBLOCK)
512 nouveau_buffer_sync(nv, buf, usage & PIPE_MAP_READ_WRITE);
563 if (tx->base.usage & PIPE_MAP_WRITE) {
564 if (!(tx->base.usage & PIPE_MAP_FLUSH_EXPLICIT)) {
580 if (!tx->bo && (tx->base.usage & PIPE_MAP_WRITE))
658 unsigned level, unsigned usage,
665 nouveau_buffer_transfer_init(tx, resource, box, usage);
699 switch (buffer->base.usage) {
706 * with this usage, and GART -> GART copies would be suboptimal.
784 buffer->base.usage = PIPE_USAGE_IMMUTABLE;