On 5/21/05, Ben Skeggs <[EMAIL PROTECTED]> wrote: > Hello, > > I see what you mean about the tables not taking much space at all :)
The version i send is not the one i was working on, like Vladimir said macro came handy with such things... Right now i am including my table with your code. I got to change pfs_reg struct so that it contains xyzw swizzle info and no s_swz (don't recall the name you give). I have also added support for 0, 1 as component after rereading the spec i see that some one may ask a such swizzle (a pain for us). Thus my table is a little bit bigger 216 entry but not so much. One nice thing i came up for indivual negate is the following : you got your swizzle positive stuff in t then you do : MAD t, t, -1, 0 with an output mask setting only place where you want a negate component. Anyother idea about this negate stuff ? Making a table for each swizzle/negate combinaison could be generated but then the table became quite big (1728 entry i think). With this solution you only loose 1 instruction against a totaly optimized one, doesn't sound too bad as we shouldn't have often a fragment program doing 10 thousand swizzle component negate... > So, each entry in the table describes the instructions needed to get the > desired swizzle? Sounds like a workable idea. Yes, this is what i meant > The diff I posted to dri_devel had some bugs that showed up in UT2004, and > there's some missing support in Mesa. I've sent a patch to Keith that he'll > hopefully apply, and then UT2004 should render very well. > > I'll probably commit my code to cvs once the changes have been made to > Mesa, and note in the cvs log that the swizzling code will be changed at > a later date. Does that sound okay? Okay i will probably finish my cleanup and my change over your version then i will rediff against lastest cvs. > Also, while I was debugging some problems in ut2004, I noticed that it > re-uses > the same few programs over and over, but they are translated each time. I'm > thinking about adding a cache for the last 5 or so texenv programs so > that we > don't need to translated all the time. Should get a nice speedup in the > more > complex areas. Any thoughts on this? ut2004 has a bad ogl attitude if so, (don't have it as i don't think there is a PPC linux version :)) But yes caching program could be usefull. Moreover IIRC r300 can have 2 fragment program in memory ? Anyway the issue here is to find a way to identify a program or i may miss something in mesa that can give us this information :) Jerome Glisse ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_idt12&alloc_id344&op=click -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel