[Mesa-dev] [PATCH 17/18] anv/pipeline: Do cross-stage linking optimizations

Timothy Arceri tarceri at itsqueeze.com
Thu Jul 26 00:31:24 UTC 2018


It would be good if you could reply to my comment in patch 13 otherwise 
1-17 are:

Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

As mentioned before you really need the varying vector and array 
splitting passes to get the most from these linking opts.

Patch 18 seems ok but you might want to get someone else to look over it.

On 12/07/18 07:18, Jason Ekstrand wrote:
> This appears to help the Aztec Ruins benchmark by about 2% on my Kaby
> Lake gt2 laptop.
> ---
>   src/intel/vulkan/anv_pipeline.c | 11 +++++++++++
>   1 file changed, 11 insertions(+)
> 
> diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
> index 080a78e1cee..ab3b95e78ef 100644
> --- a/src/intel/vulkan/anv_pipeline.c
> +++ b/src/intel/vulkan/anv_pipeline.c
> @@ -558,6 +558,9 @@ anv_pipeline_link_vs(const struct brw_compiler *compiler,
>                        struct anv_pipeline_stage *next_stage)
>   {
>      anv_fill_binding_table(&vs_stage->prog_data.vs.base.base, 0);
> +
> +   if (next_stage)
> +      brw_nir_link_shaders(compiler, &vs_stage->nir, &next_stage->nir);
>   }
>   
>   static const unsigned *
> @@ -622,6 +625,8 @@ anv_pipeline_link_tcs(const struct brw_compiler *compiler,
>   
>      anv_fill_binding_table(&tcs_stage->prog_data.tcs.base.base, 0);
>   
> +   brw_nir_link_shaders(compiler, &tcs_stage->nir, &tes_stage->nir);
> +
>      nir_lower_tes_patch_vertices(tes_stage->nir,
>                                   tcs_stage->nir->info.tess.tcs_vertices_out);
>   
> @@ -666,6 +671,9 @@ anv_pipeline_link_tes(const struct brw_compiler *compiler,
>                         struct anv_pipeline_stage *next_stage)
>   {
>      anv_fill_binding_table(&tes_stage->prog_data.tes.base.base, 0);
> +
> +   if (next_stage)
> +      brw_nir_link_shaders(compiler, &tes_stage->nir, &next_stage->nir);
>   }
>   
>   static const unsigned *
> @@ -686,6 +694,9 @@ anv_pipeline_link_gs(const struct brw_compiler *compiler,
>                        struct anv_pipeline_stage *next_stage)
>   {
>      anv_fill_binding_table(&gs_stage->prog_data.gs.base.base, 0);
> +
> +   if (next_stage)
> +      brw_nir_link_shaders(compiler, &gs_stage->nir, &next_stage->nir);
>   }
>   
>   static const unsigned *
> 


More information about the mesa-dev mailing list