Paul Berry <stereotype...@gmail.com> writes: > This patch subdivides the loop that assigns varying locations into two > phases: one phase to match up varyings between shader stages (and > assign them varying locations), and a second phase to record the > varying assignments for use by transform feedback.
> -bool > -tfeedback_decl::accumulate_num_outputs(struct gl_shader_program *prog, > - unsigned *count) > +unsigned > +tfeedback_decl::accumulate_num_outputs(struct gl_shader_program *prog) > { > if (!this->is_varying()) { > - return true; > - } > - > - if (!this->is_assigned()) { > - /* From GL_EXT_transform_feedback: > - * A program will fail to link if: > - * > - * * any variable name specified in the <varyings> array is not > - * declared as an output in the geometry shader (if present) or > - * the vertex shader (if no geometry shader is present); > - */ > - linker_error(prog, "Transform feedback varying %s undeclared.", > - this->orig_name); > - return false; > + return 0; > } > > unsigned translated_size = this->size; > if (this->is_clip_distance_mesa) > translated_size = (translated_size + 3) / 4; > > - *count += translated_size * this->matrix_columns; > - > - return true; > + return translated_size * this->matrix_columns; > } It looks like this function is no longer accumulate_num_outputs(), and might be better called get_num_outputs() now. Also I think the prog argument can go away.
pgpk0yGkG0yOo.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev