diff options
author | Christoph Bumiller <[email protected]> | 2013-03-15 22:11:31 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2013-03-20 12:25:21 +0100 |
commit | 8acaf862dfeac62550514b0e46f5aa6212b08992 (patch) | |
tree | 742186f981a608ef42f62aff6271aeec6451b7bc /src/gallium/drivers/nv30/nvfx_vertprog.c | |
parent | 3eaf823b9086ae400a000a1f639e74d2f2be9166 (diff) |
gallium: add TGSI_SEMANTIC_TEXCOORD,PCOORD v3
This makes it possible to identify gl_TexCoord and gl_PointCoord
for drivers where sprite coordinate replacement is restricted.
The new PIPE_CAP_TGSI_TEXCOORD decides whether these varyings
should be hidden behind the GENERIC semantic or not.
With this patch only nvc0 and nv30 will request that they be used.
v2: introduce a CAP so other drivers don't have to bother with
the new semantic
v3: adapt to introduction gl_varying_slot enum
Diffstat (limited to 'src/gallium/drivers/nv30/nvfx_vertprog.c')
-rw-r--r-- | src/gallium/drivers/nv30/nvfx_vertprog.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv30/nvfx_vertprog.c b/src/gallium/drivers/nv30/nvfx_vertprog.c index 74dba38001c..b73d4184045 100644 --- a/src/gallium/drivers/nv30/nvfx_vertprog.c +++ b/src/gallium/drivers/nv30/nvfx_vertprog.c @@ -819,6 +819,7 @@ nvfx_vertprog_parse_decl_output(struct nv30_context *nv30, struct nvfx_vpc *vpc, { unsigned num_texcoords = nv30->is_nv4x ? 10 : 8; unsigned idx = fdec->Range.First; + unsigned semantic_index = fdec->Semantic.Index; int hw = 0, i; switch (fdec->Semantic.Name) { @@ -860,8 +861,12 @@ nvfx_vertprog_parse_decl_output(struct nv30_context *nv30, struct nvfx_vpc *vpc, hw = NVFX_VP(INST_DEST_PSZ); break; case TGSI_SEMANTIC_GENERIC: + /* this is really an identifier for VP/FP linkage */ + semantic_index += 8; + /* fall through */ + case TGSI_SEMANTIC_TEXCOORD: for (i = 0; i < num_texcoords; i++) { - if (vpc->vp->texcoord[i] == fdec->Semantic.Index) { + if (vpc->vp->texcoord[i] == semantic_index) { hw = NVFX_VP(INST_DEST_TC(i)); break; } |