[PATCH] nv50: support point_size_per_vertex

Christoph Bumiller e0425955 at student.tuwien.ac.at
Sun Jun 21 05:22:43 PDT 2009


---
 src/gallium/drivers/nv50/nv50_program.c |    9 +++++++++
 src/gallium/drivers/nv50/nv50_program.h |    1 +
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c
index 74f5cff..d7ab28a 100644
--- a/src/gallium/drivers/nv50/nv50_program.c
+++ b/src/gallium/drivers/nv50/nv50_program.c
@@ -1845,6 +1845,9 @@ nv50_program_tx_prep(struct nv50_pc *pc)
 					if (pc->p->type == PIPE_SHADER_VERTEX)
 						bcol[c] = first;
 					break;
+				case TGSI_SEMANTIC_PSIZE:
+					pc->p->cfg.vp.ptsz = first * 4;
+					break;
 				default:
 					break;
 				}
@@ -2645,6 +2648,12 @@ nv50_linkage_create(struct nv50_context *nv50)
 		map[m / 4] |= k << (8 * (m % 4));
 	}
 
+	if (nv50->rasterizer->pipe.point_size_per_vertex) {
+		map[m / 4] |= vp->cfg.vp.ptsz << (8 * (m % 4));
+		regs[3] |= (m << 4) | 1;
+		m++;
+	}
+
 	so_method(so, tesla, 0x16ac, 2);
 	so_data  (so, m);
 	so_data  (so, vp->cfg.high_temp);
diff --git a/src/gallium/drivers/nv50/nv50_program.h b/src/gallium/drivers/nv50/nv50_program.h
index bd28d21..1206aab 100644
--- a/src/gallium/drivers/nv50/nv50_program.h
+++ b/src/gallium/drivers/nv50/nv50_program.h
@@ -50,6 +50,7 @@ struct nv50_program {
 		struct {
 			unsigned attr[2];
 			unsigned bcol;
+			unsigned ptsz;
 			unsigned clip_ctrl;
 			struct pipe_clip_state ucp;
 		} vp;
-- 
1.6.0.6


--------------090503050107050804030002
Content-Type: text/plain;
 name="0011-nv50-better-insn-generation.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="0011-nv50-better-insn-generation.patch"



More information about the Nouveau mailing list