tgsi: check for SOA dependencies in SSE and PPC code generators
authorBrian Paul <brianp@vmware.com>
Thu, 20 Aug 2009 16:34:45 +0000 (10:34 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 20 Aug 2009 16:52:12 +0000 (10:52 -0600)
Fall back to interpreter for now.  This doesn't happen very often.

src/gallium/auxiliary/tgsi/tgsi_ppc.c
src/gallium/auxiliary/tgsi/tgsi_sse2.c

index 3c4dd6e7017da6c433a0e256e2059d3446a126d8..4b1c7d4e01bca0e271b25ab8b5c909f97cc3315c 100644 (file)
@@ -1113,6 +1113,10 @@ emit_instruction(struct gen_context *gen,
    if (inst->Instruction.Saturate != TGSI_SAT_NONE)
       return 0;
 
+   /* need to use extra temps to fix SOA dependencies : */
+   if (tgsi_check_soa_dependencies(inst))
+      return FALSE;
+
    switch (inst->Instruction.Opcode) {
    case TGSI_OPCODE_MOV:
    case TGSI_OPCODE_SWZ:
index 348357d1bc3d1ada0aa08344a69e0cc1ea63fd42..46f2387c1582948b0fa463754d3ca4e04e728a5d 100644 (file)
@@ -1751,6 +1751,10 @@ emit_instruction(
    if (inst->Instruction.Saturate != TGSI_SAT_NONE)
       return FALSE;
 
+   /* need to use extra temps to fix SOA dependencies : */
+   if (tgsi_check_soa_dependencies(inst))
+      return FALSE;
+
    switch (inst->Instruction.Opcode) {
    case TGSI_OPCODE_ARL:
       FOR_EACH_DST0_ENABLED_CHANNEL( *inst, chan_index ) {