Displaying 5 results from an estimated 5 matches for "temp_temp".
2009 Jun 21
0
[PATCH] nv50: better insn generation
...nst->FullSrcRegisters[i];
 
 		if (fs->SrcRegister.File == TGSI_FILE_SAMPLER)
 			unit = fs->SrcRegister.Index;
@@ -1327,10 +1334,15 @@ nv50_program_tx_insn(struct nv50_pc *pc, const union tgsi_full_token *tok)
 	if (sat) {
 		for (c = 0; c < 4; c++) {
 			rdst[c] = dst[c];
-			dst[c] = temp_temp(pc);
+			if (dst[c] && dst[c]->type != P_TEMP)
+				dst[c] = temp_temp(pc);
 		}
-	} else
-	if (direct2dest_op(inst)) {
+	}
+
+	if (direct2dest_op(inst) && (*pp_rtmp)) {
+		/* We really don't lose the real dst as we do not
+		 * get here if sat overwrites dst with temp.
+		 *...
2009 Jun 21
0
[PATCH] nv50: support for SLE, SNE, SEQ, SGT
...0, 4, 2, 6, 1, 5, 3, 7 };
 	struct nv50_reg *rdst;
 
-	assert(c_op <= 7);
 	if (check_swap_src_0_1(pc, &src0, &src1))
-		c_op = inv_cop[c_op];
+		c_op += 8;
 
 	rdst = dst;
-	if (dst->type != P_TEMP)
-		dst = alloc_temp(pc, NULL);
+	if (dst && dst->type != P_TEMP)
+		dst = temp_temp(pc);
 
 	/* set.u32 */
 	set_long(pc, e);
 	e->inst[0] |= 0xb0000000;
-	e->inst[1] |= (3 << 29);
-	e->inst[1] |= (c_op << 14);
-	/*XXX: breaks things, .u32 by default?
-	 *     decuda will disasm as .u16 and use .lo/.hi regs, but this
-	 *     doesn't seem to match what the...
2009 Sep 10
0
[PATCH 02/13] nv50: add functions for swizzle resolution
...don't call this function for these ops */
+		assert(0);
+		break;
 	default:
-		return TRUE;
+		/* linear vector instruction */
+		return (1 << c);
 	}
 }
 
@@ -1393,25 +1432,6 @@ nv50_program_tx_insn(struct nv50_pc *pc, const union tgsi_full_token *tok)
 			rdst[c] = dst[c];
 			dst[c] = temp_temp(pc);
 		}
-	} else
-	if (direct2dest_op(inst)) {
-		for (c = 0; c < 4; c++) {
-			if (!dst[c] || dst[c]->type != P_TEMP)
-				continue;
-
-			for (i = c + 1; i < 4; i++) {
-				if (dst[c] == src[0][i] ||
-				    dst[c] == src[1][i] ||
-				    dst[c] == src[2][i])
-					break;
-			}
-			i...
2009 May 06
2
nv50: shader generation patches
Hi ! I've been trying to improve NV50 shader generation a bit the last couple of weeks, so here is
what I've produced. I don't know if it's usable for you or just a pile of horrible hacks, but at
least it makes some mesa demos render more correcly, p.e. the teapot (aside from mip-mapping issues
of the floor texture), arbfplight, and I think the gears also didn't appear as they
2009 Jun 21
0
[PATCH] nv50: initial support for IF, ELSE, ENDIF insns
...t;if_lvl]->bra = i;
+		if (pc->if_join[pc->if_lvl]) {
+			pc->if_join[pc->if_lvl]->bra = i;
+			pc->if_join[pc->if_lvl] = NULL;
+			pc->join_on = TRUE;
+		}
+		if (pc->insn_cur == (pc->insn_nr - 1))
+			emit_nop(pc, TRUE);
+		break;
 	case TGSI_OPCODE_EX2:
 		temp = temp_temp(pc);
 		rtmp = *pp_rtmp;
@@ -1442,6 +1512,12 @@ nv50_program_tx_insn(struct nv50_pc *pc, const union tgsi_full_token *tok)
 			emit_sub(pc, dst[c], src[0][c], temp);
 		}
 		break;
+	case TGSI_OPCODE_IF:
+		assert(pc->if_lvl < MAX_IF_LEVEL);
+		set_pred_wr(pc, 1, 0, pc->if_cond);
+		emit_b...