diff options
Diffstat (limited to 'src/gallium')
-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 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_bo.h | 4 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_winsys.h | 10 |
4 files changed, 1 insertions, 53 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); diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.h b/src/gallium/winsys/radeon/drm/radeon_drm_bo.h index 21cfe995510..82ea14105df 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.h +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.h @@ -47,10 +47,6 @@ struct radeon_bo_desc { struct radeon_bo { struct pb_buffer base; - /* Don't move these! */ - unsigned last_flush; - unsigned binding; - struct radeon_bomgr *mgr; struct radeon_drm_winsys *rws; diff --git a/src/gallium/winsys/radeon/drm/radeon_winsys.h b/src/gallium/winsys/radeon/drm/radeon_winsys.h index d33eaa7059c..9afd7f8ac82 100644 --- a/src/gallium/winsys/radeon/drm/radeon_winsys.h +++ b/src/gallium/winsys/radeon/drm/radeon_winsys.h @@ -70,15 +70,7 @@ enum radeon_bo_usage { /* bitfield */ }; struct winsys_handle; - -struct radeon_winsys_cs_handle { /* for write_reloc etc. */ - struct { - struct pb_buffer base; - } _private; - - unsigned last_flush; - unsigned binding; -}; +struct radeon_winsys_cs_handle; struct radeon_winsys_cs { unsigned cdw; /* Number of used dwords. */ |