From: Kenneth Graunke Date: Fri, 2 Oct 2015 22:55:05 +0000 (-0700) Subject: nir: Add a nir_shader_info::has_transform_feedback_varyings flag. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7768b802e57253e6a91b908e9b855d23f0fd2d3f;p=mesa.git nir: Add a nir_shader_info::has_transform_feedback_varyings flag. Signed-off-by: Kenneth Graunke Reviewed-by: Matt Turner --- 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;