diff options
author | Marek Olšák <[email protected]> | 2011-11-08 21:58:27 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-12-17 14:56:21 +0100 |
commit | 543b2331d7b45a29ccd3530daa2389e87e65d89b (patch) | |
tree | e560fb84b532207280fbf0f4d6e7b17278c1b467 /src/gallium/drivers/r600/r600_query.c | |
parent | 047363a07b0e13f8724791ed834b0b68e762adc7 (diff) |
r600g: implement transform feedback
r600: DONE.
r700: MOSTLY (done but locks up).
Evergreen: MOSTLY (done but doesn't work for an unknown reason).
The kernel support will come soon.
Diffstat (limited to 'src/gallium/drivers/r600/r600_query.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_query.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_query.c b/src/gallium/drivers/r600/r600_query.c index ec0d91f0874..ee2d04b3684 100644 --- a/src/gallium/drivers/r600/r600_query.c +++ b/src/gallium/drivers/r600/r600_query.c @@ -100,7 +100,21 @@ static void r600_render_condition(struct pipe_context *ctx, } rctx->ctx.predicate_drawing = true; - r600_query_predication(&rctx->ctx, rquery, PREDICATION_OP_ZPASS, wait_flag); + + switch (rquery->type) { + case PIPE_QUERY_OCCLUSION_COUNTER: + case PIPE_QUERY_OCCLUSION_PREDICATE: + r600_query_predication(&rctx->ctx, rquery, PREDICATION_OP_ZPASS, wait_flag); + break; + case PIPE_QUERY_PRIMITIVES_EMITTED: + case PIPE_QUERY_PRIMITIVES_GENERATED: + case PIPE_QUERY_SO_STATISTICS: + case PIPE_QUERY_SO_OVERFLOW_PREDICATE: + r600_query_predication(&rctx->ctx, rquery, PREDICATION_OP_PRIMCOUNT, wait_flag); + break; + default: + assert(0); + } } void r600_init_query_functions(struct r600_pipe_context *rctx) |