Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16885>
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,
* 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;
}