summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian <brian@i915.localnet.net>2007-08-08 11:44:06 -0600
committerBrian <brian@i915.localnet.net>2007-08-08 12:04:08 -0600
commite4eb97318cbce238c5aaaf11af42c33229274859 (patch)
tree5d2e377f055f1bdd8b55d21ec702121dbcc009c6
parentf00179f9b47e17087d546940e1d57ffb2e2a8e42 (diff)
add quad_stage::begin() funcs
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_alpha_test.c8
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_blend.c6
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_bufloop.c8
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_colormask.c6
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_coverage.c8
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_depth_test.c6
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_fs.c1
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_occlusion.c9
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_output.c8
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_stencil.c6
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_stipple.c8
11 files changed, 74 insertions, 0 deletions
diff --git a/src/mesa/pipe/softpipe/sp_quad_alpha_test.c b/src/mesa/pipe/softpipe/sp_quad_alpha_test.c
index 8c28a824be..585adb41fe 100644
--- a/src/mesa/pipe/softpipe/sp_quad_alpha_test.c
+++ b/src/mesa/pipe/softpipe/sp_quad_alpha_test.c
@@ -82,12 +82,20 @@ alpha_test_quad(struct quad_stage *qs, struct quad_header *quad)
}
+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;
diff --git a/src/mesa/pipe/softpipe/sp_quad_blend.c b/src/mesa/pipe/softpipe/sp_quad_blend.c
index 3d097aea65..ad21c27b2f 100644
--- a/src/mesa/pipe/softpipe/sp_quad_blend.c
+++ b/src/mesa/pipe/softpipe/sp_quad_blend.c
@@ -382,6 +382,11 @@ blend_quad(struct quad_stage *qs, struct quad_header *quad)
}
+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 )
@@ -389,6 +394,7 @@ 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;
diff --git a/src/mesa/pipe/softpipe/sp_quad_bufloop.c b/src/mesa/pipe/softpipe/sp_quad_bufloop.c
index be32d02a46..91c4b70794 100644
--- a/src/mesa/pipe/softpipe/sp_quad_bufloop.c
+++ b/src/mesa/pipe/softpipe/sp_quad_bufloop.c
@@ -45,6 +45,13 @@ cbuf_loop_quad(struct quad_stage *qs, struct quad_header *quad)
}
+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
@@ -55,6 +62,7 @@ struct quad_stage *sp_quad_bufloop_stage( struct softpipe_context *softpipe )
struct quad_stage *stage = CALLOC_STRUCT(quad_stage);
stage->softpipe = softpipe;
+ stage->begin = cbuf_loop_begin;
stage->run = cbuf_loop_quad;
return stage;
diff --git a/src/mesa/pipe/softpipe/sp_quad_colormask.c b/src/mesa/pipe/softpipe/sp_quad_colormask.c
index fff6efa8f6..da5ed8f27c 100644
--- a/src/mesa/pipe/softpipe/sp_quad_colormask.c
+++ b/src/mesa/pipe/softpipe/sp_quad_colormask.c
@@ -71,6 +71,11 @@ colormask_quad(struct quad_stage *qs, struct quad_header *quad)
}
+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 )
@@ -78,6 +83,7 @@ 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;
diff --git a/src/mesa/pipe/softpipe/sp_quad_coverage.c b/src/mesa/pipe/softpipe/sp_quad_coverage.c
index cdd8890c7f..f166276e84 100644
--- a/src/mesa/pipe/softpipe/sp_quad_coverage.c
+++ b/src/mesa/pipe/softpipe/sp_quad_coverage.c
@@ -63,11 +63,19 @@ coverage_quad(struct quad_stage *qs, struct quad_header *quad)
}
+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;
diff --git a/src/mesa/pipe/softpipe/sp_quad_depth_test.c b/src/mesa/pipe/softpipe/sp_quad_depth_test.c
index 3a8df33e67..904d93a614 100644
--- a/src/mesa/pipe/softpipe/sp_quad_depth_test.c
+++ b/src/mesa/pipe/softpipe/sp_quad_depth_test.c
@@ -156,6 +156,11 @@ depth_test_quad(struct quad_stage *qs, struct quad_header *quad)
}
+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 )
@@ -163,6 +168,7 @@ 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;
diff --git a/src/mesa/pipe/softpipe/sp_quad_fs.c b/src/mesa/pipe/softpipe/sp_quad_fs.c
index f5240b67f8..5e4782ca48 100644
--- a/src/mesa/pipe/softpipe/sp_quad_fs.c
+++ b/src/mesa/pipe/softpipe/sp_quad_fs.c
@@ -322,6 +322,7 @@ static void shade_begin(struct quad_stage *qs)
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)
diff --git a/src/mesa/pipe/softpipe/sp_quad_occlusion.c b/src/mesa/pipe/softpipe/sp_quad_occlusion.c
index 843c462d48..0fc1acbf2f 100644
--- a/src/mesa/pipe/softpipe/sp_quad_occlusion.c
+++ b/src/mesa/pipe/softpipe/sp_quad_occlusion.c
@@ -56,11 +56,20 @@ occlusion_count_quad(struct quad_stage *qs, struct quad_header *quad)
}
+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;
diff --git a/src/mesa/pipe/softpipe/sp_quad_output.c b/src/mesa/pipe/softpipe/sp_quad_output.c
index 12ab1eca1c..49161993e6 100644
--- a/src/mesa/pipe/softpipe/sp_quad_output.c
+++ b/src/mesa/pipe/softpipe/sp_quad_output.c
@@ -84,11 +84,19 @@ output_quad(struct quad_stage *qs, struct quad_header *quad)
}
+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;
diff --git a/src/mesa/pipe/softpipe/sp_quad_stencil.c b/src/mesa/pipe/softpipe/sp_quad_stencil.c
index 0b37474c1a..6a9ea9069d 100644
--- a/src/mesa/pipe/softpipe/sp_quad_stencil.c
+++ b/src/mesa/pipe/softpipe/sp_quad_stencil.c
@@ -275,6 +275,11 @@ stencil_test_quad(struct quad_stage *qs, struct quad_header *quad)
}
+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 )
@@ -282,6 +287,7 @@ 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;
diff --git a/src/mesa/pipe/softpipe/sp_quad_stipple.c b/src/mesa/pipe/softpipe/sp_quad_stipple.c
index cad1a1400c..286eb1cd95 100644
--- a/src/mesa/pipe/softpipe/sp_quad_stipple.c
+++ b/src/mesa/pipe/softpipe/sp_quad_stipple.c
@@ -36,12 +36,20 @@ stipple_quad(struct quad_stage *qs, struct quad_header *quad)
}
+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;