summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_state_derived.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_derived.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_derived.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_derived.c b/src/gallium/drivers/llvmpipe/lp_state_derived.c
index 0f5f7369e0..1c9f03a381 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_derived.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_derived.c
@@ -75,13 +75,25 @@ compute_vertex_info(struct llvmpipe_context *llvmpipe)
vs_index = draw_find_shader_output(llvmpipe->draw,
lpfs->info.base.input_semantic_name[i],
lpfs->info.base.input_semantic_index[i]);
-
+ if (lpfs->info.base.input_semantic_name[i]==TGSI_SEMANTIC_COLOR){
+ llvmpipe->color_slot = vinfo->num_attribs;
+ }
/*
* Emit the requested fs attribute for all but position.
*/
draw_emit_vertex_attr(vinfo, EMIT_4F, INTERP_PERSPECTIVE, vs_index);
}
+ /* Figure out if we need bcolor as well.
+ */
+ vs_index = draw_find_shader_output(llvmpipe->draw,
+ TGSI_SEMANTIC_BCOLOR, 0);
+
+ if (vs_index > 0) {
+ llvmpipe->bcolor_slot = vinfo->num_attribs;
+ draw_emit_vertex_attr(vinfo, EMIT_4F, INTERP_PERSPECTIVE, vs_index);
+ }
+
/* Figure out if we need pointsize as well.
*/
vs_index = draw_find_shader_output(llvmpipe->draw,