diff options
author | Juan A. Suarez Romero <[email protected]> | 2017-07-06 08:35:37 +0000 |
---|---|---|
committer | Juan A. Suarez Romero <[email protected]> | 2017-08-02 10:04:12 +0200 |
commit | c4210dec8a8cc7ecf881cd537556e778ca967b18 (patch) | |
tree | ab94ec06e99ff8c68448ee8be60305a313c50278 /src/compiler/glsl | |
parent | 53485c2d0efd0410831924dbf01f30043c466df6 (diff) |
glsl: look up for transform feedback varyings after linking
Check if shaders have transform feedback varyings also after the
post-link step.
This fixes:
KHR-GL45.enhanced_layouts.xfb_vertex_streams
piglit/spec/arb_enhanced_layouts/gs-stream-location-aliasing
v2: add claryfing comments (Timothy)
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r-- | src/compiler/glsl/glsl_to_nir.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index 4b3dbcff17b..331438a1835 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -169,9 +169,16 @@ glsl_to_nir(const struct gl_shader_program *shader_prog, shader->info.name = ralloc_asprintf(shader, "GLSL%d", shader_prog->Name); if (shader_prog->Label) shader->info.label = ralloc_strdup(shader, shader_prog->Label); + + /* Check for transform feedback varyings specified via the API */ shader->info.has_transform_feedback_varyings = shader_prog->TransformFeedback.NumVarying > 0; + /* Check for transform feedback varyings specified in the Shader */ + if (shader_prog->last_vert_prog) + shader->info.has_transform_feedback_varyings |= + shader_prog->last_vert_prog->sh.LinkedTransformFeedback->NumVarying > 0; + return shader; } |