~ubuntu-branches/ubuntu/raring/mesa/raring-proposed

« back to all changes in this revision

Viewing changes to src/mesa/drivers/dri/radeon/radeon_queryobj.c

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2011-06-19 21:26:00 UTC
  • mfrom: (1.6.1 upstream) (3.3.18 sid)
  • mto: (3.3.20 sid)
  • mto: This revision was merged to the branch mainline in revision 145.
  • Revision ID: james.westby@ubuntu.com-20110619212600-rleaapdmnbtstekb
Tags: 7.11~0-2
Thank you sbuild for giving a green light when that's not actually the
case. Fix missing Pre-Depends for the libegl1-mesa-drivers package
(multiarch-support).

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
        radeonContextPtr radeon = RADEON_CONTEXT(ctx);
39
39
        struct radeon_query_object *query = (struct radeon_query_object *)q;
40
40
        uint32_t *result;
41
 
        int i;
 
41
        int i, max_idx;
42
42
 
43
43
        radeon_print(RADEON_STATE, RADEON_VERBOSE,
44
44
                        "%s: query id %d, result %d\n",
56
56
                 * hw writes zpass end counts to qwords 1, 3, 5, 7.
57
57
                 * then we substract. MSB is the valid bit.
58
58
                 */
59
 
                for (i = 0; i < 32; i += 4) {
 
59
                if (radeon->radeonScreen->chip_family >= CHIP_FAMILY_CEDAR)
 
60
                        max_idx = 8 * 4; /* 8 DB's */
 
61
                else
 
62
                        max_idx = 4 * 4; /* 4 DB's for r600, r700 */
 
63
                for (i = 0; i < max_idx; i += 4) {
60
64
                        uint64_t start = (uint64_t)LE32_TO_CPU(result[i]) |
61
65
                                         (uint64_t)LE32_TO_CPU(result[i + 1]) << 32;
62
66
                        uint64_t end = (uint64_t)LE32_TO_CPU(result[i + 2]) |