From 3093cbaad9962df8ad35f2c1c42d6b1259381498 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 18 Jul 2011 00:42:27 +0200 Subject: r600g: Get rid of leftover PB_USAGE_* flags. These happen to work because their values are the same as the equivalent PIPE_TRANSFER_* flags, but it's still misleading. Signed-off-by: Henri Verbeet --- src/gallium/drivers/r600/r600_pipe.c | 2 +- src/gallium/drivers/r600/r600_texture.c | 26 +------------------------- 2 files changed, 2 insertions(+), 26 deletions(-) (limited to 'src/gallium/drivers') diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 65b12de79b1..615f0688eb3 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -62,7 +62,7 @@ static struct r600_fence *r600_create_fence(struct r600_pipe_context *ctx) 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)) { diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index 10c32c53a6d..e9e8b277243 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -689,7 +689,6 @@ void* r600_texture_transfer_map(struct pipe_context *ctx, 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) { @@ -707,30 +706,7 @@ void* r600_texture_transfer_map(struct pipe_context *ctx, 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; } -- cgit v1.2.3