gallium/radeon: add flag R600_QUERY_HW_FLAG_BEGIN_RESUMES
authorMarek Olšák <marek.olsak@amd.com>
Tue, 21 Jun 2016 13:49:25 +0000 (15:49 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 29 Jun 2016 18:12:00 +0000 (20:12 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/r600_query.c
src/gallium/drivers/radeon/r600_query.h

index d4d7292bceaf93f5de4ccff9b98e98a22e062006..e6fda0c3bd6c28a5b90e90f18cb38e919c15e5c6 100644 (file)
@@ -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)
index e99a9119ee9a820a46a16606a35a6b23dfd06964..1a0ac807844e53d66c15ac4f46741e8b7ba3c2a0 100644 (file)
@@ -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 {