Lines Matching defs:query
817 struct pipe_query *query,
823 ctx->cond_query = (struct panfrost_query *)query;
863 struct panfrost_query *query = (struct panfrost_query *) q;
865 if (query->rsrc)
866 pipe_resource_reference(&query->rsrc, NULL);
876 struct panfrost_query *query = (struct panfrost_query *) q;
878 switch (query->type) {
884 /* Allocate a resource for the query results to be stored */
885 if (!query->rsrc) {
886 query->rsrc = pipe_buffer_create(ctx->base.screen,
893 pipe_buffer_write(pipe, query->rsrc, 0, size, zeroes);
895 query->msaa = (ctx->pipe_framebuffer.samples > 1);
896 ctx->occlusion_query = query;
905 query->start = ctx->prims_generated;
908 query->start = ctx->tf_prims_generated;
923 struct panfrost_query *query = (struct panfrost_query *) q;
925 switch (query->type) {
933 query->end = ctx->prims_generated;
936 query->end = ctx->tf_prims_generated;
949 struct panfrost_query *query = (struct panfrost_query *) q;
952 struct panfrost_resource *rsrc = pan_resource(query->rsrc);
954 switch (query->type) {
958 panfrost_flush_writer(ctx, rsrc, "Occlusion query");
961 /* Read back the query results */
964 if (query->type == PIPE_QUERY_OCCLUSION_COUNTER) {
969 if (dev->arch <= 5 && !query->msaa)
981 panfrost_flush_all_batches(ctx, "Primitive count query");
982 vresult->u64 = query->end - query->start;