Begin hooking up stenciling.
[mesa.git] / src / mesa / pipe / softpipe / sp_quad.c
1
2
3 #include "sp_context.h"
4
5
6
7 void
8 sp_build_quad_pipeline(struct softpipe_context *sp)
9 {
10 /* build up the pipeline in reverse order... */
11
12 sp->quad.first = sp->quad.output;
13
14 if (sp->blend.blend_enable) {
15 sp->quad.blend->next = sp->quad.first;
16 sp->quad.first = sp->quad.blend;
17 }
18
19 if ( sp->stencil.front_enabled
20 || sp->stencil.front_enabled) {
21 sp->quad.stencil_test->next = sp->quad.first;
22 sp->quad.first = sp->quad.stencil_test;
23 }
24 else if (sp->depth_test.enabled) {
25 sp->quad.depth_test->next = sp->quad.first;
26 sp->quad.first = sp->quad.depth_test;
27 }
28
29 if (sp->alpha_test.enabled) {
30 sp->quad.alpha_test->next = sp->quad.first;
31 sp->quad.first = sp->quad.alpha_test;
32 }
33
34 /* XXX always enable shader? */
35 if (1) {
36 sp->quad.shade->next = sp->quad.first;
37 sp->quad.first = sp->quad.shade;
38 }
39
40 }