Timothy Normand Miller wrote:
How many local variables should we need per shader kernel? And by
local variables, I mean 32-bit registers.
If we reserve 6-bit fields, that gives us 64 scalars or 16 vectors. I
think that that's not enough.
8-bit fields gives us 256 scalars or 64 vectors, but I'm afraid of
them going unused, wasting tons of chip area.
Do "local variables" include the vertex attributes / fragment shader
varying values? (For those who are a bit rusty on GPU shaders, these
are the "incoming argument values" for shader kernels: vertex coords,
surface normals, tex coords, for vertex shaders; interpolated coords,
tex coords, and colors for fragment shaders.)
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.
Assuming that OGA2 is not intended for the high end gaming market,
I suggest enough registers to handle the fixed function pipeline for
shaded & textured polygons, and accept a performance penalty on
more complex shaders with reads/writes of additional arguments from
some form of per-kernel memory.
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.
--
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)