[Mesa-dev] [PATCH 1/3] nir: Add a nir_shader_info::has_transform_feedback_varyings flag.
Kenneth Graunke
kenneth at whitecape.org
Fri Oct 2 17:57:29 PDT 2015
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/glsl/nir/glsl_to_nir.cpp | 2 ++
src/glsl/nir/nir.h | 3 +++
2 files changed, 5 insertions(+)
diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp
index 4dd6287..efaa73e 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 c83ef50..a829e2c 100644
--- a/src/glsl/nir/nir.h
+++ b/src/glsl/nir/nir.h
@@ -1484,6 +1484,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;
--
2.5.3
More information about the mesa-dev
mailing list