summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/nv40/nv40_query.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2007-12-09 03:22:14 +1100
committerBen Skeggs <skeggsb@gmail.com>2007-12-09 12:12:50 +1100
commitb8965bee404cb36ccd97ac089fbd3ffc63268080 (patch)
treec303b5737dd51f9cecc79a76389b63dc79f9f8a8 /src/mesa/pipe/nv40/nv40_query.c
parent274a3d9cb6a196c1b191769f581915cf5f8dccfe (diff)
nouveau: adapt to gallium interface changes
Diffstat (limited to 'src/mesa/pipe/nv40/nv40_query.c')
-rw-r--r--src/mesa/pipe/nv40/nv40_query.c39
1 files changed, 23 insertions, 16 deletions
diff --git a/src/mesa/pipe/nv40/nv40_query.c b/src/mesa/pipe/nv40/nv40_query.c
index efd81e6640..bcd6fe0cf4 100644
--- a/src/mesa/pipe/nv40/nv40_query.c
+++ b/src/mesa/pipe/nv40/nv40_query.c
@@ -16,7 +16,7 @@ nv40_query_object_find(struct nv40_context *nv40, struct pipe_query_object *q)
return -1;
}
-void
+static void
nv40_query_begin(struct pipe_context *pipe, struct pipe_query_object *q)
{
struct nv40_context *nv40 = (struct nv40_context *)pipe;
@@ -53,7 +53,24 @@ nv40_query_update(struct pipe_context *pipe, struct pipe_query_object *q)
}
}
-void
+static void
+nv40_query_wait(struct pipe_context *pipe, struct pipe_query_object *q)
+{
+ nv40_query_update(pipe, q);
+ if (!q->ready) {
+ struct nv40_context *nv40 = (struct nv40_context *)pipe;
+ int id;
+
+ id = nv40_query_object_find(nv40, q);
+ assert(id >= 0);
+
+ nv40->nvws->notifier_wait(nv40->query, id, 0, 0);
+ nv40_query_update(pipe, q);
+ assert(q->ready);
+ }
+}
+
+static void
nv40_query_end(struct pipe_context *pipe, struct pipe_query_object *q)
{
struct nv40_context *nv40 = (struct nv40_context *)pipe;
@@ -80,19 +97,9 @@ nv40_query_end(struct pipe_context *pipe, struct pipe_query_object *q)
}
void
-nv40_query_wait(struct pipe_context *pipe, struct pipe_query_object *q)
+nv40_init_query_functions(struct nv40_context *nv40)
{
- nv40_query_update(pipe, q);
- if (!q->ready) {
- struct nv40_context *nv40 = (struct nv40_context *)pipe;
- int id;
-
- id = nv40_query_object_find(nv40, q);
- assert(id >= 0);
-
- nv40->nvws->notifier_wait(nv40->query, id, 0, 0);
- nv40_query_update(pipe, q);
- assert(q->ready);
- }
+ nv40->pipe.begin_query = nv40_query_begin;
+ nv40->pipe.end_query = nv40_query_end;
+ nv40->pipe.wait_query = nv40_query_wait;
}
-