summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_quad_pipe.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-07-27 08:17:45 +0100
committerKeith Whitwell <keithw@vmware.com>2009-07-27 08:17:45 +0100
commitbac8e34c9e4077d370923773d67fe565ce154849 (patch)
treed3a6225031b3b4a976853617dad0079a79632042 /src/gallium/drivers/softpipe/sp_quad_pipe.c
parent85613cc4f14de968ddd503610c5b8fcc77234c81 (diff)
softpipe: move all depth/stencil/alpha pixel processing into one stage
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_quad_pipe.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_quad_pipe.c46
1 files changed, 6 insertions, 40 deletions
diff --git a/src/gallium/drivers/softpipe/sp_quad_pipe.c b/src/gallium/drivers/softpipe/sp_quad_pipe.c
index d138d417ac..1b5bab4eca 100644
--- a/src/gallium/drivers/softpipe/sp_quad_pipe.c
+++ b/src/gallium/drivers/softpipe/sp_quad_pipe.c
@@ -38,18 +38,6 @@ sp_push_quad_first( struct softpipe_context *sp,
sp->quad.first = quad;
}
-static void
-sp_build_depth_stencil( struct softpipe_context *sp )
-{
- if (sp->depth_stencil->stencil[0].enabled ||
- sp->depth_stencil->stencil[1].enabled) {
- sp_push_quad_first( sp, sp->quad.stencil_test );
- }
- else if (sp->depth_stencil->depth.enabled &&
- sp->framebuffer.zsbuf) {
- sp_push_quad_first( sp, sp->quad.depth_test );
- }
-}
void
sp_build_quad_pipeline(struct softpipe_context *sp)
@@ -61,37 +49,15 @@ sp_build_quad_pipeline(struct softpipe_context *sp)
!sp->fs->info.uses_kill &&
!sp->fs->info.writes_z;
- /* build up the pipeline in reverse order... */
-
- /* Color combine
- */
sp->quad.first = sp->quad.blend;
- /* Shade/Depth/Stencil/Alpha
- */
- if ((sp->rasterizer->poly_smooth && sp->reduced_prim == PIPE_PRIM_TRIANGLES) ||
- (sp->rasterizer->line_smooth && sp->reduced_prim == PIPE_PRIM_LINES) ||
- (sp->rasterizer->point_smooth && sp->reduced_prim == PIPE_PRIM_POINTS)) {
- sp_push_quad_first( sp, sp->quad.coverage );
- }
-
- if (sp->active_query_count) {
- sp_push_quad_first( sp, sp->quad.occlusion );
- }
-
- if (!early_depth_test) {
- sp_build_depth_stencil( sp );
- }
-
- if (sp->depth_stencil->alpha.enabled) {
- sp_push_quad_first( sp, sp->quad.alpha_test );
- }
-
- sp_push_quad_first( sp, sp->quad.shade );
-
if (early_depth_test) {
- sp_build_depth_stencil( sp );
- sp_push_quad_first( sp, sp->quad.earlyz );
+ sp_push_quad_first( sp, sp->quad.shade );
+ sp_push_quad_first( sp, sp->quad.depth_test );
+ }
+ else {
+ sp_push_quad_first( sp, sp->quad.depth_test );
+ sp_push_quad_first( sp, sp->quad.shade );
}
}