diff options
author | Jerome Glisse <[email protected]> | 2010-10-05 15:23:07 -0400 |
---|---|---|
committer | Jerome Glisse <[email protected]> | 2010-10-05 15:23:07 -0400 |
commit | 2cf3199ee3b0014bc426bc3163dfa279c00eabb3 (patch) | |
tree | 44c77c596395483ee1d01883b0a420be9eae7650 /src/gallium/winsys/r600 | |
parent | ac8a1ebe55b08180945ffaebcff6b3bed336c9ec (diff) |
r600g: simplify block relocation
Since flush rework there could be only one relocation per
register in a block.
Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/winsys/r600')
-rw-r--r-- | src/gallium/winsys/r600/drm/r600_hw_context.c | 2 | ||||
-rw-r--r-- | src/gallium/winsys/r600/drm/r600_priv.h | 14 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/gallium/winsys/r600/drm/r600_hw_context.c b/src/gallium/winsys/r600/drm/r600_hw_context.c index 5019c26df05..b379499f060 100644 --- a/src/gallium/winsys/r600/drm/r600_hw_context.c +++ b/src/gallium/winsys/r600/drm/r600_hw_context.c @@ -96,7 +96,7 @@ int r600_context_add_block(struct r600_context *ctx, const struct r600_reg *reg, block->pm4[block->pm4_ndwords++] = 0x00000000; block->reloc[block->nbo].flush_flags = reg[i+j].flush_flags; block->reloc[block->nbo].flush_mask = reg[i+j].flush_mask; - block->reloc[block->nbo].bo_pm4_index[block->reloc[block->nbo].nreloc++] = block->pm4_ndwords - 1; + block->reloc[block->nbo].bo_pm4_index = block->pm4_ndwords - 1; } } for (j = 0; j < n; j++) { diff --git a/src/gallium/winsys/r600/drm/r600_priv.h b/src/gallium/winsys/r600/drm/r600_priv.h index 9a38cc51f70..ea2cf347785 100644 --- a/src/gallium/winsys/r600/drm/r600_priv.h +++ b/src/gallium/winsys/r600/drm/r600_priv.h @@ -149,15 +149,13 @@ static inline void r600_context_block_emit_dirty(struct r600_context *ctx, struc if (block->pm4_bo_index[j]) { /* find relocation */ id = block->pm4_bo_index[j]; - for (int k = 0; k < block->reloc[id].nreloc; k++) { - r600_context_bo_reloc(ctx, - &block->pm4[block->reloc[id].bo_pm4_index[k]], + r600_context_bo_reloc(ctx, + &block->pm4[block->reloc[id].bo_pm4_index], + block->reloc[id].bo); + r600_context_bo_flush(ctx, + block->reloc[id].flush_flags, + block->reloc[id].flush_mask, block->reloc[id].bo); - r600_context_bo_flush(ctx, - block->reloc[id].flush_flags, - block->reloc[id].flush_mask, - block->reloc[id].bo); - } } } memcpy(&ctx->pm4[ctx->pm4_cdwords], block->pm4, block->pm4_ndwords * 4); |