#endif
}
+#if GEN_GEN == 5 || GEN_GEN == 6
+ const bool separate_stencil =
+ info->stencil_surf && info->stencil_surf->format == ISL_FORMAT_R8_UINT;
+ if (separate_stencil || info->hiz_usage == ISL_AUX_USAGE_HIZ) {
+ assert(ISL_DEV_USE_SEPARATE_STENCIL(dev));
+ db.SeparateStencilBufferEnable = true;
+ db.HierarchicalDepthBufferEnable = true;
+ }
+#endif
+
#if GEN_GEN >= 6
struct GENX(3DSTATE_STENCIL_BUFFER) sb = {
GENX(3DSTATE_STENCIL_BUFFER_header),
info->hiz_usage == ISL_AUX_USAGE_HIZ);
if (info->hiz_usage == ISL_AUX_USAGE_HIZ) {
db.HierarchicalDepthBufferEnable = true;
-#if GEN_GEN == 5 || GEN_GEN == 6
- db.SeparateStencilBufferEnable = true;
-#endif
hiz.SurfaceBaseAddress = info->hiz_address;
hiz.HierarchicalDepthBufferMOCS = info->mocs;