Timothy Normand Miller wrote:
The OpenGL spec requires at least 16 4-way vector attributes for
vertex shaders, and at least 32 4-way vector varying values for
fragment shaders.

So, 128 regs, just for arguments.

My bad. That's not a simultaneous load, since the vertex and fragment
shaders don't need to run at the same time. (And in a sort-to-tiles
architecture which you seem to be suggesting, all the vertex shading
has to be done before fragment shading.)

So the max number of incoming arguments is 32 for fragment shaders.
The number of outgoing arguments is <= incoming for vertex shaders,
and much < incoming for fragment shaders.

And again assuming the target market is not high end gaming or HPC,
you could easily aim for 8 arguments in registers and the rest
passed in slower memory, like the MIPS calling conventions.

For the fixed function pipeline the vertex shader is the more complex
one, needing 4 argument vectors and enough working registers for a
full matrix x vector transform and Gouraud lighting equation with one
light source.

Even in this case, I'm not sure how many scalars it translates into.

There are sample GLSL shaders around that emulate the standard fixed
function pipeline. I'll go through the code of one and try to figure
this out.

--
        Hugh Fisher
        CECS, ANU
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)

Reply via email to