diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-06-01 21:27:18 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-06-01 21:30:57 +0100 |
commit | 6ce68ad3ca242076bbb93fdd99bb448f87a31d15 (patch) | |
tree | c16f9df9eb36510f378feef5002c383bc17e9a55 /src/gallium/drivers/llvmpipe/lp_state_derived.c | |
parent | c7c64d97836c71eaf2ee3fc6d384877170b8c844 (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.c | 3 |
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 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); |