summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_query.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2011-02-14 23:33:06 +0100
committerMarek Olšák <maraeo@gmail.com>2011-02-14 23:36:12 +0100
commit20112cca262c926de887dff7d7f108b046ea781a (patch)
treedcaeb6a9c844f7bf7f0a0812af279b34ec834cbe /src/gallium/drivers/r300/r300_query.c
parent89ee0d527c689b70a08c1eb396486d47da7f120d (diff)
r300g: do not track whether occlusion queries have been flushed
The winsys takes care of flushing automatically.
Diffstat (limited to 'src/gallium/drivers/r300/r300_query.c')
-rw-r--r--src/gallium/drivers/r300/r300_query.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/gallium/drivers/r300/r300_query.c b/src/gallium/drivers/r300/r300_query.c
index da871dc3a8..717485f43c 100644
--- a/src/gallium/drivers/r300/r300_query.c
+++ b/src/gallium/drivers/r300/r300_query.c
@@ -127,16 +127,12 @@ static boolean r300_get_query_result(struct pipe_context* pipe,
{
struct r300_context* r300 = r300_context(pipe);
struct r300_query *q = r300_query(query);
- unsigned flags, i;
+ unsigned i;
uint32_t temp, *map;
- uint64_t *result = (uint64_t*)vresult;
-
- if (!q->flushed)
- pipe->flush(pipe, 0, NULL);
-
- flags = PIPE_TRANSFER_READ | (!wait ? PIPE_TRANSFER_DONTBLOCK : 0);
- map = r300->rws->buffer_map(q->buf, r300->cs, flags);
+ map = r300->rws->buffer_map(q->buf, r300->cs,
+ PIPE_TRANSFER_READ |
+ (!wait ? PIPE_TRANSFER_DONTBLOCK : 0));
if (!map)
return FALSE;
@@ -149,7 +145,7 @@ static boolean r300_get_query_result(struct pipe_context* pipe,
r300->rws->buffer_unmap(q->buf);
- *result = temp;
+ *((uint64_t*)vresult) = temp;
return TRUE;
}