summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nvc0/nvc0_query.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_query.c')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_query.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_query.c b/src/gallium/drivers/nvc0/nvc0_query.c
index e5e43c0e7a..ead015b6b8 100644
--- a/src/gallium/drivers/nvc0/nvc0_query.c
+++ b/src/gallium/drivers/nvc0/nvc0_query.c
@@ -41,7 +41,7 @@ struct nvc0_query {
uint32_t offset; /* base + i * 16 */
boolean ready;
boolean is64bit;
- struct nvc0_mm_allocation *mm;
+ struct nouveau_mm_allocation *mm;
};
#define NVC0_QUERY_ALLOC_SPACE 128
@@ -62,13 +62,13 @@ nvc0_query_allocate(struct nvc0_context *nvc0, struct nvc0_query *q, int size)
nouveau_bo_ref(NULL, &q->bo);
if (q->mm) {
if (q->ready)
- nvc0_mm_free(q->mm);
+ nouveau_mm_free(q->mm);
else
- nvc0_fence_sched_release(screen->fence.current, q->mm);
+ nouveau_fence_work(screen->base.fence.current, nouveau_mm_free_work, q->mm);
}
}
if (size) {
- q->mm = nvc0_mm_allocate(screen->mm_GART, size, &q->bo, &q->base);
+ q->mm = nouveau_mm_allocate(screen->base.mm_GART, size, &q->bo, &q->base);
if (!q->bo)
return FALSE;
q->offset = q->base;
@@ -330,10 +330,12 @@ nvc0_render_condition(struct pipe_context *pipe,
void
nvc0_init_query_functions(struct nvc0_context *nvc0)
{
- nvc0->pipe.create_query = nvc0_query_create;
- nvc0->pipe.destroy_query = nvc0_query_destroy;
- nvc0->pipe.begin_query = nvc0_query_begin;
- nvc0->pipe.end_query = nvc0_query_end;
- nvc0->pipe.get_query_result = nvc0_query_result;
- nvc0->pipe.render_condition = nvc0_render_condition;
+ struct pipe_context *pipe = &nvc0->base.pipe;
+
+ pipe->create_query = nvc0_query_create;
+ pipe->destroy_query = nvc0_query_destroy;
+ pipe->begin_query = nvc0_query_begin;
+ pipe->end_query = nvc0_query_end;
+ pipe->get_query_result = nvc0_query_result;
+ pipe->render_condition = nvc0_render_condition;
}