summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_query.h
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2019-02-25 10:55:57 +1100
committerTimothy Arceri <[email protected]>2019-02-26 09:55:41 +1100
commit603206d0a61628deba3f0754324d4b7f382effe5 (patch)
tree79934723dae4c509cc2c65385108d2ce86c3b300 /src/gallium/drivers/radeonsi/si_query.h
parent7c1bf075f30527ec9724fe03f0a32d9110bebd0b (diff)
radeonsi: fix query buffer allocation
Fix the logic for buffer full check on alloc. This patch just takes the fix Nicolai attached to the bug report and updates it to work on master. Fixes: e0f0d3675d4 ("radeonsi: factor si_query_buffer logic out of si_query_hw") Reviewed-by: Marek Olšák <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109561
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_query.h')
-rw-r--r--src/gallium/drivers/radeonsi/si_query.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_query.h b/src/gallium/drivers/radeonsi/si_query.h
index aaf0bd03aca..c61af51d57c 100644
--- a/src/gallium/drivers/radeonsi/si_query.h
+++ b/src/gallium/drivers/radeonsi/si_query.h
@@ -177,12 +177,13 @@ struct si_query_hw_ops {
struct si_query_buffer {
/* The buffer where query results are stored. */
struct si_resource *buf;
- /* Offset of the next free result after current query data */
- unsigned results_end;
/* If a query buffer is full, a new buffer is created and the old one
* is put in here. When we calculate the result, we sum up the samples
* from all buffers. */
struct si_query_buffer *previous;
+ /* Offset of the next free result after current query data */
+ unsigned results_end;
+ bool unprepared;
};
void si_query_buffer_destroy(struct si_screen *sctx, struct si_query_buffer *buffer);