glsl/lower_output_reads: bail early in tessellation control shaders
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 17 Nov 2016 20:52:32 +0000 (21:52 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 21 Nov 2016 07:21:41 +0000 (08:21 +0100)
This whole pass is a no-op.

Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/compiler/glsl/lower_output_reads.cpp

index 8a375ac0ad55b0d5d9996dbb6f92d1b84e4a4d64..b0045f0c8fb25e27e46d316b97fdada247ac1737 100644 (file)
@@ -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);
 }