• Advertisement
Sign in to follow this  

# of Interpolated Varyings, Hidden Costs?

This topic is 3824 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

General question for later model GPU's, Besides the obvious performance issues of number of texture fetches and operations, are there any hidden costs (clock cycles and memory bandwidth) associated with having a large number of interpolated (or even flat varyings with SM4.0) inputs to a fragment shader? Basically asking about the black box between the output of the vertex pipe and the input of the fragment pipe. I'd guess that the hardware has the ability to handle some smaller set number of interpolated variables per vertex (say the standard position, normal, texture position, etc, or about 12-16 FP32 values), and once that number is surpassed that triangle setup slows down. Also guessing there is a similar performance drop for large quantities of interpolated variables going to the fragment shaders. Anyone have any knowledge in these matters? Or better yet, know of any GPU performance graphs which cover these issues? [Edited by - TimothyFarrar on November 4, 2007 2:41:07 PM]

Share this post


Link to post
Share on other sites
Advertisement
There are two costs associated with attributes.

The first cost is the space used in passing attributes between the vertex and fragment shaders. Before g80, there was just a fixed maximum number of attributes you could pass and beyond that your shader would simply fail to compile. I'm not sure whether g80 acts the same way.

The second cost is in perspective correction of the interpolated attributes. Each interpolated attribute costs one division per component in the fragment shader. Of course this cost shouldn't apply to flat varyings.

Share this post


Link to post
Share on other sites
Quote:
Original post by Pragma
There are two costs associated with attributes.

The first cost is the space used in passing attributes between the vertex and fragment shaders. Before g80, there was just a fixed maximum number of attributes you could pass and beyond that your shader would simply fail to compile. I'm not sure whether g80 acts the same way.

The second cost is in perspective correction of the interpolated attributes. Each interpolated attribute costs one division per component in the fragment shader. Of course this cost shouldn't apply to flat varyings.


Been looking for more info on this and I just read something on ATI's HD doing the interpolation in hardware something like 80 FP32s per clock cycle.

It also appears that the GeForce 8 series does interpolation as stream processor ops in the fragment shader.

Still found no info on the costs associated with the triangle setup side...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement