diff options
author | Hui Qi Tay <tayhuiqithq@gmail.com> | 2010-10-29 00:47:13 +0100 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2010-11-01 14:14:55 +0000 |
commit | 7f0dc5ea1bb330c6589125baf4017c51a14dce8e (patch) | |
tree | f6aea8a179a9182a826dc780eefbed7e9df38f9c /src/gallium/drivers/llvmpipe/lp_state_derived.c | |
parent | a1ca5ac7c27c8bc3e294b50ab9ad340095f3030d (diff) | |
download | external_mesa3d-7f0dc5ea1bb330c6589125baf4017c51a14dce8e.zip external_mesa3d-7f0dc5ea1bb330c6589125baf4017c51a14dce8e.tar.gz external_mesa3d-7f0dc5ea1bb330c6589125baf4017c51a14dce8e.tar.bz2 |
llvmpipe: Moved draw pipeline twoside function to llvm setup code
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_derived.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_derived.c | 14 |
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 0f5f736..1c9f03a 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, |