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;
}
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);
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);
}
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 */
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);
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;
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;
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)
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);
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);
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) {