diff options
author | Alex Deucher <[email protected]> | 2009-07-16 11:50:43 -0400 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2009-07-16 11:53:58 -0400 |
commit | 0850776f1afa69d9db62c3991a36fbc343f75d66 (patch) | |
tree | ebbf3d03c4775ae44c661ce366e6695fc150b0aa | |
parent | 00a216fd1e4ea284df9df71128b0e496816cab4d (diff) |
R6xx/r7xx: remove unused function
Spotted by kdekorte on IRC
-rw-r--r-- | src/mesa/drivers/dri/r600/r600_cmdbuf.c | 110 |
1 files changed, 1 insertions, 109 deletions
diff --git a/src/mesa/drivers/dri/r600/r600_cmdbuf.c b/src/mesa/drivers/dri/r600/r600_cmdbuf.c index 95a311dac71..ca9dab8639e 100644 --- a/src/mesa/drivers/dri/r600/r600_cmdbuf.c +++ b/src/mesa/drivers/dri/r600/r600_cmdbuf.c @@ -498,113 +498,6 @@ static void r600_cs_print(struct radeon_cs *cs, FILE *file) { } -static int r600_cs_check_space(struct radeon_cs *cs, struct radeon_cs_space_check *bos, int num_bo) -{ - struct radeon_cs_manager *csm = cs->csm; - int this_op_read = 0, this_op_gart_write = 0, this_op_vram_write = 0; - uint32_t read_domains, write_domain; - int i; - struct radeon_bo *bo; - - /* check the totals for this operation */ - - if (num_bo == 0) - return 0; - - /* prepare */ - for (i = 0; i < num_bo; i++) - { - bo = bos[i].bo; - - bos[i].new_accounted = 0; - read_domains = bos[i].read_domains; - write_domain = bos[i].write_domain; - - /* pinned bos don't count */ - if (radeon_bo_is_static(bo)) - continue; - - /* already accounted this bo */ - if (write_domain && (write_domain == bo->space_accounted)) - continue; - - if (read_domains && ((read_domains << 16) == bo->space_accounted)) - continue; - - if (bo->space_accounted == 0) - { - if (write_domain == RADEON_GEM_DOMAIN_VRAM) - this_op_vram_write += bo->size; - else if (write_domain == RADEON_GEM_DOMAIN_GTT) - this_op_gart_write += bo->size; - else - this_op_read += bo->size; - bos[i].new_accounted = (read_domains << 16) | write_domain; - } - else - { - uint16_t old_read, old_write; - - old_read = bo->space_accounted >> 16; - old_write = bo->space_accounted & 0xffff; - - if (write_domain && (old_read & write_domain)) - { - bos[i].new_accounted = write_domain; - /* moving from read to a write domain */ - if (write_domain == RADEON_GEM_DOMAIN_VRAM) - { - this_op_read -= bo->size; - this_op_vram_write += bo->size; - } - else if (write_domain == RADEON_GEM_DOMAIN_VRAM) - { - this_op_read -= bo->size; - this_op_gart_write += bo->size; - } - } - else if (read_domains & old_write) - { - bos[i].new_accounted = bo->space_accounted & 0xffff; - } - else - { - /* rewrite the domains */ - if (write_domain != old_write) - fprintf(stderr,"WRITE DOMAIN RELOC FAILURE 0x%x %d %d\n", bo->handle, write_domain, old_write); - if (read_domains != old_read) - fprintf(stderr,"READ DOMAIN RELOC FAILURE 0x%x %d %d\n", bo->handle, read_domains, old_read); - return RADEON_CS_SPACE_FLUSH; - } - } - } - - if (this_op_read < 0) - this_op_read = 0; - - /* check sizes - operation first */ - if ((this_op_read + this_op_gart_write > csm->gart_limit) || - (this_op_vram_write > csm->vram_limit)) { - return RADEON_CS_SPACE_OP_TO_BIG; - } - - if (((csm->vram_write_used + this_op_vram_write) > csm->vram_limit) || - ((csm->read_used + csm->gart_write_used + this_op_gart_write + this_op_read) > csm->gart_limit)) { - return RADEON_CS_SPACE_FLUSH; - } - - csm->gart_write_used += this_op_gart_write; - csm->vram_write_used += this_op_vram_write; - csm->read_used += this_op_read; - /* commit */ - for (i = 0; i < num_bo; i++) { - bo = bos[i].bo; - bo->space_accounted = bos[i].new_accounted; - } - - return RADEON_CS_SPACE_OK; -} - static struct radeon_cs_funcs r600_cs_funcs = { r600_cs_create, r600_cs_write_reloc, @@ -614,8 +507,7 @@ static struct radeon_cs_funcs r600_cs_funcs = { r600_cs_destroy, r600_cs_erase, r600_cs_need_flush, - r600_cs_print, - r600_cs_check_space + r600_cs_print }; struct radeon_cs_manager * r600_radeon_cs_manager_legacy_ctor(struct radeon_context *ctx) |