Hi Jakob, On Sat, 2010-09-18 at 07:30 -0700, Jakob Bornecrantz wrote: > On Sat, Sep 18, 2010 at 4:26 PM, Jakob Bornecrantz <wallbra...@gmail.com> > wrote: > > Looking over some of the piglit failings that Vinsons have posted running > > on softpipe (we are down to 3005/3048). At first I was just going to make > > the output not turn into a warn, but looking at the function it looks like > > it actually should return the status and fail. > > > > This fixes both.
This is a good idea IMO. Given the existing of gallivm and tgsi_exec.c, both being pretty correct, and the former very fast, I'm not sure what use is tgsi_sse2 catering for anymore. So I think that at very least it should not make things worse. A few cleanups: MOV is being whilelisted twice -- the second one can be removed, and the /* XXX: ... */ comment moved to the top of the function. > Ops, looks like I ctrl-z the tests this was happening in. Its warning > on shaders/fp-abs-01 and the ouput is: > Warning: src/dst aliasing in instruction is not handled: > 1: COS TEMP[1], TEMP[1].xxxx > > For those who where interested in it. There are a bunch of opcodes for which tgsi_sse2 actually doesn't trip over, but are not white-listed yet, like COS. I went through the code and added all I could find. Also, tgsi_check_soa_dependencies ignores indirect registers. Patch attached. Jose
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index 298f3d0..2609ea0 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -605,8 +605,10 @@ tgsi_check_soa_dependencies(const struct tgsi_full_instruction *inst) for (i = 0; i < inst->Instruction.NumSrcRegs; i++) { if ((inst->Src[i].Register.File == inst->Dst[0].Register.File) && - (inst->Src[i].Register.Index == - inst->Dst[0].Register.Index)) { + ((inst->Src[i].Register.Index == + inst->Dst[0].Register.Index) || + inst->Src[i].Register.Indirect || + inst->Dst[0].Register.Indirect)) { /* loop over dest channels */ uint channelsWritten = 0x0; FOR_EACH_ENABLED_CHANNEL(*inst, chan) { diff --git a/src/gallium/auxiliary/tgsi/tgsi_sse2.c b/src/gallium/auxiliary/tgsi/tgsi_sse2.c index 785a9fb..379771c 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_sse2.c +++ b/src/gallium/auxiliary/tgsi/tgsi_sse2.c @@ -2835,6 +2835,26 @@ check_soa_dependencies(const struct tgsi_full_instruction *inst) case TGSI_OPCODE_MOV: case TGSI_OPCODE_MUL: case TGSI_OPCODE_XPD: + case TGSI_OPCODE_RCP: + case TGSI_OPCODE_RSQ: + case TGSI_OPCODE_EXP: + case TGSI_OPCODE_LOG: + case TGSI_OPCODE_DP3: + case TGSI_OPCODE_DP4: + case TGSI_OPCODE_DP2A: + case TGSI_OPCODE_EX2: + case TGSI_OPCODE_LG2: + case TGSI_OPCODE_POW: + case TGSI_OPCODE_XPD: + case TGSI_OPCODE_DPH: + case TGSI_OPCODE_COS: + case TGSI_OPCODE_SIN: + case TGSI_OPCODE_TEX: + case TGSI_OPCODE_TXB: + case TGSI_OPCODE_TXP: + case TGSI_OPCODE_NRM: + case TGSI_OPCODE_NRM4: + case TGSI_OPCODE_DP2: /* OK - these opcodes correctly handle SOA dependencies */ break; default:
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev