From: Rune P. <ru...@me...> - 2006-01-06 16:22:26
|
I've been having some fun with fragment shader and found allot of ops missing. someone might be interested in some more ops. Fragment ops added: - ABS - CMP - DP4 - DPH - DST - EX2 - FLR - FRC - LG2 - MAX - MIN - RCP - SGE - SLT - XPD Fragment ops still missing: - COS - KIL - LIT - SCS - SIN They all pass the basic test in Mesa/progs/fp though Humus demos (www.humus.ca) still are far from looking proper. Now the Questions: - Missing Commit from r300.sf.net: When trying to Implement the KIL ops I found a commit by Ben Skeggs on r300.sf.net that was lost in the Mesa tree: http://sourceforge.net/mailarchive/forum.php?thread_id=7728162&forum_id=42268 At the very least the changes for r300_reg.h should be included in Mesa. - whats with the DP3 op? if (fpi->DstReg.WriteMask & WRITEMASK_W) { /* I assume these need to share the same alu slot */ sync_streams(rp); emit_arith(rp, PFS_OP_DP4, dest, WRITEMASK_W, pfs_zero, pfs_zero, pfs_zero, flags); } emit_arith(rp, PFS_OP_DP3, t_dst(rp, fpi->DstReg), fpi->DstReg.WriteMask & WRITEMASK_XYZ, t_src(rp, fpi->SrcReg[0]), t_src(rp, fpi->SrcReg[1]), pfs_zero, flags); Why is DP4 called for W and why does DP3 excluding W? I don't see how it can conform to the specs: tmp0 = VectorLoad(op0); tmp1 = VectorLoad(op1); dot = (tmp0.x * tmp1.x) + (tmp0.y * tmp1.y) + (tmp0.z * tmp1.z); result.x = dot; result.y = dot; result.z = dot; result.w = dot; |