[Mesa-dev] [PATCH 1/8] mesa: Record transform feedback stride in linker output.

Kenneth Graunke kenneth at whitecape.org
Wed Dec 14 11:26:26 PST 2011


On 12/14/2011 05:48 AM, Marek Olšák wrote:
> The strides are useful, although they can be computed by summing up
> all the NumComponents fields for each buffer. Note that I also take
> into account ARB_transform_feedback3, which allows having interleaved
> attribs in more than one buffer. For the EXT_transform_feedback case
> and separate attribs, BufferStride is really equal to NumComponents.
> 
> I'd like to ask about something here.
> 
> There is yet another property which can be computed from the other
> variables: the destination offsets. Assuming the outputs are supposed
> to be interleaved in one buffer, the offset is always 0 for the first
> output. The second output has an offset equal to
> Outputs[0].NumComponents. The third output has an offset equal to
> Outputs[0].NumComponents + Outputs[1].NumComponents, and so on. This
> will become more important when we start supporting
> ARB_transform_feedback3, which allows holes between attribs via
> gl_SkipComponents{1,2,3,4}. It would be useful for Radeons too,
> because r600g must already compute the offsets from NumComponents. So
> the structure for ARB_transform_feedback3 would look like:
> 
>        unsigned NumComponents;
> +      unsigned DstOffset;
>     } Outputs[MAX_PROGRAM_OUTPUTS];
> 
> Are you okay with this change as a way to express gl_SkipComponents?
> 
> Marek

That sounds good to me.


More information about the mesa-dev mailing list