summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_state_derived.c
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-06-01 21:27:18 +0100
committerJosé Fonseca <[email protected]>2010-06-01 21:30:57 +0100
commit6ce68ad3ca242076bbb93fdd99bb448f87a31d15 (patch)
treec16f9df9eb36510f378feef5002c383bc17e9a55 /src/gallium/drivers/llvmpipe/lp_state_derived.c
parentc7c64d97836c71eaf2ee3fc6d384877170b8c844 (diff)
llvmpipe: Use struct lp_shader_input in the interpolator.
Eliminates all this identical yet slightly different code to decide how shader inputs should be interpolated. As bonus, don't interpolate the position twice when it is listed in the TGSI shader inputs.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_derived.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_derived.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_derived.c b/src/gallium/drivers/llvmpipe/lp_state_derived.c
index 773aadc92d9..46a96536075 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_derived.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_derived.c
@@ -50,7 +50,7 @@ compute_vertex_info(struct llvmpipe_context *llvmpipe)
{
const struct lp_fragment_shader *lpfs = llvmpipe->fs;
struct vertex_info *vinfo = &llvmpipe->vertex_info;
- struct lp_shader_input inputs[1 + PIPE_MAX_SHADER_INPUTS];
+ struct lp_shader_input *inputs = llvmpipe->inputs;
unsigned vs_index;
uint i;
@@ -124,6 +124,7 @@ compute_vertex_info(struct llvmpipe_context *llvmpipe)
inputs[i].src_index = vinfo->num_attribs;
draw_emit_vertex_attr(vinfo, EMIT_4F, INTERP_PERSPECTIVE, vs_index);
}
+ llvmpipe->num_inputs = lpfs->info.num_inputs;
draw_compute_vertex_size(vinfo);