summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvfx/nvfx_fragprog.c
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-09-04 03:35:22 +0200
committerLuca Barbieri <[email protected]>2010-09-04 04:05:37 +0200
commitf1507806ca1f4efbd433b9d58565cfcac9082ff2 (patch)
tree1b597174550b2eb6bfccaebb996289f0344a7f4c /src/gallium/drivers/nvfx/nvfx_fragprog.c
parentc98b29ec92ccb7b418139647c09bff3394e4a2b1 (diff)
nv40: support all 10 texcoords
Diffstat (limited to 'src/gallium/drivers/nvfx/nvfx_fragprog.c')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_fragprog.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_fragprog.c b/src/gallium/drivers/nvfx/nvfx_fragprog.c
index 79dd22467a6..159db99f552 100644
--- a/src/gallium/drivers/nvfx/nvfx_fragprog.c
+++ b/src/gallium/drivers/nvfx/nvfx_fragprog.c
@@ -948,12 +948,13 @@ nvfx_fragprog_prepare(struct nvfx_context* nvfx, struct nvfx_fpc *fpc)
struct util_semantic_set set;
float const0v[4] = {0, 0, 0, 0};
struct nvfx_reg const0;
+ unsigned num_texcoords = nvfx->is_nv4x ? 10 : 8;
fpc->fp->num_slots = util_semantic_set_from_program_file(&set, fpc->pfp->pipe.tokens, TGSI_FILE_INPUT);
- if(fpc->fp->num_slots > 8)
+ if(fpc->fp->num_slots > num_texcoords)
return FALSE;
- util_semantic_layout_from_set(fpc->fp->slot_to_generic, &set, 0, 8);
- util_semantic_table_from_layout(fpc->generic_to_slot, fpc->fp->slot_to_generic, 0, 8);
+ util_semantic_layout_from_set(fpc->fp->slot_to_generic, &set, 0, num_texcoords);
+ util_semantic_table_from_layout(fpc->generic_to_slot, fpc->fp->slot_to_generic, 0, num_texcoords);
memset(fpc->fp->slot_to_fp_input, 0xff, sizeof(fpc->fp->slot_to_fp_input));