add quad_stage::begin() funcs
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user