diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2009-07-29 11:19:52 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2009-07-29 11:19:52 +1000 |
commit | 693f900b163f89952ed9b4c30d093f8ead461657 (patch) | |
tree | eab76dbb4a3ffe596c7349d55269222dbdcbddd7 /src | |
parent | 625bc0cfa2ffb67b797672f7fb3c083a863199d3 (diff) |
nv50: support non-blocking query_result()
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_query.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/nv50/nv50_query.c b/src/gallium/drivers/nv50/nv50_query.c index 940e04365f2..c354e10b0f8 100644 --- a/src/gallium/drivers/nv50/nv50_query.c +++ b/src/gallium/drivers/nv50/nv50_query.c @@ -107,13 +107,13 @@ nv50_query_result(struct pipe_context *pipe, struct pipe_query *pq, boolean wait, uint64_t *result) { struct nv50_query *q = nv50_query(pq); - - /*XXX: Want to be able to return FALSE here instead of blocking - * until the result is available.. - */ + int ret; if (!q->ready) { - nouveau_bo_map(q->bo, NOUVEAU_BO_RD); + ret = nouveau_bo_map(q->bo, NOUVEAU_BO_RD | + wait ? 0 : NOUVEAU_BO_NOWAIT); + if (ret) + return false; q->result = ((uint32_t *)q->bo->map)[1]; q->ready = TRUE; nouveau_bo_unmap(q->bo); |