From dd46c8da31e2ad6c9ff4909b8759aac75d3766e6 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 1 Jul 2016 16:02:45 -0700 Subject: i965/miptree: Support depth in get_isl_clear_color Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index 65f58aa9d30..fbb06de162a 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -3285,7 +3285,12 @@ intel_miptree_get_isl_clear_color(struct brw_context *brw, { union isl_color_value clear_color; - if (brw->gen >= 9) { + if (_mesa_get_format_base_format(mt->format) == GL_DEPTH_COMPONENT) { + clear_color.i32[0] = mt->depth_clear_value; + clear_color.i32[1] = 0; + clear_color.i32[2] = 0; + clear_color.i32[3] = 0; + } else if (brw->gen >= 9) { clear_color.i32[0] = mt->gen9_fast_clear_color.i[0]; clear_color.i32[1] = mt->gen9_fast_clear_color.i[1]; clear_color.i32[2] = mt->gen9_fast_clear_color.i[2]; -- cgit v1.2.3