summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>2009-09-15 11:49:41 +0200
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2009-09-15 12:13:23 +0200
commit06dac41cc50303fe767041dcb4b2192763dd9c16 (patch)
tree9be094ab9fb40b313221a410b66d8c5d3211145a /src
parent4d7b4781c82c60d646ee5e766824a0f894e4c292 (diff)
nv50: add support for point size per vertex
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nv50/nv50_program.c14
-rw-r--r--src/gallium/drivers/nv50/nv50_program.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c
index 8b17ccf1e2..58df4a08dc 100644
--- a/src/gallium/drivers/nv50/nv50_program.c
+++ b/src/gallium/drivers/nv50/nv50_program.c
@@ -2056,6 +2056,11 @@ nv50_program_tx_prep(struct nv50_pc *pc)
if (p->cfg.io_nr > first)
p->cfg.io_nr = first;
break;
+ case TGSI_SEMANTIC_PSIZE:
+ p->cfg.psiz = first;
+ if (p->cfg.io_nr > first)
+ p->cfg.io_nr = first;
+ break;
/*
case TGSI_SEMANTIC_CLIP_DISTANCE:
p->cfg.clpd = MIN2(p->cfg.clpd, first);
@@ -2138,6 +2143,9 @@ nv50_program_tx_prep(struct nv50_pc *pc)
if (p->cfg.two_side[c].hw < 0x40)
p->cfg.two_side[c] = p->cfg.io[
p->cfg.two_side[c].hw];
+
+ if (p->cfg.psiz < 0x40)
+ p->cfg.psiz = p->cfg.io[p->cfg.psiz].hw;
} else
if (p->type == PIPE_SHADER_FRAGMENT) {
int rid, aid;
@@ -2289,6 +2297,7 @@ ctor_nv50_pc(struct nv50_pc *pc, struct nv50_program *p)
switch (p->type) {
case PIPE_SHADER_VERTEX:
+ p->cfg.psiz = 0x40;
p->cfg.clpd = 0x40;
p->cfg.io_nr = pc->result_nr;
break;
@@ -2781,6 +2790,11 @@ nv50_linkage_validate(struct nv50_context *nv50)
m = nv50_sreg4_map(map, m, lin, &fp->cfg.io[i], vpo);
}
+ if (nv50->rasterizer->pipe.point_size_per_vertex) {
+ map[m / 4] |= vp->cfg.psiz << ((m % 4) * 8);
+ reg[3] = (m++ << 4) | 1;
+ }
+
/* now fill the stateobj */
so = so_new(64, 0);
diff --git a/src/gallium/drivers/nv50/nv50_program.h b/src/gallium/drivers/nv50/nv50_program.h
index 5745e0b1ee..7400ce08fc 100644
--- a/src/gallium/drivers/nv50/nv50_program.h
+++ b/src/gallium/drivers/nv50/nv50_program.h
@@ -58,6 +58,7 @@ struct nv50_program {
/* VP only */
uint8_t clpd, clpd_nr;
+ uint8_t psiz;
} cfg;
};