intel: enable HiZ on Gen7+
The support is restricted to Gen7+. To support HiZ on Gen6, we need to
perform manual combined/separated stencil resolves and that may hurt the
performance instead.
Also, we do not support fast depth clears. xglSetFastClearDepth() will be
removed in a later xgl.h revision.
diff --git a/icd/intel/fb.c b/icd/intel/fb.c
index e2115af..f6c0bad 100644
--- a/icd/intel/fb.c
+++ b/icd/intel/fb.c
@@ -97,8 +97,19 @@
}
fb->ds = ds;
+
+ switch (att->layout) {
+ case XGL_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL:
+ case XGL_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL:
+ fb->optimal_ds = true;
+ break;
+ default:
+ fb->optimal_ds = false;
+ break;
+ }
} else {
fb->ds = NULL;
+ fb->optimal_ds = false;
}
fb->width = width;