[Mesa-dev] [PATCH] radeonsi/nir: move si_lower_nir() call into compiler thread
Marek Olšák
maraeo at gmail.com
Thu Feb 28 00:46:51 UTC 2019
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Tue, Feb 26, 2019 at 10:30 PM Timothy Arceri <tarceri at itsqueeze.com>
wrote:
> This helps improve compile times. For example the shader-db dolphin
> shader shaders/dolphin/ubershaders/120.shader_test goes from
> ~1.69 -> ~1.57 seconds on my machine with this change.
> ---
> src/gallium/drivers/radeonsi/si_state_shaders.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c
> b/src/gallium/drivers/radeonsi/si_state_shaders.c
> index 9e052e1efce..5bdfd4f6ac1 100644
> --- a/src/gallium/drivers/radeonsi/si_state_shaders.c
> +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
> @@ -2043,6 +2043,9 @@ static void si_init_shader_selector_async(void *job,
> int thread_index)
> assert(thread_index < ARRAY_SIZE(sscreen->compiler));
> compiler = &sscreen->compiler[thread_index];
>
> + if (sel->nir)
> + si_lower_nir(sel);
> +
> /* Compile the main shader part for use with a prolog and/or
> epilog.
> * If this fails, the driver will try to compile a monolithic
> shader
> * on demand.
> @@ -2239,8 +2242,6 @@ static void *si_create_shader_selector(struct
> pipe_context *ctx,
>
> si_nir_scan_shader(sel->nir, &sel->info);
> si_nir_scan_tess_ctrl(sel->nir, &sel->tcs_info);
> -
> - si_lower_nir(sel);
> }
>
> sel->type = sel->info.processor;
> --
> 2.20.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190227/348e6569/attachment.html>
More information about the mesa-dev
mailing list