From: Marek Olšák Date: Tue, 21 Jun 2016 13:49:25 +0000 (+0200) Subject: gallium/radeon: add flag R600_QUERY_HW_FLAG_BEGIN_RESUMES X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e607a6be2bd2507f704dd8f10013fe96f4b1b8da;p=mesa.git gallium/radeon: add flag R600_QUERY_HW_FLAG_BEGIN_RESUMES Reviewed-by: Nicolai Hähnle --- diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index d4d7292bcea..e6fda0c3bd6 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -763,7 +763,8 @@ bool r600_query_hw_begin(struct r600_common_context *rctx, return false; } - r600_query_hw_reset_buffers(rctx, query); + if (!(query->flags & R600_QUERY_HW_FLAG_BEGIN_RESUMES)) + r600_query_hw_reset_buffers(rctx, query); r600_query_hw_emit_start(rctx, query); if (!query->buffer.buf) diff --git a/src/gallium/drivers/radeon/r600_query.h b/src/gallium/drivers/radeon/r600_query.h index e99a9119ee9..1a0ac807844 100644 --- a/src/gallium/drivers/radeon/r600_query.h +++ b/src/gallium/drivers/radeon/r600_query.h @@ -92,6 +92,8 @@ struct r600_query { enum { R600_QUERY_HW_FLAG_NO_START = (1 << 0), R600_QUERY_HW_FLAG_PREDICATE = (1 << 1), + /* whether begin_query doesn't clear the result */ + R600_QUERY_HW_FLAG_BEGIN_RESUMES = (1 << 2), }; struct r600_query_hw_ops {