From 6ce68ad3ca242076bbb93fdd99bb448f87a31d15 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Tue, 1 Jun 2010 21:27:18 +0100 Subject: 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. --- src/gallium/drivers/llvmpipe/lp_state_derived.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/llvmpipe/lp_state_derived.c') diff --git a/src/gallium/drivers/llvmpipe/lp_state_derived.c b/src/gallium/drivers/llvmpipe/lp_state_derived.c index 773aadc92d..46a9653607 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); -- cgit v1.2.3