Displaying 3 results from an estimated 3 matches for "direct2dest_op".
2009 Sep 10
0
[PATCH 02/13] nv50: add functions for swizzle resolution
...v50/nv50_program.c
@@ -1322,30 +1322,69 @@ tgsi_src(struct nv50_pc *pc, int chan, const struct tgsi_full_src_register *src,
 	return r;
 }
 
-/* returns TRUE if instruction can overwrite sources before they're read */
+/* return TRUE for ops that produce only a single result */
 static boolean
-direct2dest_op(const struct tgsi_full_instruction *insn)
+is_scalar_op(unsigned op)
 {
-	if (insn->Instruction.Saturate)
-		return FALSE;
-
-	switch (insn->Instruction.Opcode) {
-	case TGSI_OPCODE_COS:
+	switch (op) {
+	case TGSI_OPCODE_DP2:
 	case TGSI_OPCODE_DP3:
 	case TGSI_OPCODE_DP4:
 	case TGSI_OPCODE...
2009 Jun 21
0
[PATCH] nv50: better insn generation
...ex;
@@ -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.
+		 */
 		for (c = 0; c < 4; c++) {
 			if (!dst[c] || dst[c]->type != P_TEMP)
 				continue;
@@ -1341,7 +1353,7 @@ nv50_...
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