radeonsi: fix NGG streamout hang by allocating GDS in the right place

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16885>
This commit is contained in:
Marek Olšák 2022-06-06 05:11:56 -04:00 committed by Marge Bot
parent 3f900df071
commit dbbbe73d05
2 changed files with 4 additions and 3 deletions

View file

@ -3290,6 +3290,10 @@ static void si_update_streamout_state(struct si_context *sctx)
sctx->streamout.enabled_stream_buffers_mask = shader_with_so->info.enabled_streamout_buffer_mask;
sctx->streamout.stride_in_dw = shader_with_so->info.base.xfb_stride;
/* GDS must be allocated when any GDS instructions are used, otherwise it hangs. */
if (sctx->screen->use_ngg_streamout && shader_with_so->info.enabled_streamout_buffer_mask)
si_allocate_gds(sctx);
}
static void si_update_clip_regs(struct si_context *sctx, struct si_shader_selector *old_hw_vs,

View file

@ -130,9 +130,6 @@ static void si_set_streamout_targets(struct pipe_context *ctx, unsigned num_targ
* start writing to the targets.
*/
if (num_targets) {
if (sctx->screen->use_ngg_streamout)
si_allocate_gds(sctx);
sctx->flags |= SI_CONTEXT_PS_PARTIAL_FLUSH | SI_CONTEXT_CS_PARTIAL_FLUSH |
SI_CONTEXT_PFP_SYNC_ME;
}