summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/nouveau/nouveau_query.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_query.c')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_query.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_query.c b/src/mesa/drivers/dri/nouveau/nouveau_query.c
index de3f5b0378..e5c1750a8e 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_query.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_query.c
@@ -68,7 +68,7 @@ nouveauBeginQuery(GLcontext *ctx, GLenum target, struct gl_query_object *q)
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
nouveau_query_object *nq = (nouveau_query_object *)q;
- nouveau_notifier_reset(nmesa->queryNotifier, nq->notifier_id);
+ nouveau_notifier_reset(ctx, nmesa->queryNotifier, nq->notifier_id);
switch (nmesa->screen->card->type) {
case NV_20:
@@ -105,12 +105,13 @@ nouveauUpdateQuery(GLcontext *ctx, GLenum target, struct gl_query_object *q)
nouveau_query_object *nq = (nouveau_query_object *)q;
int status;
- status = nouveau_notifier_status(nmesa->queryNotifier,
+ status = nouveau_notifier_status(ctx, nmesa->queryNotifier,
nq->notifier_id);
q->Ready = (status == NV_NOTIFY_STATE_STATUS_COMPLETED);
if (q->Ready)
- q->Result = nouveau_notifier_return_val(nmesa->queryNotifier,
+ q->Result = nouveau_notifier_return_val(ctx,
+ nmesa->queryNotifier,
nq->notifier_id);
}
@@ -120,7 +121,7 @@ nouveauWaitQueryResult(GLcontext *ctx, GLenum target, struct gl_query_object *q)
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
nouveau_query_object *nq = (nouveau_query_object *)q;
- nouveau_notifier_wait_status(nmesa->queryNotifier, nq->notifier_id,
+ nouveau_notifier_wait_status(ctx, nmesa->queryNotifier, nq->notifier_id,
NV_NOTIFY_STATE_STATUS_COMPLETED, 0);
nouveauUpdateQuery(ctx, target, q);
}
@@ -166,7 +167,8 @@ nouveauQueryInitFuncs(GLcontext *ctx)
if (nmesa->screen->card->type < NV_20)
return;
- nmesa->query_object_max = (0x4000 / 32);
+ /* Reserve half the notifier block for use as query objects */
+ nmesa->query_object_max = (nmesa->fifo.drm.notifier_size / 2) / 32;
nmesa->queryNotifier =
nouveau_notifier_new(ctx, NvQueryNotify,
nmesa->query_object_max);