[Mesa-dev] [PATCH 43/46] glsl: don't demote tess control shader outputs
Marek Olšák
maraeo at gmail.com
Tue Jun 16 16:01:39 PDT 2015
From: Marek Olšák <marek.olsak at amd.com>
---
src/glsl/link_varyings.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp
index a4d0f1c..5fa9ddf 100644
--- a/src/glsl/link_varyings.cpp
+++ b/src/glsl/link_varyings.cpp
@@ -1451,8 +1451,12 @@ assign_varying_locations(struct gl_context *ctx,
/* If a matching input variable was found, add this ouptut (and the
* input) to the set. If this is a separable program and there is no
* consumer stage, add the output.
+ *
+ * Always add TCS outputs. They are shared by all invocations
+ * within a patch and can be used as shared memory.
*/
- if (input_var || (prog->SeparateShader && consumer == NULL)) {
+ if (input_var || (prog->SeparateShader && consumer == NULL) ||
+ producer->Type == GL_TESS_CONTROL_SHADER) {
matches.record(output_var, input_var);
}
--
2.1.0
More information about the mesa-dev
mailing list