diff options
author | Marek Olšák <[email protected]> | 2019-05-13 18:39:44 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-05-27 15:26:06 -0400 |
commit | bb5d82bd06b168f8f641516e6d695c97e84888ca (patch) | |
tree | e24ec0e533795e2f23239d70dc9aacd324eca5e4 /src/gallium/drivers/radeonsi | |
parent | b25795602160af020d6bec30c88207a544a73ae9 (diff) |
radeonsi: allow query functions for compute-only contexts
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_query.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 61213810a91..9ddf7802746 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -498,6 +498,7 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, si_init_compute_blit_functions(sctx); si_init_debug_functions(sctx); si_init_fence_functions(sctx); + si_init_query_functions(sctx); si_init_state_compute_functions(sctx); if (sscreen->debug_flags & DBG(FORCE_DMA)) @@ -506,7 +507,6 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, /* Initialize graphics-only context functions. */ if (sctx->has_graphics) { si_init_context_texture_functions(sctx); - si_init_query_functions(sctx); si_init_msaa_functions(sctx); si_init_shader_functions(sctx); si_init_state_functions(sctx); diff --git a/src/gallium/drivers/radeonsi/si_query.c b/src/gallium/drivers/radeonsi/si_query.c index 1d541f194f3..fd0e07904aa 100644 --- a/src/gallium/drivers/radeonsi/si_query.c +++ b/src/gallium/drivers/radeonsi/si_query.c @@ -1920,10 +1920,11 @@ void si_init_query_functions(struct si_context *sctx) sctx->b.end_query = si_end_query; sctx->b.get_query_result = si_get_query_result; sctx->b.get_query_result_resource = si_get_query_result_resource; - sctx->atoms.s.render_cond.emit = si_emit_query_predication; - if (((struct si_screen*)sctx->b.screen)->info.num_render_backends > 0) - sctx->b.render_condition = si_render_condition; + if (sctx->has_graphics) { + sctx->atoms.s.render_cond.emit = si_emit_query_predication; + sctx->b.render_condition = si_render_condition; + } LIST_INITHEAD(&sctx->active_queries); } |