aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/lower_output_reads.cpp
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-11-17 21:52:32 +0100
committerNicolai Hähnle <[email protected]>2016-11-21 08:21:41 +0100
commita3b98edf6f29aecc33d15a3df0d81a340ea3ebe5 (patch)
tree85ed574c8818e1ec1bbed6c5476a4a1a71869577 /src/compiler/glsl/lower_output_reads.cpp
parent0d383a79a8f13bb00ed5e5d84f41071b43c7e92d (diff)
glsl/lower_output_reads: bail early in tessellation control shaders
This whole pass is a no-op. Acked-by: Edward O'Callaghan <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/compiler/glsl/lower_output_reads.cpp')
-rw-r--r--src/compiler/glsl/lower_output_reads.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/glsl/lower_output_reads.cpp b/src/compiler/glsl/lower_output_reads.cpp
index 8a375ac0ad5..b0045f0c8fb 100644
--- a/src/compiler/glsl/lower_output_reads.cpp
+++ b/src/compiler/glsl/lower_output_reads.cpp
@@ -96,8 +96,6 @@ output_read_remover::visit(ir_dereference_variable *ir)
{
if (ir->var->data.mode != ir_var_shader_out)
return visit_continue;
- if (stage == MESA_SHADER_TESS_CTRL)
- return visit_continue;
hash_entry *entry = _mesa_hash_table_search(replacements, ir->var);
ir_variable *temp = entry ? (ir_variable *) entry->data : NULL;
@@ -173,6 +171,12 @@ output_read_remover::visit_leave(ir_function_signature *sig)
void
lower_output_reads(unsigned stage, exec_list *instructions)
{
+ /* Due to the possible interactions between multiple tessellation control
+ * shader invocations, we leave output variables as-is.
+ */
+ if (stage == MESA_SHADER_TESS_CTRL)
+ return;
+
output_read_remover v(stage);
visit_list_elements(&v, instructions);
}