nir: Store the size of the TCS output patch in nir_shader_info.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 17 Nov 2015 22:56:32 +0000 (14:56 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 18 Nov 2015 18:49:18 +0000 (10:49 -0800)
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/glsl/nir/glsl_to_nir.cpp
src/glsl/nir/nir.h

index 6d24341ce01854381c208904ac1456691cfe65f3..c4b53f38b6b8cfccf7cefab4c3fb33de1e2fb0bb 100644 (file)
@@ -167,6 +167,10 @@ glsl_to_nir(const struct gl_shader_program *shader_prog,
       shader_prog->TransformFeedback.NumVarying > 0;
 
    switch (stage) {
+   case MESA_SHADER_TESS_CTRL:
+      shader->info.tcs.vertices_out = shader_prog->TessCtrl.VerticesOut;
+      break;
+
    case MESA_SHADER_GEOMETRY:
       shader->info.gs.vertices_in = shader_prog->Geom.VerticesIn;
       shader->info.gs.output_primitive = sh->Geom.OutputType;
index beabcafef4ec34e9404c169be8b7aafece707bbe..46add22da7048ee4a6defaefcc7a68a00c69ef3e 100644 (file)
@@ -1544,6 +1544,11 @@ typedef struct nir_shader_info {
       struct {
          unsigned local_size[3];
       } cs;
+
+      struct {
+         /** The number of vertices in the TCS output patch. */
+         unsigned vertices_out;
+      } tcs;
    };
 } nir_shader_info;