hzp.DepthBufferResolveEnable = params->depth.enabled;
#if GEN_GEN >= 12
if (params->stencil.enabled) {
- assert(params->stencil.aux_usage == ISL_AUX_USAGE_CCS_E);
+ assert(params->stencil.aux_usage == ISL_AUX_USAGE_CCS_E ||
+ params->stencil.aux_usage == ISL_AUX_USAGE_STC_CCS);
hzp.StencilBufferResolveEnable = true;
}
#endif
* @invariant isl_surf::samples > 1
*/
ISL_AUX_USAGE_MCS_CCS,
+
+ /** CCS auxiliary data is used to compress a stencil buffer
+ *
+ * @invariant isl_surf::samples == 1
+ */
+ ISL_AUX_USAGE_STC_CCS,
};
/**
usage == ISL_AUX_USAGE_MC ||
usage == ISL_AUX_USAGE_HIZ_CCS_WT ||
usage == ISL_AUX_USAGE_HIZ_CCS ||
- usage == ISL_AUX_USAGE_MCS_CCS;
+ usage == ISL_AUX_USAGE_MCS_CCS ||
+ usage == ISL_AUX_USAGE_STC_CCS;
}
static inline bool
AUX( COMPRESS, Y, Y, Y, Y, CCS_E)
AUX(RESOLVE_AMBIGUATE, x, Y, x, Y, CCS_D)
AUX(RESOLVE_AMBIGUATE, Y, x, x, Y, MC)
+ AUX( COMPRESS, Y, x, x, Y, STC_CCS)
};
#undef x
#undef Y
sb.SurfLOD = info->view->base_level;
sb.MinimumArrayElement = info->view->base_array_layer;
sb.StencilCompressionEnable =
- info->stencil_aux_usage == ISL_AUX_USAGE_CCS_E;
+ info->stencil_aux_usage == ISL_AUX_USAGE_CCS_E ||
+ info->stencil_aux_usage == ISL_AUX_USAGE_STC_CCS;
sb.ControlSurfaceEnable = sb.StencilCompressionEnable;
#elif GEN_GEN >= 8 || GEN_IS_HASWELL
sb.StencilBufferEnable = true;
[ISL_AUX_USAGE_CCS_E] = AUX_CCS_E,
[ISL_AUX_USAGE_HIZ_CCS_WT] = AUX_CCS_E,
[ISL_AUX_USAGE_MCS_CCS] = AUX_MCS_LCE,
+ [ISL_AUX_USAGE_STC_CCS] = AUX_CCS_E,
};
#elif GEN_GEN >= 9
static const uint32_t isl_to_gen_aux_mode[] = {
assert(info->aux_usage == ISL_AUX_USAGE_MCS ||
info->aux_usage == ISL_AUX_USAGE_CCS_E ||
info->aux_usage == ISL_AUX_USAGE_HIZ_CCS_WT ||
- info->aux_usage == ISL_AUX_USAGE_MCS_CCS);
+ info->aux_usage == ISL_AUX_USAGE_MCS_CCS ||
+ info->aux_usage == ISL_AUX_USAGE_STC_CCS);
} else if (GEN_GEN >= 9) {
assert(info->aux_usage == ISL_AUX_USAGE_HIZ ||
info->aux_usage == ISL_AUX_USAGE_MCS ||
E(PASS_THROUGH, MCS, true, COMPRESSED_NO_CLEAR);
E(AUX_INVALID, MCS, false, ASSERT);
E(AUX_INVALID, MCS, true, ASSERT);
+
+ E(CLEAR, STC_CCS, false, ASSERT);
+ E(CLEAR, STC_CCS, true, ASSERT);
+ E(PARTIAL_CLEAR, STC_CCS, false, ASSERT);
+ E(PARTIAL_CLEAR, STC_CCS, true, ASSERT);
+ E(COMPRESSED_CLEAR, STC_CCS, false, ASSERT);
+ E(COMPRESSED_CLEAR, STC_CCS, true, ASSERT);
+ E(COMPRESSED_NO_CLEAR, STC_CCS, false, COMPRESSED_NO_CLEAR);
+ E(COMPRESSED_NO_CLEAR, STC_CCS, true, COMPRESSED_NO_CLEAR);
+ E(RESOLVED, STC_CCS, false, COMPRESSED_NO_CLEAR);
+ E(RESOLVED, STC_CCS, true, COMPRESSED_NO_CLEAR);
+ E(PASS_THROUGH, STC_CCS, false, COMPRESSED_NO_CLEAR);
+ E(PASS_THROUGH, STC_CCS, true, COMPRESSED_NO_CLEAR);
+ E(AUX_INVALID, STC_CCS, false, ASSERT);
+ E(AUX_INVALID, STC_CCS, true, ASSERT);
}
TEST(StateTransitionWrite, WritesResolveAmbiguate) {