diff options
author | Jerome Glisse <[email protected]> | 2010-09-28 14:21:35 -0400 |
---|---|---|
committer | Jerome Glisse <[email protected]> | 2010-09-28 14:24:18 -0400 |
commit | fe790a3c346b5edb8b64cfc937b0d5cd9e337412 (patch) | |
tree | d96fe563a33c74d51ce47ddc52c3f8451a0db05c /src/gallium/drivers/r600 | |
parent | 11eb422a161153da6226042d0fea561161e4f292 (diff) |
r600g: suspend/resume occlusion query around clear/copy
Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r-- | src/gallium/drivers/r600/r600.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_state2.c | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600.h b/src/gallium/drivers/r600/r600.h index b8c74675e60..adc35afc025 100644 --- a/src/gallium/drivers/r600/r600.h +++ b/src/gallium/drivers/r600/r600.h @@ -278,6 +278,8 @@ boolean r600_context_query_result(struct r600_context *ctx, boolean wait, void *vresult); void r600_query_begin(struct r600_context *ctx, struct r600_query *query); void r600_query_end(struct r600_context *ctx, struct r600_query *query); +void r600_context_queries_suspend(struct r600_context *ctx); +void r600_context_queries_resume(struct r600_context *ctx); int evergreen_context_init(struct r600_context *ctx, struct radeon *radeon); void evergreen_context_draw(struct r600_context *ctx, const struct r600_draw *draw); diff --git a/src/gallium/drivers/r600/r600_state2.c b/src/gallium/drivers/r600/r600_state2.c index 153780594e5..72d04534e62 100644 --- a/src/gallium/drivers/r600/r600_state2.c +++ b/src/gallium/drivers/r600/r600_state2.c @@ -757,6 +757,7 @@ int r600_blit_uncompress_depth2(struct pipe_context *ctx, struct r600_resource_t int level = 0; float depth = 1.0f; + r600_context_queries_suspend(&rctx->ctx); for (int i = 0; i < fb.nr_cbufs; i++) { fb.cbufs[i] = NULL; pipe_surface_reference(&fb.cbufs[i], rctx->pframebuffer->cbufs[i]); @@ -785,6 +786,7 @@ int r600_blit_uncompress_depth2(struct pipe_context *ctx, struct r600_resource_t pipe_surface_reference(&fb.cbufs[i], NULL); } pipe_surface_reference(&fb.zsbuf, NULL); + r600_context_queries_resume(&rctx->ctx); return 0; } @@ -795,10 +797,12 @@ static void r600_clear(struct pipe_context *ctx, unsigned buffers, struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx; struct pipe_framebuffer_state *fb = &rctx->framebuffer; + r600_context_queries_suspend(&rctx->ctx); r600_blitter_save_states(ctx); util_blitter_clear(rctx->blitter, fb->width, fb->height, fb->nr_cbufs, buffers, rgba, depth, stencil); + r600_context_queries_resume(&rctx->ctx); } static void r600_clear_render_target(struct pipe_context *ctx, @@ -810,9 +814,11 @@ static void r600_clear_render_target(struct pipe_context *ctx, struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx; struct pipe_framebuffer_state *fb = &rctx->framebuffer; + r600_context_queries_suspend(&rctx->ctx); util_blitter_save_framebuffer(rctx->blitter, fb); util_blitter_clear_render_target(rctx->blitter, dst, rgba, dstx, dsty, width, height); + r600_context_queries_resume(&rctx->ctx); } static void r600_clear_depth_stencil(struct pipe_context *ctx, @@ -826,9 +832,11 @@ static void r600_clear_depth_stencil(struct pipe_context *ctx, struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx; struct pipe_framebuffer_state *fb = &rctx->framebuffer; + r600_context_queries_suspend(&rctx->ctx); util_blitter_save_framebuffer(rctx->blitter, fb); util_blitter_clear_depth_stencil(rctx->blitter, dst, clear_flags, depth, stencil, dstx, dsty, width, height); + r600_context_queries_resume(&rctx->ctx); } |