summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorDaniel Vetter <[email protected]>2011-09-25 18:49:02 +0200
committerDaniel Vetter <[email protected]>2011-10-07 14:31:17 +0200
commit530728fb60fc4dd2aa1a2b6eb5de39ec9b17ea35 (patch)
treecd049800a32c9a0234deeda0d2b0df6d06619142 /src/gallium
parentce775dc1b6601bb7272054b87fcb574c19265c63 (diff)
i915g: handle seperate stencil clear
Signed-off-by: Daniel Vetter <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/i915/i915_clear.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/i915/i915_clear.c b/src/gallium/drivers/i915/i915_clear.c
index 8e2541d51d6..69fe2f3aefe 100644
--- a/src/gallium/drivers/i915/i915_clear.c
+++ b/src/gallium/drivers/i915/i915_clear.c
@@ -105,6 +105,16 @@ i915_clear_emit(struct pipe_context *pipe, unsigned buffers,
clear_depth = (packed_z_stencil & 0xffff) | (packed_z_stencil << 16);
depth_clear_bbp = 16;
}
+ } else if (buffers & PIPE_CLEAR_DEPTH) {
+ struct pipe_surface *zbuf = i915->framebuffer.zsbuf;
+
+ clear_params |= CLEARPARAM_WRITE_STENCIL;
+ depth_tex = i915_texture(zbuf->texture);
+ assert(depth_tex->b.b.format == PIPE_FORMAT_Z24_UNORM_S8_USCALED);
+
+ packed_z_stencil = util_pack_z_stencil(depth_tex->b.b.format, depth, stencil);
+ depth_clear_bbp = 32;
+ clear_stencil = packed_z_stencil & 0xff;
}
/* hw can't fastclear both depth and color if their bbp mismatch. */