diff options
author | Brian <[email protected]> | 2008-02-23 16:17:17 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2008-02-23 16:17:17 -0700 |
commit | 012391357fcbefd2b34e999eed91a129d5efd77c (patch) | |
tree | 2d2e639aeb24923af9108bb56daaf8356155d378 /src/gallium/drivers/softpipe/sp_quad.c | |
parent | 35ca45daba3906ac94fb879d2374d476ba2dac47 (diff) |
gallium: disable early Z test if fragment shader contains KIL instruction.
Use tgsi_scan_shader() to determine if the fragment shader uses KIL or
writes fragment.z
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_quad.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_quad.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_quad.c b/src/gallium/drivers/softpipe/sp_quad.c index 15b5594547d..142dbcc7710 100644 --- a/src/gallium/drivers/softpipe/sp_quad.c +++ b/src/gallium/drivers/softpipe/sp_quad.c @@ -56,11 +56,12 @@ sp_build_depth_stencil( void sp_build_quad_pipeline(struct softpipe_context *sp) { - boolean early_depth_test = + boolean early_depth_test = sp->depth_stencil->depth.enabled && sp->framebuffer.zsbuf && !sp->depth_stencil->alpha.enabled && - sp->fs->shader.output_semantic_name[0] != TGSI_SEMANTIC_POSITION; + !sp->fs->uses_kill && + !sp->fs->writes_z; /* build up the pipeline in reverse order... */ |