From b0cd386e777912df115858d90f2eec31811c2d9c Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Fri, 9 Oct 2009 16:18:03 +0100 Subject: llvmpipe: Tell setup shader inputs. --- src/gallium/drivers/llvmpipe/lp_state_derived.c | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/gallium/drivers') diff --git a/src/gallium/drivers/llvmpipe/lp_state_derived.c b/src/gallium/drivers/llvmpipe/lp_state_derived.c index 00903c8ef4..a18efcc0e0 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_derived.c +++ b/src/gallium/drivers/llvmpipe/lp_state_derived.c @@ -144,6 +144,36 @@ llvmpipe_get_vertex_info(struct llvmpipe_context *llvmpipe) } draw_compute_vertex_size(vinfo); + + { + struct lp_shader_input inputs[PIPE_MAX_SHADER_INPUTS]; + + for (i = 0; i < lpfs->info.num_inputs; i++) { + switch (vinfo->attrib[i].interp_mode) { + case INTERP_CONSTANT: + inputs[i].interp = LP_INTERP_CONSTANT; + break; + case INTERP_LINEAR: + inputs[i].interp = LP_INTERP_LINEAR; + break; + case INTERP_PERSPECTIVE: + inputs[i].interp = LP_INTERP_PERSPECTIVE; + break; + case INTERP_POS: + inputs[i].interp = LP_INTERP_POSITION; + break; + default: + assert(0); + } + + if (lpfs->info.input_semantic_name[i] == TGSI_SEMANTIC_FACE) + inputs[i].interp = LP_INTERP_FACING; + + inputs[i].src_index = vinfo->attrib[i].src_index; + } + + lp_setup_set_fs_inputs(llvmpipe->setup, inputs, lpfs->info.num_inputs); + } } return vinfo; -- cgit v1.2.3