summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/nv50_program.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_program.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_program.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c
index 8b17ccf1e21..58df4a08dc9 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);