On 5/22/05, Ben Skeggs <[EMAIL PROTECTED]> wrote: > The reason I was doing swizzling in t_src is that some ARB_f_p opcodes > aren't > native on r300 and we need to emit multiple instuctions to emulate them > (see LRP). > If one of the sources used a non-native swizzle, we'd waste alu > instructions re-doing > the swizzle at each emit. A case where this may be very important is > the SIN/COS > instructions, a document in the Radeon SDK says that COS is 11 > instructions..
Wasn't senzibilized to that, thus swizzing is better done in t_src i will change this (not a big change in term of code anyway) > The most important thing missing is the v_cross/s_cross fields. These > are used to > say that the source swizzle depends on the result of the other > instruction stream. > ie. WZYW (v_cross=1), colour instruction depends on result of alpha > instruction, > XYZX (s_cross=1), alpha insn depends on result of colour instruction. > WZYX (v_cross=1, > s_cross=1), both depend on opposite stream. > > This allows for an extremely primitive form of instruction reordering so > that we make > use of the split xyz/w units, instead of leaving a whole load of NOPS > when an ARB_f_p > instruction only writes xyz or w. I haven't up time to dig enought your code thus at first i did not see the utility of that. Having that is effectively usefull... I may have to handle this in swizzling too (not too hard). > The valid field comes in useful occasionally when testing some things. > The has_w field > was only used by my swizzling code to say whether or not the W coord had > to be copied > over to the resulting swizzle, so you could probably drop that if you > don't need it for > your code. I will see, this may be usefull if we don't want w than i don't emit nop w instruction (right now i doing useless function in w stream). > >I haven't yet done indivual or global neg but as i said > >i think that the best solution is to first swizzle and then > >do a > >MAD t, -t, 1, 0 with appropriate write mask. > > > >Anyway once Keith commited your patch and you > >commited your change in r300, i will commit change > >to use table with individual neg support... > > > > > Cool. I'll have a closer look at your code when I get home again in 12 > or so hours. Okay, tell me if you find anything. 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