}
+static void alpha_test_begin(struct quad_stage *qs)
+{
+ if (qs->next->begin)
+ qs->next->begin(qs->next);
+}
+
+
struct quad_stage *
sp_quad_alpha_test_stage( struct softpipe_context *softpipe )
{
struct quad_stage *stage = CALLOC_STRUCT(quad_stage);
stage->softpipe = softpipe;
+ stage->begin = alpha_test_begin;
stage->run = alpha_test_quad;
return stage;
}
+static void blend_begin(struct quad_stage *qs)
+{
+ if (qs->next->begin)
+ qs->next->begin(qs->next);
+}
struct quad_stage *sp_quad_blend_stage( struct softpipe_context *softpipe )
struct quad_stage *stage = CALLOC_STRUCT(quad_stage);
stage->softpipe = softpipe;
+ stage->begin = blend_begin;
stage->run = blend_quad;
return stage;
}
+static void cbuf_loop_begin(struct quad_stage *qs)
+{
+ if (qs->next->begin)
+ qs->next->begin(qs->next);
+}
+
+
/**
* Create the colorbuffer loop stage.
* This is used to implement multiple render targets and GL_FRONT_AND_BACK
struct quad_stage *stage = CALLOC_STRUCT(quad_stage);
stage->softpipe = softpipe;
+ stage->begin = cbuf_loop_begin;
stage->run = cbuf_loop_quad;
return stage;
}
+static void colormask_begin(struct quad_stage *qs)
+{
+ if (qs->next->begin)
+ qs->next->begin(qs->next);
+}
struct quad_stage *sp_quad_colormask_stage( struct softpipe_context *softpipe )
struct quad_stage *stage = CALLOC_STRUCT(quad_stage);
stage->softpipe = softpipe;
+ stage->begin = colormask_begin;
stage->run = colormask_quad;
return stage;
}
+static void coverage_begin(struct quad_stage *qs)
+{
+ if (qs->next->begin)
+ qs->next->begin(qs->next);
+}
+
+
struct quad_stage *sp_quad_coverage_stage( struct softpipe_context *softpipe )
{
struct quad_stage *stage = CALLOC_STRUCT(quad_stage);
stage->softpipe = softpipe;
+ stage->begin = coverage_begin;
stage->run = coverage_quad;
return stage;
}
+static void depth_test_begin(struct quad_stage *qs)
+{
+ if (qs->next->begin)
+ qs->next->begin(qs->next);
+}
struct quad_stage *sp_quad_depth_test_stage( struct softpipe_context *softpipe )
struct quad_stage *stage = CALLOC_STRUCT(quad_stage);
stage->softpipe = softpipe;
+ stage->begin = depth_test_begin;
stage->run = depth_test_quad;
return stage;
qss->samplers[i].texture = softpipe->texture[i];
qss->samplers[i].get_sample = sp_get_sample;
qss->samplers[i].pipe = &softpipe->pipe;
+ /* init cache info here */
}
if (qs->next->begin)
}
+static void occlusion_begin(struct quad_stage *qs)
+{
+ if (qs->next->begin)
+ qs->next->begin(qs->next);
+}
+
+
+
struct quad_stage *sp_quad_occlusion_stage( struct softpipe_context *softpipe )
{
struct quad_stage *stage = CALLOC_STRUCT(quad_stage);
stage->softpipe = softpipe;
+ stage->begin = occlusion_begin;
stage->run = occlusion_count_quad;
return stage;
}
+static void output_begin(struct quad_stage *qs)
+{
+ if (qs->next->begin)
+ qs->next->begin(qs->next);
+}
+
+
struct quad_stage *sp_quad_output_stage( struct softpipe_context *softpipe )
{
struct quad_stage *stage = CALLOC_STRUCT(quad_stage);
stage->softpipe = softpipe;
+ stage->begin = output_begin;
stage->run = output_quad;
return stage;
}
+static void stencil_begin(struct quad_stage *qs)
+{
+ if (qs->next->begin)
+ qs->next->begin(qs->next);
+}
struct quad_stage *sp_quad_stencil_test_stage( struct softpipe_context *softpipe )
struct quad_stage *stage = CALLOC_STRUCT(quad_stage);
stage->softpipe = softpipe;
+ stage->begin = stencil_begin;
stage->run = stencil_test_quad;
return stage;
}
+static void stipple_begin(struct quad_stage *qs)
+{
+ if (qs->next->begin)
+ qs->next->begin(qs->next);
+}
+
+
struct quad_stage *
sp_quad_polygon_stipple_stage( struct softpipe_context *softpipe )
{
struct quad_stage *stage = CALLOC_STRUCT(quad_stage);
stage->softpipe = softpipe;
+ stage->begin = stipple_begin;
stage->run = stipple_quad;
return stage;