diff options
author | Marek Olšák <[email protected]> | 2009-10-26 01:47:55 +0100 |
---|---|---|
committer | Joakim Sindholt <[email protected]> | 2009-10-26 02:07:32 +0100 |
commit | 5241b9568c1f97eb9aca8be5eb7a3ef659d9917f (patch) | |
tree | 114d2a8514ad309372b43239f22d1e39b97523fd /src/gallium | |
parent | 827002f5ff990f8676385583275d6b8090abfb7a (diff) |
r300g: read occlusion query results from both Z pipes on RV530
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r300/r300_query.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_query.c b/src/gallium/drivers/r300/r300_query.c index 007f11efae6..ca00b043c51 100644 --- a/src/gallium/drivers/r300/r300_query.c +++ b/src/gallium/drivers/r300/r300_query.c @@ -113,7 +113,7 @@ static boolean r300_get_query_result(struct pipe_context* pipe, unsigned flags = PIPE_BUFFER_USAGE_CPU_READ; uint32_t* map; uint32_t temp = 0; - unsigned i; + unsigned i, num_results; if (q->flushed == FALSE) pipe->flush(pipe, 0, NULL); @@ -125,7 +125,13 @@ static boolean r300_get_query_result(struct pipe_context* pipe, if (!map) return FALSE; map += q->offset / 4; - for (i = 0; i < r300screen->caps->num_frag_pipes; i++) { + + if (r300screen->caps->family == CHIP_FAMILY_RV530) + num_results = r300screen->caps->num_z_pipes; + else + num_results = r300screen->caps->num_frag_pipes; + + for (i = 0; i < num_results; i++) { if (*map == ~0U) { /* Looks like our results aren't ready yet. */ if (wait) { |