On 09.11.2015 07:00, Marek Olšák wrote: > From: Marek Olšák <marek.ol...@amd.com> > > I discovered that increasing the ESGS ring size fixes GS hangs on Tonga, > so let's do it properly. > > There is now a separate init_config_gs_rings state that is not immutable, > because GS rings are resized when needed. > > This also saves some memory. Most apps won't need more than 1MB > per ring per shader engine.
[...] > - /* Flush the context to re-emit the init_config state. > - * This is done only once in a lifetime of a context. > - */ > - si_pm4_upload_indirect_buffer(sctx, sctx->init_config); > + /* Set the state. */ > + if (sctx->init_config_gs_rings) > + si_pm4_free_state(sctx, sctx->init_config_gs_rings, ~0); > + sctx->init_config_gs_rings = pm4; > + > + if (!sctx->init_config_has_vgt_flush) { > + si_init_config_add_vgt_flush(sctx); > + si_pm4_upload_indirect_buffer(sctx, sctx->init_config); > + } > + > + /* Flush the context to re-emit the state. */ > sctx->b.initial_gfx_cs_size = 0; /* force flush */ > si_context_gfx_flush(sctx, RADEON_FLUSH_ASYNC, NULL); Maybe the comment should still say "re-emit the init_config state". Either way, Reviewed-by: Michel Dänzer <michel.daen...@amd.com> -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev