diff options
author | Marek Olšák <[email protected]> | 2011-10-28 17:44:02 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-10-28 19:29:04 +0200 |
commit | 671af44b1962a7a138185a4cfb992f6b349de10a (patch) | |
tree | 72fe62c20d1200bd9389441532b5b800e816dddb /src/gallium | |
parent | 68657183b0e42093777034460e0a93624b7ba501 (diff) |
r300g: remove useless code
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r300/r300_context.c | 9 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_context.h | 6 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_emit.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_query.c | 6 |
4 files changed, 3 insertions, 22 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index cacad9fbad2..fb9f34a1ed3 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -62,7 +62,6 @@ static void r300_release_referenced_objects(struct r300_context *r300) (struct pipe_framebuffer_state*)r300->fb_state.state; struct r300_textures_state *textures = (struct r300_textures_state*)r300->textures_state.state; - struct r300_query *query, *temp; unsigned i; /* Framebuffer state. */ @@ -84,12 +83,6 @@ static void r300_release_referenced_objects(struct r300_context *r300) pipe_resource_reference(&r300->dummy_vb, NULL); pipe_resource_reference(&r300->vbo, NULL); - /* If there are any queries pending or not destroyed, remove them now. */ - foreach_s(query, temp, &r300->query_list) { - remove_from_list(query); - FREE(query); - } - r300->context.delete_depth_stencil_alpha_state(&r300->context, r300->dsa_decompress_zmask); } @@ -408,8 +401,6 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen, r300->context.destroy = r300_destroy_context; - make_empty_list(&r300->query_list); - util_slab_create(&r300->pool_transfers, sizeof(struct pipe_transfer), 64, UTIL_SLAB_SINGLETHREADED); diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index b89d6ecce17..08353567f44 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -293,12 +293,6 @@ struct r300_query { /* The buffer where query results are stored. */ struct pb_buffer *buf; struct radeon_winsys_cs_handle *cs_buf; - /* The size of the buffer. */ - unsigned buffer_size; - - /* Linked list members. */ - struct r300_query* prev; - struct r300_query* next; }; struct r300_surface { diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index 2fb448a433a..d93a5786ff8 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -675,8 +675,8 @@ void r300_emit_query_end(struct r300_context* r300) query->num_results += query->num_pipes; /* XXX grab all the results and reset the counter. */ - if (query->num_results >= query->buffer_size / 4 - 4) { - query->num_results = (query->buffer_size / 4) / 2; + if (query->num_results >= query->buf->size / 4 - 4) { + query->num_results = (query->buf->size / 4) / 2; fprintf(stderr, "r300: Rewinding OQBO...\n"); } } diff --git a/src/gallium/drivers/r300/r300_query.c b/src/gallium/drivers/r300/r300_query.c index 3177ce63b99..9e784b5fecf 100644 --- a/src/gallium/drivers/r300/r300_query.c +++ b/src/gallium/drivers/r300/r300_query.c @@ -45,17 +45,14 @@ static struct pipe_query *r300_create_query(struct pipe_context *pipe, return NULL; q->type = query_type; - q->buffer_size = 4096; if (r300screen->caps.family == CHIP_FAMILY_RV530) q->num_pipes = r300screen->info.r300_num_z_pipes; else q->num_pipes = r300screen->info.r300_num_gb_pipes; - insert_at_tail(&r300->query_list, q); - /* Open up the occlusion query buffer. */ - q->buf = r300->rws->buffer_create(r300->rws, q->buffer_size, 4096, + q->buf = r300->rws->buffer_create(r300->rws, 4096, 4096, PIPE_BIND_CUSTOM, PIPE_USAGE_STAGING); q->cs_buf = r300->rws->buffer_get_cs_handle(q->buf); @@ -68,7 +65,6 @@ static void r300_destroy_query(struct pipe_context* pipe, struct r300_query* q = r300_query(query); pb_reference(&q->buf, NULL); - remove_from_list(q); FREE(query); } |