Displaying 4 results from an estimated 4 matches for "r_usage".
2009 Sep 12
0
[PATCH 09/13] nv50: move allocation of pc regs
...pc->p->cfg.fp.regs[2] |= 0x00100000;
 		break;
 	case TGSI_OPCODE_LIT:
 		emit_lit(pc, &dst[0], mask, &src[0][0]);
@@ -1754,64 +1753,52 @@ nv50_program_tx_insn(struct nv50_pc *pc,
 }
 
 static void
-prep_inspect_insn(struct nv50_pc *pc, const union tgsi_full_token *tok,
-		  unsigned *r_usage[2])
+prep_inspect_insn(struct nv50_pc *pc, const struct tgsi_full_instruction *insn)
 {
-	const struct tgsi_full_instruction *insn;
+	struct nv50_reg *reg = NULL;
 	const struct tgsi_full_src_register *src;
 	const struct tgsi_dst_register *dst;
+	unsigned i, c, k, mask;
 
-	unsigned i, c, k, n, ma...
2009 Jun 21
0
[PATCH] nv50: add support for two-sided lighting
...c)
 	struct tgsi_parse_context p;
 	boolean ret = FALSE;
 	unsigned i, c;
-	unsigned fcol, bcol, fcrd, depr;
+	unsigned fcol[2], bcol[2], fcrd, depr;
 
 	/* count (centroid) perspective interpolations */
 	unsigned centroid_loads = 0;
@@ -1791,7 +1791,9 @@ nv50_program_tx_prep(struct nv50_pc *pc)
 	r_usage[0] = CALLOC(pc->temp_nr * 4, sizeof(unsigned));
 	r_usage[1] = CALLOC(pc->attr_nr * 4, sizeof(unsigned));
 
-	depr = fcol = bcol = fcrd = 0xffff;
+	fcol[0] = fcol[1] = 0xffff;
+	bcol[0] = bcol[1] = 0xffff;
+	depr = fcrd = 0xffff;
 
 	tgsi_parse_init(&p, pc->p->pipe.tokens);
 	while...
2009 Sep 10
0
[PATCH 01/13] nv50: extend insn src mask function
...*mask = 0x1;
-		else
-		if (tex->Texture == TGSI_TEXTURE_2D)
-			*mask = 0x3;
-
-		if (insn->Instruction.Opcode == TGSI_OPCODE_TXP)
-			*mask |= 0x8;
-		break;
-	default:
-		break;
-	}
-}
-
 static void
 prep_inspect_insn(struct nv50_pc *pc, const union tgsi_full_token *tok,
 		  unsigned *r_usage[2])
@@ -1720,7 +1746,7 @@ prep_inspect_insn(struct nv50_pc *pc, const union tgsi_full_token *tok,
 			continue;
 		}
 
-		insn_adjust_mask(insn, &mask);
+		mask = nv50_tgsi_src_mask(insn, i);
 
 		for (c = 0; c < 4; c++) {
 			if (!(mask & (1 << c)))
-- 
1.6.3.3
--------------010...
2009 Jun 24
0
[PATCH] nv50: fix previous patches
...Declaration.File) {
 			case TGSI_FILE_TEMPORARY:
 				break;
@@ -2094,38 +2107,36 @@ nv50_program_tx_prep(struct nv50_pc *pc)
 			/* position should be loaded first */
 			if (fcrd != 0xffff) {
 				unsigned mask;
-				oid = mid = 0;
+				oid = 0;
+				mid = 0;
 				mask = prep_fp_attrib(pc, fcrd, r_usage[1],
 						      &mid, &aid, &oid);
 				pc->p->cfg.fp.regs[1] |= (mask << 24);
 				pc->p->cfg.fp.map[0] += 0x04040404 * fcrd;
+				oid = 0;
 			}
 
 			/* should do MAD fcrd.xy, fcrd, SOME_CONST, fcrd */
 
 			if (perspect_loads) {
 				pc->iv_p = alloc_temp(pc, N...