nir: Add a nir_shader_info::has_transform_feedback_varyings flag.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 2 Oct 2015 22:55:05 +0000 (15:55 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sun, 4 Oct 2015 21:00:01 +0000 (14:00 -0700)
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/nir/glsl_to_nir.cpp
src/glsl/nir/nir.h

index 4dd628700656be2b896b225b6abf1b0b27576f68..efaa73e12f1d752b44f85c8e587e8fb083223896 100644 (file)
@@ -164,6 +164,8 @@ glsl_to_nir(const struct gl_shader_program *shader_prog,
    shader->info.separate_shader = shader_prog->SeparateShader;
    shader->info.gs.vertices_out = sh->Geom.VerticesOut;
    shader->info.gs.invocations = sh->Geom.Invocations;
+   shader->info.has_transform_feedback_varyings =
+      shader_prog->TransformFeedback.NumVarying > 0;
 
    return shader;
 }
index 268fbc25a337b8753c27ad0338ea12ecffd8dd5b..bde9f49a90c3814ed67bf18e9204528a963c7014 100644 (file)
@@ -1487,6 +1487,9 @@ typedef struct nir_shader_info {
    /* Whether or not separate shader objects were used */
    bool separate_shader;
 
+   /** Was this shader linked with any transform feedback varyings? */
+   bool has_transform_feedback_varyings;
+
    struct {
       /** The maximum number of vertices the geometry shader might write. */
       unsigned vertices_out;