/* 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) {
/* 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;
}
}
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;