radeonsi/nir: add some missing tcs bits to the nir scan pass
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 10 Jan 2018 02:52:29 +0000 (13:52 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 17 Jan 2018 13:03:33 +0000 (00:03 +1100)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_shader_nir.c

index d5b8f835b91ea4035ef707b3b54be44c08963b1d..9a15271bb01a364f8e0937ed3e12577a9c2cab69 100644 (file)
@@ -399,6 +399,20 @@ void si_nir_scan_shader(const struct nir_shader *nir,
                                info->writes_position = true;
                        break;
                }
+
+               if (nir->info.stage == MESA_SHADER_TESS_CTRL) {
+                       switch (semantic_name) {
+                       case TGSI_SEMANTIC_PATCH:
+                               info->reads_perpatch_outputs = true;
+                       break;
+                       case TGSI_SEMANTIC_TESSINNER:
+                       case TGSI_SEMANTIC_TESSOUTER:
+                               info->reads_tessfactor_outputs = true;
+                       break;
+                       default:
+                               info->reads_pervertex_outputs = true;
+                       }
+               }
        }
 
        info->num_outputs = num_outputs;