• Home
  • Raw
  • Download

Lines Matching refs:query

140    struct gfx10_sh_query *query = (struct gfx10_sh_query *)rquery;  in gfx10_sh_query_destroy()  local
141 gfx10_release_query_buffers(sctx, query->first, query->last); in gfx10_sh_query_destroy()
142 FREE(query); in gfx10_sh_query_destroy()
147 struct gfx10_sh_query *query = (struct gfx10_sh_query *)rquery; in gfx10_sh_query_begin() local
149 gfx10_release_query_buffers(sctx, query->first, query->last); in gfx10_sh_query_begin()
150 query->first = query->last = NULL; in gfx10_sh_query_begin()
155 query->first = list_last_entry(&sctx->shader_query_buffers, struct gfx10_sh_query_buffer, list); in gfx10_sh_query_begin()
156 query->first_begin = query->first->head; in gfx10_sh_query_begin()
159 query->first->refcount++; in gfx10_sh_query_begin()
166 struct gfx10_sh_query *query = (struct gfx10_sh_query *)rquery; in gfx10_sh_query_end() local
168 if (unlikely(!query->first)) in gfx10_sh_query_end()
171 query->last = list_last_entry(&sctx->shader_query_buffers, struct gfx10_sh_query_buffer, list); in gfx10_sh_query_end()
172 query->last_end = query->last->head; in gfx10_sh_query_end()
175 if (query->last_end != 0) { in gfx10_sh_query_end()
176 uint64_t fence_va = query->last->buf->gpu_address; in gfx10_sh_query_end()
177 fence_va += query->last_end - sizeof(struct gfx10_sh_query_buffer_mem); in gfx10_sh_query_end()
180 EOP_INT_SEL_NONE, EOP_DATA_SEL_VALUE_32BIT, query->last->buf, fence_va, in gfx10_sh_query_end()
199 static void gfx10_sh_query_add_result(struct gfx10_sh_query *query, in gfx10_sh_query_add_result() argument
205 switch (query->b.type) { in gfx10_sh_query_add_result()
207 result->u64 += qmem->stream[query->stream].emitted_primitives & mask; in gfx10_sh_query_add_result()
210 result->u64 += qmem->stream[query->stream].generated_primitives & mask; in gfx10_sh_query_add_result()
214 qmem->stream[query->stream].emitted_primitives & mask; in gfx10_sh_query_add_result()
216 qmem->stream[query->stream].generated_primitives & mask; in gfx10_sh_query_add_result()
219 result->b |= qmem->stream[query->stream].emitted_primitives != in gfx10_sh_query_add_result()
220 qmem->stream[query->stream].generated_primitives; in gfx10_sh_query_add_result()
236 struct gfx10_sh_query *query = (struct gfx10_sh_query *)rquery; in gfx10_sh_query_get_result() local
238 util_query_clear_result(result, query->b.type); in gfx10_sh_query_get_result()
240 if (unlikely(!query->first)) in gfx10_sh_query_get_result()
242 assert(query->last); in gfx10_sh_query_get_result()
244 for (struct gfx10_sh_query_buffer *qbuf = query->last;; in gfx10_sh_query_get_result()
259 if (qbuf == query->first) in gfx10_sh_query_get_result()
260 results_begin = query->first_begin; in gfx10_sh_query_get_result()
261 if (qbuf == query->last) in gfx10_sh_query_get_result()
262 results_end = query->last_end; in gfx10_sh_query_get_result()
268 gfx10_sh_query_add_result(query, qmem, result); in gfx10_sh_query_get_result()
271 if (qbuf == query->first) in gfx10_sh_query_get_result()
284 struct gfx10_sh_query *query = (struct gfx10_sh_query *)rquery; in gfx10_sh_query_get_result_resource() local
295 if (query->first != query->last) { in gfx10_sh_query_get_result_resource()
313 switch (query->b.type) { in gfx10_sh_query_get_result_resource()
315 consts.offset = 4 * sizeof(uint64_t) * query->stream + 2 * sizeof(uint64_t); in gfx10_sh_query_get_result_resource()
319 consts.offset = 4 * sizeof(uint64_t) * query->stream + 3 * sizeof(uint64_t); in gfx10_sh_query_get_result_resource()
323 consts.offset = sizeof(uint32_t) * (4 * index + query->stream); in gfx10_sh_query_get_result_resource()
327 consts.offset = 4 * sizeof(uint64_t) * query->stream; in gfx10_sh_query_get_result_resource()
366 struct gfx10_sh_query_buffer *qbuf = query->first; in gfx10_sh_query_get_result_resource()
368 unsigned begin = qbuf == query->first ? query->first_begin : 0; in gfx10_sh_query_get_result_resource()
369 unsigned end = qbuf == query->last ? query->last_end : qbuf->buf->b.b.width0; in gfx10_sh_query_get_result_resource()
379 if (qbuf != query->first) in gfx10_sh_query_get_result_resource()
381 if (qbuf != query->last) in gfx10_sh_query_get_result_resource()
384 if (qbuf == query->last) { in gfx10_sh_query_get_result_resource()
412 if (qbuf == query->last) in gfx10_sh_query_get_result_resource()
432 struct gfx10_sh_query *query = CALLOC_STRUCT(gfx10_sh_query); in gfx10_sh_query_create() local
433 if (unlikely(!query)) in gfx10_sh_query_create()
436 query->b.ops = &gfx10_sh_query_ops; in gfx10_sh_query_create()
437 query->b.type = query_type; in gfx10_sh_query_create()
438 query->stream = index; in gfx10_sh_query_create()
440 return (struct pipe_query *)query; in gfx10_sh_query_create()