Ver código fonte

nv50: add support for point size per vertex

tags/mesa_7_7_rc1
Christoph Bumiller 16 anos atrás
pai
commit
06dac41cc5

+ 14
- 0
src/gallium/drivers/nv50/nv50_program.c Ver arquivo

@@ -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);


+ 1
- 0
src/gallium/drivers/nv50/nv50_program.h Ver arquivo

@@ -58,6 +58,7 @@ struct nv50_program {

/* VP only */
uint8_t clpd, clpd_nr;
uint8_t psiz;
} cfg;
};


Carregando…
Cancelar
Salvar