R600_ERR("r600: failed to create bo for fence objects\n");
return NULL;
}
- ctx->fences.data = r600_bo_map(ctx->radeon, ctx->fences.bo, PB_USAGE_UNSYNCHRONIZED, NULL);
+ ctx->fences.data = r600_bo_map(ctx->radeon, ctx->fences.bo, PIPE_TRANSFER_UNSYNCHRONIZED, NULL);
}
if (!LIST_IS_EMPTY(&ctx->fences.pool)) {
enum pipe_format format = transfer->resource->format;
struct radeon *radeon = (struct radeon *)ctx->screen->winsys;
unsigned offset = 0;
- unsigned usage = 0;
char *map;
if (rtransfer->staging_texture) {
transfer->box.x / util_format_get_blockwidth(format) * util_format_get_blocksize(format);
}
- if (transfer->usage & PIPE_TRANSFER_WRITE) {
- usage |= PB_USAGE_CPU_WRITE;
-
- if (transfer->usage & PIPE_TRANSFER_DISCARD) {
- }
-
- if (transfer->usage & PIPE_TRANSFER_FLUSH_EXPLICIT) {
- }
- }
-
- if (transfer->usage & PIPE_TRANSFER_READ) {
- usage |= PB_USAGE_CPU_READ;
- }
-
- if (transfer->usage & PIPE_TRANSFER_DONTBLOCK) {
- usage |= PB_USAGE_DONTBLOCK;
- }
-
- if (transfer->usage & PIPE_TRANSFER_UNSYNCHRONIZED) {
- usage |= PB_USAGE_UNSYNCHRONIZED;
- }
-
- map = r600_bo_map(radeon, bo, usage, ctx);
- if (!map) {
+ if (!(map = r600_bo_map(radeon, bo, transfer->usage, ctx))) {
return NULL;
}
{
struct pipe_context *pctx = ctx;
- if (usage & PB_USAGE_UNSYNCHRONIZED) {
+ if (usage & PIPE_TRANSFER_UNSYNCHRONIZED) {
radeon_bo_map(radeon, bo->bo);
return (uint8_t *) bo->bo->data + bo->offset;
}
if (p_atomic_read(&bo->bo->reference.count) > 1) {
- if (usage & PB_USAGE_DONTBLOCK) {
+ if (usage & PIPE_TRANSFER_DONTBLOCK) {
return NULL;
}
if (ctx) {
}
}
- if (usage & PB_USAGE_DONTBLOCK) {
+ if (usage & PIPE_TRANSFER_DONTBLOCK) {
uint32_t domain;
if (radeon_bo_busy(radeon, bo->bo, &domain))
if (radeon->fence_bo == NULL) {
return -ENOMEM;
}
- radeon->cfence = r600_bo_map(radeon, radeon->fence_bo, PB_USAGE_UNSYNCHRONIZED, NULL);
+ radeon->cfence = r600_bo_map(radeon, radeon->fence_bo, PIPE_TRANSFER_UNSYNCHRONIZED, NULL);
*radeon->cfence = 0;
return 0;
}
u32 *results, *current_result;
if (wait)
- results = r600_bo_map(ctx->radeon, query->buffer, PB_USAGE_CPU_READ, NULL);
+ results = r600_bo_map(ctx->radeon, query->buffer, PIPE_TRANSFER_READ, NULL);
else
- results = r600_bo_map(ctx->radeon, query->buffer, PB_USAGE_DONTBLOCK | PB_USAGE_CPU_READ, NULL);
+ results = r600_bo_map(ctx->radeon, query->buffer, PIPE_TRANSFER_DONTBLOCK | PIPE_TRANSFER_READ, NULL);
if (!results)
return FALSE;
u32 *results;
int i;
- results = r600_bo_map(ctx->radeon, query->buffer, PB_USAGE_CPU_WRITE, NULL);
+ results = r600_bo_map(ctx->radeon, query->buffer, PIPE_TRANSFER_WRITE, NULL);
if (results) {
results = (u32*)((char*)results + query->results_end);
memset(results, 0, query->result_size);