diff options
author | Mark Janes <[email protected]> | 2019-05-30 18:30:25 -0700 |
---|---|---|
committer | Mark Janes <[email protected]> | 2019-08-07 21:33:55 -0700 |
commit | 31758bd36c58c59bf2e872b7844d7fd4c69144db (patch) | |
tree | faf1eb451824f43fafabcc1ee37b2fcbf19b9c64 /src/mesa/drivers/dri/i965/brw_performance_query.c | |
parent | e08a69b7f4dcc817b8816aa38d428c66110da781 (diff) |
intel/perf: move get_free_sample_buf into perf
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_performance_query.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_performance_query.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c index 38b8a053377..cb3bebfc743 100644 --- a/src/mesa/drivers/dri/i965/brw_performance_query.c +++ b/src/mesa/drivers/dri/i965/brw_performance_query.c @@ -146,25 +146,6 @@ dump_perf_queries(struct brw_context *brw) /******************************************************************************/ -static struct oa_sample_buf * -get_free_sample_buf(struct brw_context *brw) -{ - struct exec_node *node = exec_list_pop_head(&brw->perf_ctx.free_sample_buffers); - struct oa_sample_buf *buf; - - if (node) - buf = exec_node_data(struct oa_sample_buf, node, link); - else { - buf = ralloc_size(brw, sizeof(*buf)); - - exec_node_init(&buf->link); - buf->refcount = 0; - buf->len = 0; - } - - return buf; -} - static void reap_old_sample_buffers(struct brw_context *brw) { @@ -451,7 +432,7 @@ read_oa_samples_until(struct brw_context *brw, uint32_t last_timestamp = tail_buf->last_timestamp; while (1) { - struct oa_sample_buf *buf = get_free_sample_buf(brw); + struct oa_sample_buf *buf = gen_perf_get_free_sample_buf(&brw->perf_ctx); uint32_t offset; int len; @@ -1647,7 +1628,7 @@ brw_init_perf_query_info(struct gl_context *ctx) * Begin an OA query we can always take a reference on a buffer * in this list. */ - struct oa_sample_buf *buf = get_free_sample_buf(brw); + struct oa_sample_buf *buf = gen_perf_get_free_sample_buf(&brw->perf_ctx); exec_list_push_head(&brw->perf_ctx.sample_buffers, &buf->link); brw->perf_ctx.oa_stream_fd = -1; |