diff options
author | Timothy Arceri <[email protected]> | 2015-08-05 21:05:52 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2015-08-07 10:20:08 +1000 |
commit | 42d283a0cc928a9e3ecddf1a90f9417ef1a34392 (patch) | |
tree | 4134a35f9e85949a750e7026b4bb9a231176f935 /src/glsl/linker.cpp | |
parent | 6dea2456ca82d2c62afbd90327d265c5e78fca9c (diff) |
glsl: remove stage ref generation for transform feedback
Stage ref cannot be queried for transform feedback.
Also simplify the build_stageref function by passing the
correct mode for uniforms.
Reviewed-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src/glsl/linker.cpp')
-rw-r--r-- | src/glsl/linker.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index e2da0af2521..d7efea5e05d 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -3136,7 +3136,7 @@ build_stageref(struct gl_shader_program *shProg, const char *name, /* Type needs to match if specified, otherwise we might * pick a variable with same name but different interface. */ - if (mode != 0 && var->data.mode != mode) + if (var->data.mode != mode) continue; if (strncmp(var->name, name, baselen) == 0) { @@ -3248,12 +3248,9 @@ build_program_resource_list(struct gl_context *ctx, /* Add transform feedback varyings. */ if (shProg->LinkedTransformFeedback.NumVarying > 0) { for (int i = 0; i < shProg->LinkedTransformFeedback.NumVarying; i++) { - uint8_t stageref = - build_stageref(shProg, - shProg->LinkedTransformFeedback.Varyings[i].Name, 0); if (!add_program_resource(shProg, GL_TRANSFORM_FEEDBACK_VARYING, &shProg->LinkedTransformFeedback.Varyings[i], - stageref)) + 0)) return; } } @@ -3265,7 +3262,8 @@ build_program_resource_list(struct gl_context *ctx, continue; uint8_t stageref = - build_stageref(shProg, shProg->UniformStorage[i].name, 0); + build_stageref(shProg, shProg->UniformStorage[i].name, + ir_var_uniform); /* Add stagereferences for uniforms in a uniform block. */ int block_index = shProg->UniformStorage[i].block_index; |