Re: [Mesa3d-dev] Additional vertex program instructions

2005-11-07 Thread Keith Whitwell

Keith Whitwell wrote:

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).

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. :(



For the purposes of the integration work, I wouldn't be unhappy to see 
the t_vb_arbprogram.* code turned off temporarily and let the 
nvvertexec.c executor do the job in the interim.


I say this for a few reasons - one that I'm expecting great things from 
your college-project optimizer, and second that if I were to continue 
with t_vb_arbprogram.*, there would be a signficiant rework based on 
what I've learned so far, and thirdly, it will make the ongoing reorg 
easier in the meantime.


Oh, and while we're talking about archiving code, all the TCC stuff for fragment 
programs can definitely be put in that category.


Keith


---
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


Re: [Mesa3d-dev] Additional vertex program instructions

2005-11-07 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Brian Paul wrote:
 Ian Romanick wrote:
 
 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 think initially the PSU students are going to develop their code
outside Mesa.  This is just to keep the learing curve down.  Once
they're able to generate something (and we can verify that it's a
correct something), we'll work it into Mesa CVS (probably a branch).

We  (read: I) were looking at building a standalone test framework for
that.  I still hadn't decided how I wanted to get programs, especially
programs that use the added instructions, in.  I had considered writing
a simple parser in lex  byacc, but I'd like to avoid doing too much
extra work.  However, it's starting to sound like a better idea. :(

 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.c5 Nov 2005 20:18:18 -1.35
 +++ src/mesa/shader/program.c7 Nov 2005 16:57:34 -
 
 [...]
 
 -   { 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.

It appears that you are correct.  One of the various
NV_fragment_program* specs that I looked at listed it as taking only 2
vector inputs.  I made the change based on that.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFDb6SgX1gOwKyEAw8RAjrxAJoDji8mu966QQ0Cpx2ozCMPuTerTQCfTC4i
d3UQuMBsiAL13w+iLH9jcpI=
=I47A
-END PGP SIGNATURE-


---
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


Re: [Mesa3d-dev] Additional vertex program instructions

2005-11-07 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Keith Whitwell wrote:

 Oh, and while we're talking about archiving code, all the TCC stuff for
 fragment programs can definitely be put in that category.

You're saying to gut support for s_fragprog_to_c and s_tcc?  I think I
can handle that.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFDb7xjX1gOwKyEAw8RAn30AKCB61TXIn4q2TfBgadXyw8McsLwrACeJy78
GiJcmZAsui6D+XH2Ql/Gias=
=HgQt
-END PGP SIGNATURE-


---
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


Re: [Mesa3d-dev] Additional vertex program instructions

2005-11-07 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Brian Paul wrote:
 Ian Romanick wrote:
 
 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.

How would using lex  yacc impact non-Unix builds?  Meaning, will that
cause problems on Windows and Mac OS?
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFDb792X1gOwKyEAw8RAoYiAJ93YlQyIcvcdeFbuyofLDDJINzh2QCeNN7O
51FrMDbRFQ0uEocRULN5BGg=
=dc3e
-END PGP SIGNATURE-


---
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