aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-08-08 11:44:06 -0600
committerBrian <[email protected]>2007-08-08 12:04:08 -0600
commite4eb97318cbce238c5aaaf11af42c33229274859 (patch)
tree5d2e377f055f1bdd8b55d21ec702121dbcc009c6 /src/mesa
parentf00179f9b47e17087d546940e1d57ffb2e2a8e42 (diff)
add quad_stage::begin() funcs
Diffstat (limited to 'src/mesa')
-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 8c28a824be5..585adb41fe5 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 3d097aea65e..ad21c27b2f0 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 be32d02a463..91c4b70794b 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 fff6efa8f6a..da5ed8f27c0 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 cdd8890c7f3..f166276e840 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 3a8df33e674..904d93a614c 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 f5240b67f89..5e4782ca487 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 843c462d487..0fc1acbf2f8 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 12ab1eca1c7..49161993e6b 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 0b37474c1a8..6a9ea9069d0 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 cad1a1400c5..286eb1cd954 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;