diff options
author | Dave Airlie <[email protected]> | 2011-06-02 14:40:40 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2011-06-02 14:40:40 +1000 |
commit | c1159eea54b28096652289ee8d06472566d9a4e5 (patch) | |
tree | d40755f8ee63ab1bf4bbb40b4f5827e771fffcb7 | |
parent | 8782fdc1db3cca6817dce4b563855f261694f1ef (diff) |
r600g: remote ctx arg to block/range macros.
These aren't used anymore.
Signed-off-by: Dave Airlie <[email protected]>
-rw-r--r-- | src/gallium/winsys/r600/drm/evergreen_hw_context.c | 12 | ||||
-rw-r--r-- | src/gallium/winsys/r600/drm/r600_hw_context.c | 32 | ||||
-rw-r--r-- | src/gallium/winsys/r600/drm/r600_priv.h | 4 |
3 files changed, 24 insertions, 24 deletions
diff --git a/src/gallium/winsys/r600/drm/evergreen_hw_context.c b/src/gallium/winsys/r600/drm/evergreen_hw_context.c index 0ffad25ecb4..cf8ae5185b4 100644 --- a/src/gallium/winsys/r600/drm/evergreen_hw_context.c +++ b/src/gallium/winsys/r600/drm/evergreen_hw_context.c @@ -878,8 +878,8 @@ static int evergreen_state_sampler_border_init(struct r600_context *ctx, u32 off return r; } /* set proper offset */ - range = &ctx->range[CTX_RANGE_ID(ctx, r600_shader_sampler_border[0].offset)]; - block = range->blocks[CTX_BLOCK_ID(ctx, r600_shader_sampler_border[0].offset)]; + range = &ctx->range[CTX_RANGE_ID(r600_shader_sampler_border[0].offset)]; + block = range->blocks[CTX_BLOCK_ID(r600_shader_sampler_border[0].offset)]; block->pm4[1] = (offset - EVERGREEN_CONFIG_REG_OFFSET) >> 2; return 0; } @@ -1051,8 +1051,8 @@ static inline void evergreen_context_pipe_state_set_sampler(struct r600_context int i; int dirty; - range = &ctx->range[CTX_RANGE_ID(ctx, offset)]; - block = range->blocks[CTX_BLOCK_ID(ctx, offset)]; + range = &ctx->range[CTX_RANGE_ID(offset)]; + block = range->blocks[CTX_BLOCK_ID(offset)]; if (state == NULL) { block->status &= ~(R600_BLOCK_STATUS_ENABLED | R600_BLOCK_STATUS_DIRTY); LIST_DELINIT(&block->list); @@ -1089,8 +1089,8 @@ static inline void evergreen_context_pipe_state_set_sampler_border(struct r600_c int i; int dirty; - range = &ctx->range[CTX_RANGE_ID(ctx, fake_offset)]; - block = range->blocks[CTX_BLOCK_ID(ctx, fake_offset)]; + range = &ctx->range[CTX_RANGE_ID(fake_offset)]; + block = range->blocks[CTX_BLOCK_ID(fake_offset)]; if (state == NULL) { block->status &= ~(R600_BLOCK_STATUS_ENABLED | R600_BLOCK_STATUS_DIRTY); LIST_DELINIT(&block->list); diff --git a/src/gallium/winsys/r600/drm/r600_hw_context.c b/src/gallium/winsys/r600/drm/r600_hw_context.c index f8536fd7081..6415268c786 100644 --- a/src/gallium/winsys/r600/drm/r600_hw_context.c +++ b/src/gallium/winsys/r600/drm/r600_hw_context.c @@ -121,14 +121,14 @@ int r600_context_add_block(struct r600_context *ctx, const struct r600_reg *reg, } ctx->nblocks++; for (int j = 0; j < n; j++) { - range = &ctx->range[CTX_RANGE_ID(ctx, reg[i + j].offset)]; + range = &ctx->range[CTX_RANGE_ID(reg[i + j].offset)]; /* create block table if it doesn't exist */ if (!range->blocks) range->blocks = calloc(1 << HASH_SHIFT, sizeof(void *)); if (!range->blocks) return -1; - range->blocks[CTX_BLOCK_ID(ctx, reg[i + j].offset)] = block; + range->blocks[CTX_BLOCK_ID(reg[i + j].offset)] = block; } /* initialize block */ @@ -643,8 +643,8 @@ void r600_context_fini(struct r600_context *ctx) block = ctx->range[i].blocks[j]; if (block) { for (int k = 0, offset = block->start_offset; k < block->nreg; k++, offset += 4) { - range = &ctx->range[CTX_RANGE_ID(ctx, offset)]; - range->blocks[CTX_BLOCK_ID(ctx, offset)] = NULL; + range = &ctx->range[CTX_RANGE_ID(offset)]; + range->blocks[CTX_BLOCK_ID(offset)] = NULL; } for (int k = 1; k <= block->nbo; k++) { r600_bo_reference(ctx->radeon, &block->reloc[k].bo, NULL); @@ -907,8 +907,8 @@ void r600_context_reg(struct r600_context *ctx, unsigned new_val; int dirty; - range = &ctx->range[CTX_RANGE_ID(ctx, offset)]; - block = range->blocks[CTX_BLOCK_ID(ctx, offset)]; + range = &ctx->range[CTX_RANGE_ID(offset)]; + block = range->blocks[CTX_BLOCK_ID(offset)]; id = (offset - block->start_offset) >> 2; dirty = block->status & R600_BLOCK_STATUS_DIRTY; @@ -948,8 +948,8 @@ void r600_context_pipe_state_set(struct r600_context *ctx, struct r600_pipe_stat unsigned id, reloc_id; struct r600_pipe_reg *reg = &state->regs[i]; - range = &ctx->range[CTX_RANGE_ID(ctx, reg->offset)]; - block = range->blocks[CTX_BLOCK_ID(ctx, reg->offset)]; + range = &ctx->range[CTX_RANGE_ID(reg->offset)]; + block = range->blocks[CTX_BLOCK_ID(reg->offset)]; id = (reg->offset - block->start_offset) >> 2; dirty = block->status & R600_BLOCK_STATUS_DIRTY; @@ -984,8 +984,8 @@ void r600_context_pipe_state_set_resource(struct r600_context *ctx, struct r600_ int dirty; int num_regs = ctx->radeon->chip_class >= EVERGREEN ? 8 : 7; - range = &ctx->range[CTX_RANGE_ID(ctx, offset)]; - block = range->blocks[CTX_BLOCK_ID(ctx, offset)]; + range = &ctx->range[CTX_RANGE_ID(offset)]; + block = range->blocks[CTX_BLOCK_ID(offset)]; if (state == NULL) { block->status &= ~(R600_BLOCK_STATUS_ENABLED | R600_BLOCK_STATUS_DIRTY); if (block->reloc[1].bo) @@ -1078,8 +1078,8 @@ static inline void r600_context_pipe_state_set_sampler(struct r600_context *ctx, int i; int dirty; - range = &ctx->range[CTX_RANGE_ID(ctx, offset)]; - block = range->blocks[CTX_BLOCK_ID(ctx, offset)]; + range = &ctx->range[CTX_RANGE_ID(offset)]; + block = range->blocks[CTX_BLOCK_ID(offset)]; if (state == NULL) { block->status &= ~(R600_BLOCK_STATUS_ENABLED | R600_BLOCK_STATUS_DIRTY); LIST_DELINIT(&block->list); @@ -1114,8 +1114,8 @@ static inline void r600_context_pipe_state_set_sampler_border(struct r600_contex int i; int dirty; - range = &ctx->range[CTX_RANGE_ID(ctx, offset)]; - block = range->blocks[CTX_BLOCK_ID(ctx, offset)]; + range = &ctx->range[CTX_RANGE_ID(offset)]; + block = range->blocks[CTX_BLOCK_ID(offset)]; if (state == NULL) { block->status &= ~(R600_BLOCK_STATUS_ENABLED | R600_BLOCK_STATUS_DIRTY); LIST_DELINIT(&block->list); @@ -1167,8 +1167,8 @@ struct r600_bo *r600_context_reg_bo(struct r600_context *ctx, unsigned offset) struct r600_block *block; unsigned id; - range = &ctx->range[CTX_RANGE_ID(ctx, offset)]; - block = range->blocks[CTX_BLOCK_ID(ctx, offset)]; + range = &ctx->range[CTX_RANGE_ID(offset)]; + block = range->blocks[CTX_BLOCK_ID(offset)]; offset -= block->start_offset; id = block->pm4_bo_index[offset >> 2]; if (block->reloc[id].bo) { diff --git a/src/gallium/winsys/r600/drm/r600_priv.h b/src/gallium/winsys/r600/drm/r600_priv.h index d785ede09ea..9093e332132 100644 --- a/src/gallium/winsys/r600/drm/r600_priv.h +++ b/src/gallium/winsys/r600/drm/r600_priv.h @@ -197,8 +197,8 @@ struct r600_bo *r600_bomgr_bo_create(struct r600_bomgr *mgr, #define HASH_SHIFT 9 #define NUM_RANGES (0x42000 - RANGE_OFFSET_START) / (4 << HASH_SHIFT) /* 128 << 9 = 64k */ -#define CTX_RANGE_ID(ctx, offset) ((((offset - RANGE_OFFSET_START) >> 2) >> HASH_SHIFT) & 255) -#define CTX_BLOCK_ID(ctx, offset) (((offset - RANGE_OFFSET_START) >> 2) & ((1 << HASH_SHIFT) - 1)) +#define CTX_RANGE_ID(offset) ((((offset - RANGE_OFFSET_START) >> 2) >> HASH_SHIFT) & 255) +#define CTX_BLOCK_ID(offset) (((offset - RANGE_OFFSET_START) >> 2) & ((1 << HASH_SHIFT) - 1)) /* * radeon_bo.c |