Mesa (master): anv/pipeline: Do cross-stage linking optimizations
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Aug 2 17:29:35 UTC 2018
Module: Mesa
Branch: master
Commit: 7ef6cd0ee87ae89d9809a4ca7dc903d7fac2802e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7ef6cd0ee87ae89d9809a4ca7dc903d7fac2802e
Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date: Fri Oct 27 17:07:52 2017 -0700
anv/pipeline: Do cross-stage linking optimizations
This appears to help the Aztec Ruins benchmark by about 2% on my Kaby
Lake gt2 laptop.
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
---
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 6095c1fb06..85f38da60f 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -559,6 +559,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 *
@@ -623,6 +626,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_patch_vertices(tes_stage->nir,
tcs_stage->nir->info.tess.tcs_vertices_out,
NULL);
@@ -671,6 +676,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 *
@@ -691,6 +699,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-commit
mailing list