Robin Mélinand wrote:
Le Wed 19 Apr, à 12:01 -0700, James Richard Tyrer a écrit :
The problem with using the FORTH stack paradigm is that the shader has
to deal with long data which means that the registers need to hold 4 32
bit floats. Since the length of the data varies, this would probably
result in a "sparse stack" (as in a sparse matrix) with a lot of "0"s
and wasted space.
>
I don't understand why you need a 128 bit wide data stack. But this is
true that, the wider the stack registers, the more wasted space.
On standard integer FORTH machine if you execute a Multiply instruction,
it is TOS * NOS (Top of Stack * Next on Stack). If you are dealing with
vectors and have a packed (32 bit wide) stack, you would have to keep
track of the data type somehow and you have to be able to access the top
8 locations on the stack -- a rather large cross bar. You can keep
track of the data types in the instructions but then they are not
overloaded and you use 4 bits of op code for that purpose. You can have
an additional stack to hold the data types. You can include a word on
the stack that holds the data type, but they you are going to need to
actually pop the data into registers to execute it.
--
JRT
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)