summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2015-10-02 15:55:05 -0700
committerKenneth Graunke <[email protected]>2015-10-04 14:00:01 -0700
commit7768b802e57253e6a91b908e9b855d23f0fd2d3f (patch)
tree2965212feee74bb8ce0e8b5e0c1083fac0d8eb4e /src
parent5d7f8cb5a511977e256e773716fac3415d01443e (diff)
nir: Add a nir_shader_info::has_transform_feedback_varyings flag.
Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/glsl/nir/glsl_to_nir.cpp2
-rw-r--r--src/glsl/nir/nir.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp
index 4dd62870065..efaa73e12f1 100644
--- a/src/glsl/nir/glsl_to_nir.cpp
+++ b/src/glsl/nir/glsl_to_nir.cpp
@@ -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;
}
diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h
index 268fbc25a33..bde9f49a90c 100644
--- a/src/glsl/nir/nir.h
+++ b/src/glsl/nir/nir.h
@@ -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;