summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_nir.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index e4b509ba7a7..322143d1e7b 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -813,6 +813,28 @@ st_link_nir(struct gl_context *ctx,
shader->ir = NULL;
}
+ struct shader_info *prev_info = NULL;
+
+ for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
+ struct gl_linked_shader *shader = shader_program->_LinkedShaders[i];
+ if (!shader)
+ continue;
+
+ struct shader_info *info = &shader->Program->nir->info;
+
+ if (prev_info &&
+ ctx->Const.ShaderCompilerOptions[i].NirOptions->unify_interfaces) {
+ prev_info->outputs_written |= info->inputs_read &
+ ~(VARYING_BIT_TESS_LEVEL_INNER | VARYING_BIT_TESS_LEVEL_OUTER);
+ info->inputs_read |= prev_info->outputs_written &
+ ~(VARYING_BIT_TESS_LEVEL_INNER | VARYING_BIT_TESS_LEVEL_OUTER);
+
+ prev_info->patch_outputs_written |= info->patch_inputs_read;
+ info->patch_inputs_read |= prev_info->patch_outputs_written;
+ }
+ prev_info = info;
+ }
+
return true;
}