[Mesa-dev] [PATCH 01/11] mesa: implement DrawTransformFeedback from ARB_transform_feedback2

Jose Fonseca jfonseca at vmware.com
Mon Dec 12 05:49:13 PST 2011


----- Original Message -----
> From: Marek Olšák <maraeo at gmail.com>
> 
> It's like DrawArrays, but the count is taken from a transform
> feedback
> object.
> 
> This removes DrawTransformFeedback from dd_function_table and adds
> the same
> function to GLvertexformat (with the function parameters matching
> GL).
> 
> The vbo_draw_func callback has a new parameter
> "struct gl_transform_feedback_object *tfb_vertcount".
> 
> The rest of the code just validates states and forwards the transform
> feedback object into vbo_draw_func.

I ventured reviewing this too, and I have a question: the unfinished code in master had comments saying

   /*
    * Get number of vertices in obj's feedback buffer.
    * Call ctx->Exec.DrawArrays(mode, 0, count);
    */

which seems simpler than passing the new tfb_vertcount parameter everywhere, just for the sake of obtaining count, so what's the rationale for doing this differently here?

Jose


More information about the mesa-dev mailing list