On 12 December 2012 13:32, Eric Anholt <span dir="ltr"><<a href="mailto:eric@anholt.net" target="_blank">eric@anholt.net</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>> writes:<br>
<br>
> This patch subdivides the loop that assigns varying locations into two<br>
> phases: one phase to match up varyings between shader stages (and<br>
> assign them varying locations), and a second phase to record the<br>
> varying assignments for use by transform feedback.<br>
<br>
<br>
</div><div><div class="h5">> -bool<br>
> -tfeedback_decl::accumulate_num_outputs(struct gl_shader_program *prog,<br>
> - unsigned *count)<br>
> +unsigned<br>
> +tfeedback_decl::accumulate_num_outputs(struct gl_shader_program *prog)<br>
> {<br>
> if (!this->is_varying()) {<br>
> - return true;<br>
> - }<br>
> -<br>
> - if (!this->is_assigned()) {<br>
> - /* From GL_EXT_transform_feedback:<br>
> - * A program will fail to link if:<br>
> - *<br>
> - * * any variable name specified in the <varyings> array is not<br>
> - * declared as an output in the geometry shader (if present) or<br>
> - * the vertex shader (if no geometry shader is present);<br>
> - */<br>
> - linker_error(prog, "Transform feedback varying %s undeclared.",<br>
> - this->orig_name);<br>
> - return false;<br>
> + return 0;<br>
> }<br>
><br>
> unsigned translated_size = this->size;<br>
> if (this->is_clip_distance_mesa)<br>
> translated_size = (translated_size + 3) / 4;<br>
><br>
> - *count += translated_size * this->matrix_columns;<br>
> -<br>
> - return true;<br>
> + return translated_size * this->matrix_columns;<br>
> }<br>
<br>
</div></div>It looks like this function is no longer accumulate_num_outputs(), and<br>
might be better called get_num_outputs() now. Also I think the prog<br>
argument can go away.<br>
</blockquote></div><br>Good point. I'll fix this.<br></div>