summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/r600
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2010-10-04 10:06:13 -0400
committerJerome Glisse <jglisse@redhat.com>2010-10-04 17:25:19 -0400
commit294c9fce1b924beddf198a3cce738b88eabb5537 (patch)
treecbc7344acc51669d11cfc1a7ba3e0eeae08e9140 /src/gallium/winsys/r600
parent68c7994ab5d86cdbfcba75b7f6c3ad734b9fb6b0 (diff)
r600g: rename radeon_ws_bo to r600_bo
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Diffstat (limited to 'src/gallium/winsys/r600')
-rw-r--r--src/gallium/winsys/r600/drm/evergreen_hw_context.c28
-rw-r--r--src/gallium/winsys/r600/drm/r600_hw_context.c26
-rw-r--r--src/gallium/winsys/r600/drm/r600_priv.h8
-rw-r--r--src/gallium/winsys/r600/drm/radeon_ws_bo.c26
4 files changed, 44 insertions, 44 deletions
diff --git a/src/gallium/winsys/r600/drm/evergreen_hw_context.c b/src/gallium/winsys/r600/drm/evergreen_hw_context.c
index c3569e60e8..fadfe28692 100644
--- a/src/gallium/winsys/r600/drm/evergreen_hw_context.c
+++ b/src/gallium/winsys/r600/drm/evergreen_hw_context.c
@@ -632,8 +632,8 @@ static inline void evergreen_context_pipe_state_set_resource(struct r600_context
block = range->blocks[CTX_BLOCK_ID(ctx, offset)];
if (state == NULL) {
block->status &= ~(R600_BLOCK_STATUS_ENABLED | R600_BLOCK_STATUS_DIRTY);
- radeon_ws_bo_reference(ctx->radeon, &block->reloc[1].bo, NULL);
- radeon_ws_bo_reference(ctx->radeon , &block->reloc[2].bo, NULL);
+ r600_bo_reference(ctx->radeon, &block->reloc[1].bo, NULL);
+ r600_bo_reference(ctx->radeon , &block->reloc[2].bo, NULL);
return;
}
block->reg[0] = state->regs[0].value;
@@ -644,18 +644,18 @@ static inline void evergreen_context_pipe_state_set_resource(struct r600_context
block->reg[5] = state->regs[5].value;
block->reg[6] = state->regs[6].value;
block->reg[7] = state->regs[7].value;
- radeon_ws_bo_reference(ctx->radeon, &block->reloc[1].bo, NULL);
- radeon_ws_bo_reference(ctx->radeon , &block->reloc[2].bo, NULL);
+ r600_bo_reference(ctx->radeon, &block->reloc[1].bo, NULL);
+ r600_bo_reference(ctx->radeon , &block->reloc[2].bo, NULL);
if (state->regs[0].bo) {
/* VERTEX RESOURCE, we preted there is 2 bo to relocate so
* we have single case btw VERTEX & TEXTURE resource
*/
- radeon_ws_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[0].bo);
- radeon_ws_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[0].bo);
+ r600_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[0].bo);
+ r600_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[0].bo);
} else {
/* TEXTURE RESOURCE */
- radeon_ws_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[2].bo);
- radeon_ws_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[3].bo);
+ r600_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[2].bo);
+ r600_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[3].bo);
}
if (!(block->status & R600_BLOCK_STATUS_DIRTY)) {
block->status |= R600_BLOCK_STATUS_ENABLED;
@@ -881,18 +881,18 @@ static inline void evergreen_resource_set(struct r600_context *ctx, struct r600_
block->reg[5] = state->regs[5].value;
block->reg[6] = state->regs[6].value;
block->reg[7] = state->regs[7].value;
- radeon_ws_bo_reference(ctx->radeon, &block->reloc[1].bo, NULL);
- radeon_ws_bo_reference(ctx->radeon , &block->reloc[2].bo, NULL);
+ r600_bo_reference(ctx->radeon, &block->reloc[1].bo, NULL);
+ r600_bo_reference(ctx->radeon , &block->reloc[2].bo, NULL);
if (state->regs[0].bo) {
/* VERTEX RESOURCE, we preted there is 2 bo to relocate so
* we have single case btw VERTEX & TEXTURE resource
*/
- radeon_ws_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[0].bo);
- radeon_ws_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[0].bo);
+ r600_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[0].bo);
+ r600_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[0].bo);
} else {
/* TEXTURE RESOURCE */
- radeon_ws_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[2].bo);
- radeon_ws_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[3].bo);
+ r600_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[2].bo);
+ r600_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[3].bo);
}
if (!(block->status & R600_BLOCK_STATUS_DIRTY)) {
block->status |= R600_BLOCK_STATUS_ENABLED;
diff --git a/src/gallium/winsys/r600/drm/r600_hw_context.c b/src/gallium/winsys/r600/drm/r600_hw_context.c
index 0a1b3a9419..48727b9e6b 100644
--- a/src/gallium/winsys/r600/drm/r600_hw_context.c
+++ b/src/gallium/winsys/r600/drm/r600_hw_context.c
@@ -751,7 +751,7 @@ void r600_context_pipe_state_set(struct r600_context *ctx, struct r600_pipe_stat
if (block->pm4_bo_index[id]) {
/* find relocation */
id = block->pm4_bo_index[id];
- radeon_ws_bo_reference(ctx->radeon, &block->reloc[id].bo, state->regs[i].bo);
+ r600_bo_reference(ctx->radeon, &block->reloc[id].bo, state->regs[i].bo);
}
if (!(block->status & R600_BLOCK_STATUS_DIRTY)) {
block->status |= R600_BLOCK_STATUS_ENABLED;
@@ -770,8 +770,8 @@ static inline void r600_context_pipe_state_set_resource(struct r600_context *ctx
block = range->blocks[CTX_BLOCK_ID(ctx, offset)];
if (state == NULL) {
block->status &= ~(R600_BLOCK_STATUS_ENABLED | R600_BLOCK_STATUS_DIRTY);
- radeon_ws_bo_reference(ctx->radeon, &block->reloc[1].bo, NULL);
- radeon_ws_bo_reference(ctx->radeon , &block->reloc[2].bo, NULL);
+ r600_bo_reference(ctx->radeon, &block->reloc[1].bo, NULL);
+ r600_bo_reference(ctx->radeon , &block->reloc[2].bo, NULL);
return;
}
block->reg[0] = state->regs[0].value;
@@ -781,18 +781,18 @@ static inline void r600_context_pipe_state_set_resource(struct r600_context *ctx
block->reg[4] = state->regs[4].value;
block->reg[5] = state->regs[5].value;
block->reg[6] = state->regs[6].value;
- radeon_ws_bo_reference(ctx->radeon, &block->reloc[1].bo, NULL);
- radeon_ws_bo_reference(ctx->radeon , &block->reloc[2].bo, NULL);
+ r600_bo_reference(ctx->radeon, &block->reloc[1].bo, NULL);
+ r600_bo_reference(ctx->radeon , &block->reloc[2].bo, NULL);
if (state->regs[0].bo) {
/* VERTEX RESOURCE, we preted there is 2 bo to relocate so
* we have single case btw VERTEX & TEXTURE resource
*/
- radeon_ws_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[0].bo);
- radeon_ws_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[0].bo);
+ r600_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[0].bo);
+ r600_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[0].bo);
} else {
/* TEXTURE RESOURCE */
- radeon_ws_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[2].bo);
- radeon_ws_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[3].bo);
+ r600_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[2].bo);
+ r600_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[3].bo);
}
if (!(block->status & R600_BLOCK_STATUS_DIRTY)) {
block->status |= R600_BLOCK_STATUS_ENABLED;
@@ -1151,7 +1151,7 @@ static void r600_query_result(struct r600_context *ctx, struct r600_query *query
u32 *results;
int i;
- results = radeon_ws_bo_map(ctx->radeon, query->buffer, 0, NULL);
+ results = r600_bo_map(ctx->radeon, query->buffer, 0, NULL);
for (i = 0; i < query->num_results; i += 4) {
start = (u64)results[i] | (u64)results[i + 1] << 32;
end = (u64)results[i + 2] | (u64)results[i + 3] << 32;
@@ -1159,7 +1159,7 @@ static void r600_query_result(struct r600_context *ctx, struct r600_query *query
query->result += end - start;
}
}
- radeon_ws_bo_unmap(ctx->radeon, query->buffer);
+ r600_bo_unmap(ctx->radeon, query->buffer);
query->num_results = 0;
}
@@ -1222,7 +1222,7 @@ struct r600_query *r600_context_query_create(struct r600_context *ctx, unsigned
query->type = query_type;
query->buffer_size = 4096;
- query->buffer = radeon_ws_bo(ctx->radeon, query->buffer_size, 1, 0);
+ query->buffer = r600_bo(ctx->radeon, query->buffer_size, 1, 0);
if (!query->buffer) {
free(query);
return NULL;
@@ -1235,7 +1235,7 @@ struct r600_query *r600_context_query_create(struct r600_context *ctx, unsigned
void r600_context_query_destroy(struct r600_context *ctx, struct r600_query *query)
{
- radeon_ws_bo_reference(ctx->radeon, &query->buffer, NULL);
+ r600_bo_reference(ctx->radeon, &query->buffer, NULL);
LIST_DEL(&query->list);
free(query);
}
diff --git a/src/gallium/winsys/r600/drm/r600_priv.h b/src/gallium/winsys/r600/drm/r600_priv.h
index fdca6f01e8..4bd2c278bc 100644
--- a/src/gallium/winsys/r600/drm/r600_priv.h
+++ b/src/gallium/winsys/r600/drm/r600_priv.h
@@ -65,7 +65,7 @@ struct radeon_bo {
void *data;
};
-struct radeon_ws_bo {
+struct r600_bo {
struct pipe_reference reference;
struct pb_buffer *pb;
};
@@ -93,9 +93,9 @@ struct pb_manager *radeon_bo_pbmgr_create(struct radeon *radeon);
struct pb_buffer *radeon_bo_pb_create_buffer_from_handle(struct pb_manager *_mgr,
uint32_t handle);
-/* radeon_ws_bo.c */
-unsigned radeon_ws_bo_get_handle(struct radeon_ws_bo *bo);
-unsigned radeon_ws_bo_get_size(struct radeon_ws_bo *bo);
+/* r600_bo.c */
+unsigned r600_bo_get_handle(struct r600_bo *bo);
+unsigned r600_bo_get_size(struct r600_bo *bo);
#define CTX_RANGE_ID(ctx, offset) (((offset) >> (ctx)->hash_shift) & 255)
#define CTX_BLOCK_ID(ctx, offset) ((offset) & ((1 << (ctx)->hash_shift) - 1))
diff --git a/src/gallium/winsys/r600/drm/radeon_ws_bo.c b/src/gallium/winsys/r600/drm/radeon_ws_bo.c
index ed3b4e72bf..a502c7e252 100644
--- a/src/gallium/winsys/r600/drm/radeon_ws_bo.c
+++ b/src/gallium/winsys/r600/drm/radeon_ws_bo.c
@@ -28,10 +28,10 @@
#include <pipebuffer/pb_bufmgr.h>
#include "r600_priv.h"
-struct radeon_ws_bo *radeon_ws_bo(struct radeon *radeon,
+struct r600_bo *r600_bo(struct radeon *radeon,
unsigned size, unsigned alignment, unsigned usage)
{
- struct radeon_ws_bo *ws_bo = calloc(1, sizeof(struct radeon_ws_bo));
+ struct r600_bo *ws_bo = calloc(1, sizeof(struct r600_bo));
struct pb_desc desc;
struct pb_manager *man;
@@ -55,10 +55,10 @@ struct radeon_ws_bo *radeon_ws_bo(struct radeon *radeon,
return ws_bo;
}
-struct radeon_ws_bo *radeon_ws_bo_handle(struct radeon *radeon,
+struct r600_bo *r600_bo_handle(struct radeon *radeon,
unsigned handle)
{
- struct radeon_ws_bo *ws_bo = calloc(1, sizeof(struct radeon_ws_bo));
+ struct r600_bo *ws_bo = calloc(1, sizeof(struct r600_bo));
ws_bo->pb = radeon_bo_pb_create_buffer_from_handle(radeon->kman, handle);
if (!ws_bo->pb) {
@@ -69,35 +69,35 @@ struct radeon_ws_bo *radeon_ws_bo_handle(struct radeon *radeon,
return ws_bo;
}
-void *radeon_ws_bo_map(struct radeon *radeon, struct radeon_ws_bo *bo, unsigned usage, void *ctx)
+void *r600_bo_map(struct radeon *radeon, struct r600_bo *bo, unsigned usage, void *ctx)
{
return pb_map(bo->pb, usage, ctx);
}
-void radeon_ws_bo_unmap(struct radeon *radeon, struct radeon_ws_bo *bo)
+void r600_bo_unmap(struct radeon *radeon, struct r600_bo *bo)
{
pb_unmap(bo->pb);
}
-static void radeon_ws_bo_destroy(struct radeon *radeon, struct radeon_ws_bo *bo)
+static void r600_bo_destroy(struct radeon *radeon, struct r600_bo *bo)
{
if (bo->pb)
pb_reference(&bo->pb, NULL);
free(bo);
}
-void radeon_ws_bo_reference(struct radeon *radeon, struct radeon_ws_bo **dst,
- struct radeon_ws_bo *src)
+void r600_bo_reference(struct radeon *radeon, struct r600_bo **dst,
+ struct r600_bo *src)
{
- struct radeon_ws_bo *old = *dst;
+ struct r600_bo *old = *dst;
if (pipe_reference(&(*dst)->reference, &src->reference)) {
- radeon_ws_bo_destroy(radeon, old);
+ r600_bo_destroy(radeon, old);
}
*dst = src;
}
-unsigned radeon_ws_bo_get_handle(struct radeon_ws_bo *pb_bo)
+unsigned r600_bo_get_handle(struct r600_bo *pb_bo)
{
struct radeon_bo *bo;
@@ -108,7 +108,7 @@ unsigned radeon_ws_bo_get_handle(struct radeon_ws_bo *pb_bo)
return bo->handle;
}
-unsigned radeon_ws_bo_get_size(struct radeon_ws_bo *pb_bo)
+unsigned r600_bo_get_size(struct r600_bo *pb_bo)
{
struct radeon_bo *bo;