diff options
author | Marek Olšák <[email protected]> | 2012-01-30 08:34:13 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-01-31 23:12:30 +0100 |
commit | 4fd97b46a071a8dcec6ec6658dfc835e08f4e2c6 (patch) | |
tree | 1bfedf5736d2591ac094d30e5e4991564cdce662 /src/gallium/drivers | |
parent | 0813e58a3e41faf6f2072d034dfdc6198a3a1fee (diff) |
r600g: remove unused flush code
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/r600/r600_hw_context.c | 36 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_hw_context_priv.h | 4 |
2 files changed, 0 insertions, 40 deletions
diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c index d571df70734..5e6447dceaa 100644 --- a/src/gallium/drivers/r600/r600_hw_context.c +++ b/src/gallium/drivers/r600/r600_hw_context.c @@ -971,29 +971,6 @@ void r600_need_cs_space(struct r600_context *ctx, unsigned num_dw, } } -void r600_context_bo_flush(struct r600_context *ctx, unsigned flush_flags, - unsigned flush_mask, struct r600_resource *bo) -{ - struct radeon_winsys_cs *cs = ctx->cs; - uint64_t va = 0; - - /* if bo has already been flushed */ - if (!(~bo->cs_buf->last_flush & flush_flags)) { - bo->cs_buf->last_flush &= flush_mask; - return; - } - - va = r600_resource_va(&ctx->screen->screen, (void *)bo); - cs->buf[cs->cdw++] = PKT3(PKT3_SURFACE_SYNC, 3, 0); - cs->buf[cs->cdw++] = flush_flags; - cs->buf[cs->cdw++] = (bo->buf->size + 255) >> 8; - cs->buf[cs->cdw++] = va >> 8; - cs->buf[cs->cdw++] = 0x0000000A; - cs->buf[cs->cdw++] = PKT3(PKT3_NOP, 0, 0); - cs->buf[cs->cdw++] = r600_context_bo_reloc(ctx, bo, RADEON_USAGE_WRITE); - bo->cs_buf->last_flush = (bo->cs_buf->last_flush | flush_flags) & flush_mask; -} - void r600_context_dirty_block(struct r600_context *ctx, struct r600_block *block, int dirty, int index) @@ -1074,9 +1051,6 @@ void r600_context_pipe_state_set_resource(struct r600_context *ctx, struct r600_ if (state == NULL) { block->status &= ~(R600_BLOCK_STATUS_ENABLED | R600_BLOCK_STATUS_RESOURCE_DIRTY); - if (block->reloc[1].bo) - block->reloc[1].bo->cs_buf->binding &= ~BO_BOUND_TEXTURE; - pipe_resource_reference((struct pipe_resource**)&block->reloc[1].bo, NULL); pipe_resource_reference((struct pipe_resource**)&block->reloc[2].bo, NULL); LIST_DELINIT(&block->list); @@ -1121,7 +1095,6 @@ void r600_context_pipe_state_set_resource(struct r600_context *ctx, struct r600_ block->reloc[1].bo_usage = state->bo_usage[0]; pipe_resource_reference((struct pipe_resource**)&block->reloc[2].bo, &state->bo[1]->b.b.b); block->reloc[2].bo_usage = state->bo_usage[1]; - state->bo[0]->cs_buf->binding |= BO_BOUND_TEXTURE; } if (is_vertex) @@ -1275,10 +1248,6 @@ void r600_context_block_emit_dirty(struct r600_context *ctx, struct r600_block * if (reloc->bo) { block->pm4[reloc->bo_pm4_index] = r600_context_bo_reloc(ctx, reloc->bo, reloc->bo_usage); - r600_context_bo_flush(ctx, - reloc->flush_flags, - reloc->flush_mask, - reloc->bo); } else { block->pm4[reloc->bo_pm4_index] = 0; } @@ -1333,10 +1302,6 @@ void r600_context_block_resource_emit_dirty(struct r600_context *ctx, struct r60 struct r600_block_reloc *reloc = &block->reloc[block->pm4_bo_index[j]]; block->pm4[reloc->bo_pm4_index] = r600_context_bo_reloc(ctx, reloc->bo, reloc->bo_usage); - r600_context_bo_flush(ctx, - reloc->flush_flags, - reloc->flush_mask, - reloc->bo); } } ctx->flags &= ~R600_CONTEXT_CHECK_EVENT_FLUSH; @@ -1500,7 +1465,6 @@ void r600_context_flush(struct r600_context *ctx, unsigned flags) /* restart */ for (int i = 0; i < ctx->creloc; i++) { - ctx->bo[i]->cs_buf->last_flush = 0; pipe_resource_reference((struct pipe_resource**)&ctx->bo[i], NULL); } ctx->creloc = 0; diff --git a/src/gallium/drivers/r600/r600_hw_context_priv.h b/src/gallium/drivers/r600/r600_hw_context_priv.h index 82cbfa7e133..79fa57b8c81 100644 --- a/src/gallium/drivers/r600/r600_hw_context_priv.h +++ b/src/gallium/drivers/r600/r600_hw_context_priv.h @@ -51,13 +51,9 @@ struct r600_reg { unsigned flush_mask; }; -#define BO_BOUND_TEXTURE 1 - /* * r600_hw_context.c */ -void r600_context_bo_flush(struct r600_context *ctx, unsigned flush_flags, - unsigned flush_mask, struct r600_resource *rbo); struct r600_resource *r600_context_reg_bo(struct r600_context *ctx, unsigned offset); int r600_context_add_block(struct r600_context *ctx, const struct r600_reg *reg, unsigned nreg, unsigned opcode, unsigned offset_base); |