diff options
author | Vadim Girlin <vadimgirlin@gmail.com> | 2011-07-15 07:22:20 +0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2011-07-15 15:42:46 -0400 |
commit | ef29bfee031cdab3dbb0f9a79828c4b0d0405991 (patch) | |
tree | ac65f3f819533dc1c1f4e7d7b4321db40d0340ce /src/gallium/drivers/r600/r600.h | |
parent | cfec000e7514342fd51859906e173ba2d474a55c (diff) | |
download | external_mesa3d-ef29bfee031cdab3dbb0f9a79828c4b0d0405991.zip external_mesa3d-ef29bfee031cdab3dbb0f9a79828c4b0d0405991.tar.gz external_mesa3d-ef29bfee031cdab3dbb0f9a79828c4b0d0405991.tar.bz2 |
r600g: fix queries and predication
Use all zpass data for predication instead of the last block only.
Use query buffer as a ring instead of reusing the same area
for each new BeginQuery. All query buffer offsets are in bytes
to simplify offsets math.
Diffstat (limited to 'src/gallium/drivers/r600/r600.h')
-rw-r--r-- | src/gallium/drivers/r600/r600.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/gallium/drivers/r600/r600.h b/src/gallium/drivers/r600/r600.h index 2af4d31..61adc7e 100644 --- a/src/gallium/drivers/r600/r600.h +++ b/src/gallium/drivers/r600/r600.h @@ -211,14 +211,21 @@ struct r600_reloc { */ struct r600_query { u64 result; - /* The kind of query. Currently only OQ is supported. */ + /* The kind of query */ unsigned type; - /* How many results have been written, in dwords. It's incremented - * after end_query and flush. */ - unsigned num_results; - /* if we've flushed the query */ + /* Offset of the first result for current query */ + unsigned results_start; + /* Offset of the next free result after current query data */ + unsigned results_end; + /* Size of the result */ + unsigned result_size; + /* Count of new queries started in one stream without flushing */ + unsigned queries_emitted; + /* State flags */ unsigned state; - /* The buffer where query results are stored. */ + /* The buffer where query results are stored. It's used as a ring, + * data blocks for current query are stored sequentially from + * results_start to results_end, with wrapping on the buffer end */ struct r600_bo *buffer; unsigned buffer_size; /* linked list of queries */ |