r600g: remove one pointless flush
It's not useful for anything. The rest of the patch is just a cleanup resulting from some of the variables being no longer used. There are no piglit regressions.
This commit is contained in:
@@ -176,10 +176,6 @@ struct r600_query {
|
||||
unsigned results_end;
|
||||
/* Size of the result */
|
||||
unsigned result_size;
|
||||
/* Count of new queries started in one stream without flushing */
|
||||
unsigned queries_emitted;
|
||||
/* State flags */
|
||||
boolean flushed;
|
||||
/* The buffer where query results are stored. It's used as a ring,
|
||||
* data blocks for current query are stored sequentially from
|
||||
* results_start to results_end, with wrapping on the buffer end */
|
||||
@@ -258,7 +254,7 @@ boolean r600_context_query_result(struct r600_context *ctx,
|
||||
void r600_query_begin(struct r600_context *ctx, struct r600_query *query);
|
||||
void r600_query_end(struct r600_context *ctx, struct r600_query *query);
|
||||
void r600_context_queries_suspend(struct r600_context *ctx);
|
||||
void r600_context_queries_resume(struct r600_context *ctx, boolean flushed);
|
||||
void r600_context_queries_resume(struct r600_context *ctx);
|
||||
void r600_query_predication(struct r600_context *ctx, struct r600_query *query, int operation,
|
||||
int flag_wait);
|
||||
void r600_context_emit_fence(struct r600_context *ctx, struct r600_resource *fence,
|
||||
|
||||
@@ -96,7 +96,7 @@ static void r600_blitter_end(struct pipe_context *ctx)
|
||||
rctx->saved_render_cond_mode);
|
||||
rctx->saved_render_cond = NULL;
|
||||
}
|
||||
r600_context_queries_resume(&rctx->ctx, FALSE);
|
||||
r600_context_queries_resume(&rctx->ctx);
|
||||
}
|
||||
|
||||
static unsigned u_num_layers(struct pipe_resource *r, unsigned level)
|
||||
|
||||
@@ -1519,7 +1519,7 @@ void r600_context_flush(struct r600_context *ctx, unsigned flags)
|
||||
r600_init_cs(ctx);
|
||||
|
||||
/* resume queries */
|
||||
r600_context_queries_resume(ctx, TRUE);
|
||||
r600_context_queries_resume(ctx);
|
||||
|
||||
/* set all valid group as dirty so they get reemited on
|
||||
* next draw command
|
||||
@@ -1617,18 +1617,6 @@ void r600_query_begin(struct r600_context *ctx, struct r600_query *query)
|
||||
r600_context_flush(ctx, RADEON_FLUSH_ASYNC);
|
||||
}
|
||||
|
||||
if (query->type == PIPE_QUERY_OCCLUSION_COUNTER) {
|
||||
/* Count queries emitted without flushes, and flush if more than
|
||||
* half of buffer used, to avoid overwriting results which may be
|
||||
* still in use. */
|
||||
if (query->flushed) {
|
||||
query->queries_emitted = 1;
|
||||
} else {
|
||||
if (++query->queries_emitted > query->buffer->b.b.b.width0 / query->result_size / 2)
|
||||
r600_context_flush(ctx, RADEON_FLUSH_ASYNC);
|
||||
}
|
||||
}
|
||||
|
||||
new_results_end = query->results_end + query->result_size;
|
||||
if (new_results_end >= query->buffer->b.b.b.width0)
|
||||
new_results_end = 0;
|
||||
@@ -1711,8 +1699,6 @@ void r600_query_end(struct r600_context *ctx, struct r600_query *query)
|
||||
if (query->results_end >= query->buffer->b.b.b.width0)
|
||||
query->results_end = 0;
|
||||
|
||||
query->flushed = FALSE;
|
||||
|
||||
ctx->num_query_running--;
|
||||
}
|
||||
|
||||
@@ -1840,14 +1826,11 @@ void r600_context_queries_suspend(struct r600_context *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
void r600_context_queries_resume(struct r600_context *ctx, boolean flushed)
|
||||
void r600_context_queries_resume(struct r600_context *ctx)
|
||||
{
|
||||
struct r600_query *query;
|
||||
|
||||
LIST_FOR_EACH_ENTRY(query, &ctx->active_query_list, list) {
|
||||
if (flushed)
|
||||
query->flushed = TRUE;
|
||||
|
||||
r600_query_begin(ctx, query);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user