summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv50/nv50_query.c
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2009-01-29 21:43:15 -0500
committerZack Rusin <zackr@vmware.com>2009-01-29 21:43:15 -0500
commitb3028acd98e2b7fd09344f9005c5b20bba91262c (patch)
tree78fcf2c5088b69e2fd4f31bea305a36581080e56 /src/gallium/drivers/nv50/nv50_query.c
parent444e98de31c5456008a4b3568373db02ddc5385f (diff)
gallium: give the screen priority when it comes to buffer allocations
allows the driver to overwrite buffer allocation, first step on the way to making winsys interface internal to the drivers. state trackers and the code above it will go through the screen
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_query.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_query.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/nv50/nv50_query.c b/src/gallium/drivers/nv50/nv50_query.c
index b923c820eb..b0fb346ba1 100644
--- a/src/gallium/drivers/nv50/nv50_query.c
+++ b/src/gallium/drivers/nv50/nv50_query.c
@@ -47,7 +47,7 @@ nv50_query_create(struct pipe_context *pipe, unsigned type)
assert (q->type == PIPE_QUERY_OCCLUSION_COUNTER);
q->type = type;
- q->buffer = ws->buffer_create(ws, 256, 0, 16);
+ q->buffer = ws->_buffer_create(ws, 256, 0, 16);
if (!q->buffer) {
FREE(q);
return NULL;
@@ -62,7 +62,7 @@ nv50_query_destroy(struct pipe_context *pipe, struct pipe_query *pq)
struct nv50_query *q = nv50_query(pq);
if (q) {
- pipe_buffer_reference(pipe, &q->buffer, NULL);
+ pipe_buffer_reference(pipe->screen, &q->buffer, NULL);
FREE(q);
}
}
@@ -107,11 +107,11 @@ nv50_query_result(struct pipe_context *pipe, struct pipe_query *pq,
*/
if (!q->ready) {
- uint32_t *map = ws->buffer_map(ws, q->buffer,
+ uint32_t *map = ws->_buffer_map(ws, q->buffer,
PIPE_BUFFER_USAGE_CPU_READ);
q->result = map[1];
q->ready = TRUE;
- ws->buffer_unmap(ws, q->buffer);
+ ws->_buffer_unmap(ws, q->buffer);
}
*result = q->result;