On Mon, 2019-05-27 at 16:10 -0400, Marek Olšák wrote: > From: Marek Olšák <[email protected]> > > --- > src/gallium/drivers/radeonsi/si_fence.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/src/gallium/drivers/radeonsi/si_fence.c > b/src/gallium/drivers/radeonsi/si_fence.c > index 1d67fd87b90..6d914a1b184 100644 > --- a/src/gallium/drivers/radeonsi/si_fence.c > +++ b/src/gallium/drivers/radeonsi/si_fence.c > @@ -72,31 +72,33 @@ void si_cp_release_mem(struct si_context *ctx, struct > radeon_cmdbuf *cs, > struct si_resource *buf, uint64_t va, > uint32_t new_fence, unsigned query_type) > { > unsigned op = EVENT_TYPE(event) | > EVENT_INDEX(event == V_028A90_CS_DONE || > event == V_028A90_PS_DONE ? 6 : 5) | > event_flags; > unsigned sel = EOP_DST_SEL(dst_sel) | > EOP_INT_SEL(int_sel) | > EOP_DATA_SEL(data_sel); > + bool compute_ib = !ctx->has_graphics || > + cs == ctx->prim_discard_compute_cs; > > - if (ctx->chip_class >= GFX9 || cs == ctx->prim_discard_compute_cs) { > + if (ctx->chip_class >= GFX9 || > + (compute_ib && ctx->chip_class >= GFX7)) { > /* A ZPASS_DONE or PIXEL_STAT_DUMP_EVENT (of the DB occlusion > * counters) must immediately precede every timestamp event to > * prevent a GPU hang on GFX9. > * > * Occlusion queries don't need to do it here, because they > * always do ZPASS_DONE before the timestamp. > */ > - if (ctx->chip_class == GFX9 && > - cs != ctx->prim_discard_compute_cs && > + if (ctx->chip_class == GFX9 && !compute_ib && > query_type != PIPE_QUERY_OCCLUSION_COUNTER && > query_type != PIPE_QUERY_OCCLUSION_PREDICATE && > query_type != PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE) { > struct si_resource *scratch = ctx->eop_bug_scratch; > > assert(16 * ctx->screen->info.num_render_backends <= > scratch->b.b.width0); > radeon_emit(cs, PKT3(PKT3_EVENT_WRITE, 2, 0)); > radeon_emit(cs, EVENT_TYPE(EVENT_TYPE_ZPASS_DONE) | > EVENT_INDEX(1)); > radeon_emit(cs, scratch->gpu_address);
Fixes clover timestamp queries, at least on raven. Tested-by: Jan Vesely <[email protected]> Jan -- Jan Vesely <[email protected]>
signature.asc
Description: This is a digitally signed message part
_______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
