--- src/gallium/drivers/nv50/nv50_program.c | 92 ++++++++++++++----------------- 1 files changed, 41 insertions(+), 51 deletions(-) diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c index 249f069..4b05075 100644 --- a/src/gallium/drivers/nv50/nv50_program.c +++ b/src/gallium/drivers/nv50/nv50_program.c @@ -36,42 +36,57 @@ /* ARL - gallium craps itself on progs/vp/arl.txt * - * MSB - Like MAD, but MUL+SUB - * - Fuck it off, introduce a way to negate args for ops that - * support it. - * - * Look into inlining IMMD for ops other than MOV (make it general?) + * Look into inlining IMMD for ops other than MOV (make it general ?) * - Maybe even relax restrictions a bit, can't do P_RESULT + P_IMMD, - * but can emit to P_TEMP first - then MOV later. NVIDIA does this + * but can emit to P_TEMP first - then MOV later. NVIDIA does this. * * In ops such as ADD it's possible to construct a bad opcode in the !is_long() * case, if the emit_src() causes the inst to suddenly become long. * - * Verify half-insns work where expected - and force disable them where they - * don't work - MUL has it forcibly disabled atm as it fixes POW.. + * Verify half-insns work where expected - if they are used, they have to + * come in pairs. We cannot branch to between two half insns. * - * FUCK! watch dst==src vectors, can overwrite components that are needed. - * ie. SUB R0, R0.yzxw, R0 + * Watch dst == src vectors, can overwrite components that are needed: + * p.e. SUB R0, R0.yzxw, R0 + * This should mostly be taken care of (if maybe not optimally) now, + * some cases (notably XPD) may still be bad though. * * Things to check with renouveau: - * FP attr/result assignment - how? - * attrib - * - 0x16bc maps vp output onto fp hpos - * - 0x16c0 maps vp output onto fp col0 - * result - * - colr always 0-3 - * - depr always 4 - * 0x16bc->0x16e8 --> some binding between vp/fp regs - * 0x16b8 --> VP output count + * FP results: can DEPR be mapped to another registers + * (currently it goes after all color outputs) + * + * 1298 = 0x00000004; or 0x00000005 if DEPR is written + * + * 19a8 = 0x00000000 + * | 0x00000100 if DEPR is written + * | 0x00100000 if KIL is used + * + * 196c = 0x00000000 + * | 0x00000011 if DEPR is used + * + * 1510 = bitmask to enable clipping planes + * 1688 = two-sided lighting enable + * 16ac = entry count of mapping table at [16bc] + * 16b0 = count of temporaries used in VP + * + * 1904 = 0x01CCBBFF (01 is sometimes 00 - ?) + * CC = number of color components in map (primary + secondary) + * BB = first back color's map index (colors should be contiguous) + * FF = first front color's map index * - * 0x1298 --> "MOV rcol.x, fcol.y" "MOV depr, fcol.y" = 0x00000005 - * "MOV rcol.x, fcol.y" = 0x00000004 - * 0x19a8 --> as above but 0x00000100 and 0x00000000 - * - 0x00100000 used when KIL used - * 0x196c --> as above but 0x00000011 and 0x00000000 + * 1908 = 0x0000HHLL + * LL = first clipping distance map index (4 if no UCPs) + * HH = last clipping distance map index + 1 (0 if no UCPs) * - * 0x1988 --> 0xXXNNNNNN - * - XX == FP high something + * 1910 = 0x00000SSe + * e = enable point size output (0 / 1) + * SS = point size map index (0 if disabled) + * + * 1988 = 0xMMIInnii + * MM = bitmask to un-mask masked VP/GP outputs (i.e. HPOS, generic ?) + * nn = map index of first non-masked output, where to put front color + * II = count of non-masked interpolants + * ii = almost always equal to II (except if II -> 00, why ?) */ struct nv50_reg { enum { @@ -2705,31 +2720,6 @@ program_del_linkage(struct nv50_linkage *ln) FREE(ln); } -/* - * 1510 = bitmask to enable clipping planes - * 1688 = two-sided lighting enable - * 16ac = entry count of mapping table at [16bc] - * 16b0 = count of temporaries used in VP - * - * 1904 = 0x01CCBBFF (01 is sometimes 00 - ?) - * CC = number of color components in map (primary + secondary) - * BB = first back color's map index (colors should be contiguous) - * FF = first front color's map index - * - * 1908 = 0x0000HHLL - * LL = first clipping distance map index (4 if no UCPs) - * HH = last clipping distance map index + 1 (0 if no UCPs) - * - * 1910 = 0x00000SSe - * e = enable point size output (0 / 1) - * SS = point size map index (0 if disabled) - * - * 1988 = 0xMMIInnii - * MM = bitmask to un-mask masked VP/GP outputs (i.e. HPOS, generic ?) - * nn = map index of first non-masked output, where to put front color - * II = count of non-masked interpolants - * ii = almost always equal to II (except if II -> 00, why ?) - */ static struct nv50_linkage * nv50_linkage_create(struct nv50_context *nv50) { -- 1.6.0.6 --------------090503050107050804030002--