[Mesa-dev] [PATCH 1/2] mesa: Ensure that transform feedback refers to the correct program.

Paul Berry stereotype441 at gmail.com
Wed Jan 22 10:17:46 PST 2014


On 22 January 2014 08:20, Kenneth Graunke <kenneth at whitecape.org> wrote:

> On 01/22/2014 06:07 AM, Paul Berry wrote:
> > @@ -376,25 +376,48 @@ _mesa_compute_max_transform_feedback_vertices(
> >   **/
> >
> >
> > +/**
> > + * Figure out which stage of the pipeline is the source of transform
> feedback
> > + * data given the current context state, and return its
> gl_shader_program.
> > + *
> > + * If no active program can generate transform feedback data (i.e. no
> vertex
> > + * shader is active), returns NULL.
> > + */
> > +static struct gl_shader_program *
> > +get_xfb_source(struct gl_context *ctx)
> > +{
> > +   int i;
> > +   for (i = MESA_SHADER_FRAGMENT - 1; i >= MESA_SHADER_VERTEX; i--) {
>
> I think this would be clearer as:
>
> for (i = MESA_SHADER_GEOMETRY; i >= MESA_SHADER_VERTEX; i--) {
>    ...
> }
>
> Note that the pipeline ordering is:
> Vertex -> Tess. Control -> Tess. Eval -> Geometry -> Transform Feedback
> (http://www.opengl.org/wiki/Rendering_Pipeline_Overview)
>
> So either implementation would work even with tessellation shaders.
>
> Either way, this series is:
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
> Cc: 10.0 <mesa-stable at lists.freedesktop.org>
>
>
That's a good point--I like your suggestion.  Thanks for the review!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140122/2c212908/attachment.html>


More information about the mesa-dev mailing list