diff options
author | Eric Anholt <[email protected]> | 2009-01-30 11:24:04 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2009-01-30 13:46:37 -0800 |
commit | 67ee22c89f42146e7befb2fdd39bdd68a5258c30 (patch) | |
tree | 2c61d1c7d9c069a30e6270ef613a32a69ff7cb28 /src/mesa/drivers/dri/intel/intel_clear.c | |
parent | ac0dfbdf0f5e5dea08ec717ae8c4e1e141b15c05 (diff) |
intel: If we're doing a depth clear with tris, do color with it.
This is a 10% win on the ever-important glxgears not-a-benchmark.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_clear.c')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_clear.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_clear.c b/src/mesa/drivers/dri/intel/intel_clear.c index 921ec2dc330..98f7292f597 100644 --- a/src/mesa/drivers/dri/intel/intel_clear.c +++ b/src/mesa/drivers/dri/intel/intel_clear.c @@ -201,6 +201,14 @@ intelClear(GLcontext *ctx, GLbitfield mask) blit_mask |= BUFFER_BIT_DEPTH; } + /* If we're doing a tri pass for depth/stencil, include a likely color + * buffer with it. + */ + if (mask & (BUFFER_BIT_DEPTH | BUFFER_BIT_STENCIL)) { + tri_mask |= blit_mask & BUFFER_BIT_BACK_LEFT; + blit_mask &= ~BUFFER_BIT_BACK_LEFT; + } + /* SW fallback clearing */ swrast_mask = mask & ~tri_mask & ~blit_mask; |