[Mesa-dev] [PATCH v2 01/27] i965/miptree: Support depth in get_isl_clear_color

Jason Ekstrand jason at jlekstrand.net
Tue Jul 26 22:11:05 UTC 2016


---
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index ba06ac9..8c63aa6 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -3302,7 +3302,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];
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list