Ian Romanick wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This patch adds the missing NV_vertex_program2 and NV_vertex_program3
instructions to the various internal tables. It does not add support
for them to the parser nor does it add support for them to the program
interpreter.
It will probably a bit before I can add support to the parser. I'm
still trying to understand how src/mesa/shader/grammar works (and why
that was used instead of flex & byacc).
The ARB program parser is a bit of a mystery to me too.
If I'd rewrite the parsers toay I'd probably use lex/yacc. I
originally implemented my own recursive descent parsers for the NV
extensions because the language was pretty simple. Judging from LOC
and understandability, I don't think I did too bad.
I've not yet committed this patch because it breaks the instruction
union in t_vb_arbprogram.h. The opcode field in that union was only 6
bits. When there were only 59+3 instructions that worked fine.
However, this patch increases the base instruction count to 69. This
requires 7 bits. The problem is that increasing the opcode width to 7
bits increases the size of instruction::rsw to 33 bits. :(
One patch issue below:
------------------------------------------------------------------------
Index: src/mesa/shader/program.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/shader/program.c,v
retrieving revision 1.35
diff -u -d -r1.35 program.c
--- src/mesa/shader/program.c 5 Nov 2005 20:18:18 -0000 1.35
+++ src/mesa/shader/program.c 7 Nov 2005 16:57:34 -0000
[...]
- { OPCODE_TXD, "TXD", 3 },
+ { OPCODE_TXD, "TXD", 2 },
Why that change? TXD takes 3 vector arguments, the texcoord, the
partial derivates wrt X, and the partial derivatives wrt Y.
-Brian
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev