Mesa (master): anv/pipeline: Set tess IO read/written key fields in compile_*
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Aug 17 15:50:36 UTC 2018
Module: Mesa
Branch: master
Commit: f210a5f4bb868ad5ae70c5fb3912f3a241305666
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f210a5f4bb868ad5ae70c5fb3912f3a241305666
Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date: Tue Aug 7 16:21:13 2018 -0700
anv/pipeline: Set tess IO read/written key fields in compile_*
We want these to be set as close to the final compile as possible so
that they are guaranteed to happen after nir_shader_gather_info is
called. The next commit is going to move nir_shader_gather_info to
after the linking step which makes this necessary.
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
---
src/intel/vulkan/anv_pipeline.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 9addce55f0..ef1a80d202 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -644,19 +644,10 @@ anv_pipeline_link_tcs(const struct brw_compiler *compiler,
*/
tcs_stage->key.tcs.tes_primitive_mode =
tes_stage->nir->info.tess.primitive_mode;
- tcs_stage->key.tcs.outputs_written =
- tcs_stage->nir->info.outputs_written;
- tcs_stage->key.tcs.patch_outputs_written =
- tcs_stage->nir->info.patch_outputs_written;
tcs_stage->key.tcs.quads_workaround =
compiler->devinfo->gen < 9 &&
tes_stage->nir->info.tess.primitive_mode == 7 /* GL_QUADS */ &&
tes_stage->nir->info.tess.spacing == TESS_SPACING_EQUAL;
-
- tes_stage->key.tes.inputs_read =
- tcs_stage->nir->info.outputs_written;
- tes_stage->key.tes.patch_inputs_read =
- tcs_stage->nir->info.patch_outputs_written;
}
static const unsigned *
@@ -665,6 +656,11 @@ anv_pipeline_compile_tcs(const struct brw_compiler *compiler,
struct anv_pipeline_stage *tcs_stage,
struct anv_pipeline_stage *prev_stage)
{
+ tcs_stage->key.tcs.outputs_written =
+ tcs_stage->nir->info.outputs_written;
+ tcs_stage->key.tcs.patch_outputs_written =
+ tcs_stage->nir->info.patch_outputs_written;
+
return brw_compile_tcs(compiler, NULL, mem_ctx, &tcs_stage->key.tcs,
&tcs_stage->prog_data.tcs, tcs_stage->nir,
-1, NULL);
@@ -687,6 +683,11 @@ anv_pipeline_compile_tes(const struct brw_compiler *compiler,
struct anv_pipeline_stage *tes_stage,
struct anv_pipeline_stage *tcs_stage)
{
+ tes_stage->key.tes.inputs_read =
+ tcs_stage->nir->info.outputs_written;
+ tes_stage->key.tes.patch_inputs_read =
+ tcs_stage->nir->info.patch_outputs_written;
+
return brw_compile_tes(compiler, NULL, mem_ctx, &tes_stage->key.tes,
&tcs_stage->prog_data.tcs.base.vue_map,
&tes_stage->prog_data.tes, tes_stage->nir,
More information about the mesa-commit
mailing list