On Monday 04 January 2010 13:19:27 Brian Paul wrote:
> Keith Whitwell wrote:
> > I think this is pretty much equivalent to restricting indexing to
> > defined ranges of indexable temporaries.  I'm guessing the way that
> > would work is we'd say something like:
> >
> > DECL OUT[0]
> > DECL ADDR[0]
> > DECL INDEXABLE_TEMP V[2][0..10]
> >
> > # Populate temporaries
> > MOV V[2][0], FOO
> > MOV V[2][1], BAR
> >
> > # Extract something with dynamic indexing:
> > MOV OUT[0], V[2][ADDR[0].x]
> > END
> >
> > I think that's pretty much the same as you're proposing.
> 
> Yes, though I think the MEM convention would be easier to work with in
> the GLSL compiler and gl_program data structures/code.

It's worth noting that the MEM would be more than a convention for compute, in 
fact it will be a hard requirement.
BTW, of MEM we can also figure out binding random-access buffers i.e. in DX11 
and all compute api's one can do random access scatter/gather reads from 
buffers (very few, currently in some apis maximum of two of those buffers can 
be 
bound). I haven't really thought about representing that in TGSI but given 
that those buffers can not only be bound in compute apis but also in fragment 
shader in DX11 but it seems that MEM could also solve this problem.

> BTW, I'm not completely sure I understand the INDEXABLE_TEMP syntax in
> your example.

Keith digs geometry shaders so he uses their syntax a lot ;)

z

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to