summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_state_derived.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-10-09 16:18:03 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-10-09 16:18:37 +0100
commitb0cd386e777912df115858d90f2eec31811c2d9c (patch)
treec7171445eaedc0f63ded7e26a8b571206f51d629 /src/gallium/drivers/llvmpipe/lp_state_derived.c
parent82ec7f018d20e46e9c43ea467354dcfe4f03bae3 (diff)
llvmpipe: Tell setup shader inputs.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_derived.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_derived.c30
1 files changed, 30 insertions, 0 deletions
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;