@@ -45,6 +45,8 @@ struct quad_stage { | |||
/** the stage action */ | |||
void (*run)(struct quad_stage *qs, struct quad_header *quad); | |||
void (*destroy)(struct quad_stage *qs); | |||
}; | |||
@@ -88,6 +88,12 @@ static void alpha_test_begin(struct quad_stage *qs) | |||
} | |||
static void alpha_test_destroy(struct quad_stage *qs) | |||
{ | |||
free( qs ); | |||
} | |||
struct quad_stage * | |||
sp_quad_alpha_test_stage( struct softpipe_context *softpipe ) | |||
{ | |||
@@ -96,6 +102,7 @@ sp_quad_alpha_test_stage( struct softpipe_context *softpipe ) | |||
stage->softpipe = softpipe; | |||
stage->begin = alpha_test_begin; | |||
stage->run = alpha_test_quad; | |||
stage->destroy = alpha_test_destroy; | |||
return stage; | |||
} |
@@ -727,6 +727,12 @@ static void blend_begin(struct quad_stage *qs) | |||
} | |||
static void blend_destroy(struct quad_stage *qs) | |||
{ | |||
free( qs ); | |||
} | |||
struct quad_stage *sp_quad_blend_stage( struct softpipe_context *softpipe ) | |||
{ | |||
struct quad_stage *stage = CALLOC_STRUCT(quad_stage); | |||
@@ -734,6 +740,7 @@ struct quad_stage *sp_quad_blend_stage( struct softpipe_context *softpipe ) | |||
stage->softpipe = softpipe; | |||
stage->begin = blend_begin; | |||
stage->run = blend_quad; | |||
stage->destroy = blend_destroy; | |||
return stage; | |||
} |
@@ -50,6 +50,12 @@ static void cbuf_loop_begin(struct quad_stage *qs) | |||
} | |||
static void cbuf_loop_destroy(struct quad_stage *qs) | |||
{ | |||
free( qs ); | |||
} | |||
/** | |||
* Create the colorbuffer loop stage. | |||
* This is used to implement multiple render targets and GL_FRONT_AND_BACK | |||
@@ -62,6 +68,7 @@ struct quad_stage *sp_quad_bufloop_stage( struct softpipe_context *softpipe ) | |||
stage->softpipe = softpipe; | |||
stage->begin = cbuf_loop_begin; | |||
stage->run = cbuf_loop_quad; | |||
stage->destroy = cbuf_loop_destroy; | |||
return stage; | |||
} |
@@ -90,6 +90,12 @@ static void colormask_begin(struct quad_stage *qs) | |||
} | |||
static void colormask_destroy(struct quad_stage *qs) | |||
{ | |||
free( qs ); | |||
} | |||
struct quad_stage *sp_quad_colormask_stage( struct softpipe_context *softpipe ) | |||
{ | |||
struct quad_stage *stage = CALLOC_STRUCT(quad_stage); | |||
@@ -97,6 +103,7 @@ struct quad_stage *sp_quad_colormask_stage( struct softpipe_context *softpipe ) | |||
stage->softpipe = softpipe; | |||
stage->begin = colormask_begin; | |||
stage->run = colormask_quad; | |||
stage->destroy = colormask_destroy; | |||
return stage; | |||
} |
@@ -69,6 +69,12 @@ static void coverage_begin(struct quad_stage *qs) | |||
} | |||
static void coverage_destroy(struct quad_stage *qs) | |||
{ | |||
free( qs ); | |||
} | |||
struct quad_stage *sp_quad_coverage_stage( struct softpipe_context *softpipe ) | |||
{ | |||
struct quad_stage *stage = CALLOC_STRUCT(quad_stage); | |||
@@ -76,6 +82,7 @@ struct quad_stage *sp_quad_coverage_stage( struct softpipe_context *softpipe ) | |||
stage->softpipe = softpipe; | |||
stage->begin = coverage_begin; | |||
stage->run = coverage_quad; | |||
stage->destroy = coverage_destroy; | |||
return stage; | |||
} |
@@ -231,6 +231,12 @@ static void depth_test_begin(struct quad_stage *qs) | |||
} | |||
static void depth_test_destroy(struct quad_stage *qs) | |||
{ | |||
free( qs ); | |||
} | |||
struct quad_stage *sp_quad_depth_test_stage( struct softpipe_context *softpipe ) | |||
{ | |||
struct quad_stage *stage = CALLOC_STRUCT(quad_stage); | |||
@@ -238,6 +244,7 @@ struct quad_stage *sp_quad_depth_test_stage( struct softpipe_context *softpipe ) | |||
stage->softpipe = softpipe; | |||
stage->begin = depth_test_begin; | |||
stage->run = depth_test_quad; | |||
stage->destroy = depth_test_destroy; | |||
return stage; | |||
} |
@@ -190,6 +190,12 @@ static void shade_begin(struct quad_stage *qs) | |||
} | |||
static void shade_destroy(struct quad_stage *qs) | |||
{ | |||
free( qs ); | |||
} | |||
struct quad_stage *sp_quad_shade_stage( struct softpipe_context *softpipe ) | |||
{ | |||
struct quad_shade_stage *qss = CALLOC_STRUCT(quad_shade_stage); | |||
@@ -204,6 +210,7 @@ struct quad_stage *sp_quad_shade_stage( struct softpipe_context *softpipe ) | |||
qss->stage.softpipe = softpipe; | |||
qss->stage.begin = shade_begin; | |||
qss->stage.run = shade_quad; | |||
qss->stage.destroy = shade_destroy; | |||
/* set TGSI sampler state that's constant */ | |||
for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { |
@@ -64,6 +64,11 @@ static void occlusion_begin(struct quad_stage *qs) | |||
} | |||
static void occlusion_destroy(struct quad_stage *qs) | |||
{ | |||
free( qs ); | |||
} | |||
struct quad_stage *sp_quad_occlusion_stage( struct softpipe_context *softpipe ) | |||
{ | |||
@@ -72,6 +77,7 @@ struct quad_stage *sp_quad_occlusion_stage( struct softpipe_context *softpipe ) | |||
stage->softpipe = softpipe; | |||
stage->begin = occlusion_begin; | |||
stage->run = occlusion_count_quad; | |||
stage->destroy = occlusion_destroy; | |||
return stage; | |||
} |
@@ -70,6 +70,12 @@ static void output_begin(struct quad_stage *qs) | |||
} | |||
static void output_destroy(struct quad_stage *qs) | |||
{ | |||
free( qs ); | |||
} | |||
struct quad_stage *sp_quad_output_stage( struct softpipe_context *softpipe ) | |||
{ | |||
struct quad_stage *stage = CALLOC_STRUCT(quad_stage); | |||
@@ -77,6 +83,7 @@ struct quad_stage *sp_quad_output_stage( struct softpipe_context *softpipe ) | |||
stage->softpipe = softpipe; | |||
stage->begin = output_begin; | |||
stage->run = output_quad; | |||
stage->destroy = output_destroy; | |||
return stage; | |||
} |
@@ -323,6 +323,12 @@ static void stencil_begin(struct quad_stage *qs) | |||
} | |||
static void stencil_destroy(struct quad_stage *qs) | |||
{ | |||
free( qs ); | |||
} | |||
struct quad_stage *sp_quad_stencil_test_stage( struct softpipe_context *softpipe ) | |||
{ | |||
struct quad_stage *stage = CALLOC_STRUCT(quad_stage); | |||
@@ -330,6 +336,7 @@ struct quad_stage *sp_quad_stencil_test_stage( struct softpipe_context *softpipe | |||
stage->softpipe = softpipe; | |||
stage->begin = stencil_begin; | |||
stage->run = stencil_test_quad; | |||
stage->destroy = stencil_destroy; | |||
return stage; | |||
} |
@@ -65,6 +65,12 @@ static void stipple_begin(struct quad_stage *qs) | |||
} | |||
static void stipple_destroy(struct quad_stage *qs) | |||
{ | |||
free( qs ); | |||
} | |||
struct quad_stage * | |||
sp_quad_polygon_stipple_stage( struct softpipe_context *softpipe ) | |||
{ | |||
@@ -73,6 +79,7 @@ sp_quad_polygon_stipple_stage( struct softpipe_context *softpipe ) | |||
stage->softpipe = softpipe; | |||
stage->begin = stipple_begin; | |||
stage->run = stipple_quad; | |||
stage->destroy = stipple_destroy; | |||
return stage; | |||
} |