Lines Matching defs:query

497 void context_alloc_occlusion_query(struct wined3d_context *context, struct wined3d_occlusion_query *query)
503 query->id = context->free_occlusion_queries[--context->free_occlusion_query_count];
510 GL_EXTCALL(glGenQueriesARB(1, &query->id));
514 TRACE("Allocated occlusion query %u in context %p.\n", query->id, context);
518 WARN("Occlusion queries not supported, not allocating query id.\n");
519 query->id = 0;
523 query->context = context;
524 list_add_head(&context->occlusion_queries, &query->entry);
527 void context_free_occlusion_query(struct wined3d_occlusion_query *query)
529 struct wined3d_context *context = query->context;
531 list_remove(&query->entry);
532 query->context = NULL;
542 ERR("Failed to grow free list, leaking query %u in context %p.\n", query->id, context);
550 context->free_occlusion_queries[context->free_occlusion_query_count++] = query->id;
554 void context_alloc_event_query(struct wined3d_context *context, struct wined3d_event_query *query)
560 query->object = context->free_event_queries[--context->free_event_query_count];
567 query->object.sync = NULL;
568 TRACE("Allocated event query %p in context %p.\n", query->object.sync, context);
573 GL_EXTCALL(glGenFencesAPPLE(1, &query->object.id));
577 TRACE("Allocated event query %u in context %p.\n", query->object.id, context);
582 GL_EXTCALL(glGenFencesNV(1, &query->object.id));
586 TRACE("Allocated event query %u in context %p.\n", query->object.id, context);
590 WARN("Event queries not supported, not allocating query id.\n");
591 query->object.id = 0;
595 query->context = context;
596 list_add_head(&context->event_queries, &query->entry);
599 void context_free_event_query(struct wined3d_event_query *query)
601 struct wined3d_context *context = query->context;
603 list_remove(&query->entry);
604 query->context = NULL;
614 ERR("Failed to grow free list, leaking query %u in context %p.\n", query->object.id, context);
622 context->free_event_queries[context->free_event_query_count++] = query->object;