diff options
author | Marek Olšák <[email protected]> | 2018-08-14 02:01:18 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-05-16 13:13:34 -0400 |
commit | c9b7a37b8f7979433655e269a2b161d33eb41659 (patch) | |
tree | 0d3fe57fefbbfe09dc6b25370c1330126927bbe1 /src/gallium/drivers/radeonsi/si_fence.c | |
parent | 187f1c999f90c3bef5b657bf386f076436149c1c (diff) |
radeonsi: cull primitives with async compute for large draw calls
Tested-by: Dieter Nützel <[email protected]>
Acked-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_fence.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_fence.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_fence.c b/src/gallium/drivers/radeonsi/si_fence.c index fdd10d8bdef..1d67fd87b90 100644 --- a/src/gallium/drivers/radeonsi/si_fence.c +++ b/src/gallium/drivers/radeonsi/si_fence.c @@ -80,7 +80,7 @@ void si_cp_release_mem(struct si_context *ctx, struct radeon_cmdbuf *cs, EOP_INT_SEL(int_sel) | EOP_DATA_SEL(data_sel); - if (ctx->chip_class >= GFX9) { + if (ctx->chip_class >= GFX9 || cs == ctx->prim_discard_compute_cs) { /* 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. @@ -89,6 +89,7 @@ void si_cp_release_mem(struct si_context *ctx, struct radeon_cmdbuf *cs, * always do ZPASS_DONE before the timestamp. */ if (ctx->chip_class == GFX9 && + cs != ctx->prim_discard_compute_cs && query_type != PIPE_QUERY_OCCLUSION_COUNTER && query_type != PIPE_QUERY_OCCLUSION_PREDICATE && query_type != PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE) { @@ -105,14 +106,15 @@ void si_cp_release_mem(struct si_context *ctx, struct radeon_cmdbuf *cs, RADEON_USAGE_WRITE, RADEON_PRIO_QUERY); } - radeon_emit(cs, PKT3(PKT3_RELEASE_MEM, 6, 0)); + radeon_emit(cs, PKT3(PKT3_RELEASE_MEM, ctx->chip_class >= GFX9 ? 6 : 5, 0)); radeon_emit(cs, op); radeon_emit(cs, sel); radeon_emit(cs, va); /* address lo */ radeon_emit(cs, va >> 32); /* address hi */ radeon_emit(cs, new_fence); /* immediate data lo */ radeon_emit(cs, 0); /* immediate data hi */ - radeon_emit(cs, 0); /* unused */ + if (ctx->chip_class >= GFX9) + radeon_emit(cs, 0); /* unused */ } else { if (ctx->chip_class == GFX7 || ctx->chip_class == GFX8) { |