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/cmd_pipeline.c b/icd/intel/cmd_pipeline.c
index 4981164..1d6093c 100644
--- a/icd/intel/cmd_pipeline.c
+++ b/icd/intel/cmd_pipeline.c
@@ -1840,9 +1840,9 @@
}
cmd_wa_gen6_pre_ds_flush(cmd);
- gen6_3DSTATE_DEPTH_BUFFER(cmd, ds, false);
- gen6_3DSTATE_STENCIL_BUFFER(cmd, ds, false);
- gen6_3DSTATE_HIER_DEPTH_BUFFER(cmd, ds, false);
+ gen6_3DSTATE_DEPTH_BUFFER(cmd, ds, fb->optimal_ds);
+ gen6_3DSTATE_STENCIL_BUFFER(cmd, ds, fb->optimal_ds);
+ gen6_3DSTATE_HIER_DEPTH_BUFFER(cmd, ds, fb->optimal_ds);
if (cmd_gen(cmd) >= INTEL_GEN(7))
gen7_3DSTATE_CLEAR_PARAMS(cmd, 0);