<div dir="ltr">On 22 January 2014 08:20, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</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="HOEnZb"><div class="h5">On 01/22/2014 06:07 AM, Paul Berry wrote:<br>
> @@ -376,25 +376,48 @@ _mesa_compute_max_transform_feedback_vertices(<br>
> **/<br>
><br>
><br>
> +/**<br>
> + * Figure out which stage of the pipeline is the source of transform feedback<br>
> + * data given the current context state, and return its gl_shader_program.<br>
> + *<br>
> + * If no active program can generate transform feedback data (i.e. no vertex<br>
> + * shader is active), returns NULL.<br>
> + */<br>
> +static struct gl_shader_program *<br>
> +get_xfb_source(struct gl_context *ctx)<br>
> +{<br>
> + int i;<br>
> + for (i = MESA_SHADER_FRAGMENT - 1; i >= MESA_SHADER_VERTEX; i--) {<br>
<br>
</div></div>I think this would be clearer as:<br>
<br>
for (i = MESA_SHADER_GEOMETRY; i >= MESA_SHADER_VERTEX; i--) {<br>
...<br>
}<br>
<br>
Note that the pipeline ordering is:<br>
Vertex -> Tess. Control -> Tess. Eval -> Geometry -> Transform Feedback<br>
(<a href="http://www.opengl.org/wiki/Rendering_Pipeline_Overview" target="_blank">http://www.opengl.org/wiki/Rendering_Pipeline_Overview</a>)<br>
<br>
So either implementation would work even with tessellation shaders.<br>
<br>
Either way, this series is:<br>
Reviewed-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
Cc: 10.0 <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.org</a>><br>
<br>
</blockquote></div><br></div><div class="gmail_extra">That's a good point--I like your suggestion. Thanks for the review!<br></div></div>