*/
initial_state = ISL_AUX_STATE_CLEAR;
break;
+ case ISL_AUX_USAGE_GEN12_CCS_E:
+ unreachable("Driver unprepared to handle this aux_usage.");
case ISL_AUX_USAGE_CCS_D:
case ISL_AUX_USAGE_CCS_E:
case ISL_AUX_USAGE_STC_CCS:
params.src.aux_usage == ISL_AUX_USAGE_MCS ||
params.src.aux_usage == ISL_AUX_USAGE_MCS_CCS ||
params.src.aux_usage == ISL_AUX_USAGE_CCS_E ||
+ params.src.aux_usage == ISL_AUX_USAGE_GEN12_CCS_E ||
params.src.aux_usage == ISL_AUX_USAGE_STC_CCS);
if (isl_aux_usage_has_hiz(params.src.aux_usage)) {
*/
params.src.view.format = params.dst.surf.format;
params.dst.view.format = params.dst.surf.format;
- } else if (params.dst.aux_usage == ISL_AUX_USAGE_CCS_E) {
+ } else if (params.dst.aux_usage == ISL_AUX_USAGE_CCS_E ||
+ params.dst.aux_usage == ISL_AUX_USAGE_GEN12_CCS_E) {
params.dst.view.format = get_ccs_compatible_copy_format(dst_fmtl);
- if (params.src.aux_usage == ISL_AUX_USAGE_CCS_E) {
+ if (params.src.aux_usage == ISL_AUX_USAGE_CCS_E ||
+ params.src.aux_usage == ISL_AUX_USAGE_GEN12_CCS_E) {
params.src.view.format = get_ccs_compatible_copy_format(src_fmtl);
} else if (src_fmtl->bpb == dst_fmtl->bpb) {
params.src.view.format = params.dst.view.format;
params.src.view.format =
get_copy_format_for_bpb(isl_dev, src_fmtl->bpb);
}
- } else if (params.src.aux_usage == ISL_AUX_USAGE_CCS_E) {
+ } else if (params.src.aux_usage == ISL_AUX_USAGE_CCS_E ||
+ params.src.aux_usage == ISL_AUX_USAGE_GEN12_CCS_E) {
params.src.view.format = get_ccs_compatible_copy_format(src_fmtl);
if (src_fmtl->bpb == dst_fmtl->bpb) {
params.dst.view.format = params.src.view.format;
*/
ISL_AUX_USAGE_CCS_E,
+ /** The auxiliary surface provides full lossless color compression on
+ * Gen12.
+ *
+ * @invariant isl_surf::samples == 1
+ */
+ ISL_AUX_USAGE_GEN12_CCS_E,
+
/** The auxiliary surface provides full lossless media color compression
*
* @invariant isl_surf::samples == 1
{
return usage == ISL_AUX_USAGE_CCS_D ||
usage == ISL_AUX_USAGE_CCS_E ||
+ usage == ISL_AUX_USAGE_GEN12_CCS_E ||
usage == ISL_AUX_USAGE_MC ||
usage == ISL_AUX_USAGE_HIZ_CCS_WT ||
usage == ISL_AUX_USAGE_HIZ_CCS ||
if (!mod_info || mod_info->aux_usage == ISL_AUX_USAGE_NONE)
return ISL_AUX_STATE_AUX_INVALID;
- assert(mod_info->aux_usage == ISL_AUX_USAGE_CCS_E);
+ assert(mod_info->aux_usage == ISL_AUX_USAGE_CCS_E ||
+ mod_info->aux_usage == ISL_AUX_USAGE_GEN12_CCS_E);
return mod_info->supports_clear_color ? ISL_AUX_STATE_COMPRESSED_CLEAR :
ISL_AUX_STATE_COMPRESSED_NO_CLEAR;
}
/* Writes using the 3D engine are compressed. */
WRITES_COMPRESS,
+ /* Writes using the 3D engine are either compressed or substituted with
+ * fast-cleared blocks.
+ */
+ WRITES_COMPRESS_CLEAR,
+
/* Writes implicitly fully resolve the compression block and write the data
* uncompressed into the main surface. The resolved aux blocks are
* ambiguated and left in the pass-through state.
AUX( COMPRESS, Y, Y, Y, x, MCS)
AUX( COMPRESS, Y, Y, Y, x, MCS_CCS)
AUX( COMPRESS, Y, Y, Y, Y, CCS_E)
+ AUX( COMPRESS_CLEAR, Y, Y, Y, Y, GEN12_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)
assert(isl_aux_state_has_valid_aux(initial_state));
assert(aux_state_possible(initial_state, usage));
assert(info[usage].write_behavior == WRITES_COMPRESS ||
+ info[usage].write_behavior == WRITES_COMPRESS_CLEAR ||
info[usage].write_behavior == WRITES_RESOLVE_AMBIGUATE);
if (full_surface) {
return info[usage].write_behavior == WRITES_COMPRESS ?
- ISL_AUX_STATE_COMPRESSED_NO_CLEAR : ISL_AUX_STATE_PASS_THROUGH;
+ ISL_AUX_STATE_COMPRESSED_NO_CLEAR :
+ info[usage].write_behavior == WRITES_COMPRESS_CLEAR ?
+ ISL_AUX_STATE_COMPRESSED_CLEAR : ISL_AUX_STATE_PASS_THROUGH;
}
switch (initial_state) {
case ISL_AUX_STATE_CLEAR:
case ISL_AUX_STATE_PARTIAL_CLEAR:
- return info[usage].write_behavior == WRITES_COMPRESS ?
- ISL_AUX_STATE_COMPRESSED_CLEAR : ISL_AUX_STATE_PARTIAL_CLEAR;
+ return info[usage].write_behavior == WRITES_RESOLVE_AMBIGUATE ?
+ ISL_AUX_STATE_PARTIAL_CLEAR : ISL_AUX_STATE_COMPRESSED_CLEAR;
case ISL_AUX_STATE_RESOLVED:
case ISL_AUX_STATE_PASS_THROUGH:
+ case ISL_AUX_STATE_COMPRESSED_NO_CLEAR:
return info[usage].write_behavior == WRITES_COMPRESS ?
- ISL_AUX_STATE_COMPRESSED_NO_CLEAR : initial_state;
+ ISL_AUX_STATE_COMPRESSED_NO_CLEAR :
+ info[usage].write_behavior == WRITES_COMPRESS_CLEAR ?
+ ISL_AUX_STATE_COMPRESSED_CLEAR : initial_state;
case ISL_AUX_STATE_COMPRESSED_CLEAR:
- case ISL_AUX_STATE_COMPRESSED_NO_CLEAR:
case ISL_AUX_STATE_AUX_INVALID:
return initial_state;
#ifdef IN_UNIT_TEST
static const uint32_t isl_to_gen_aux_mode[] = {
[ISL_AUX_USAGE_NONE] = AUX_NONE,
[ISL_AUX_USAGE_MCS] = AUX_CCS_E,
+ [ISL_AUX_USAGE_GEN12_CCS_E] = AUX_CCS_E,
[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,
if (GEN_GEN >= 12) {
assert(info->aux_usage == ISL_AUX_USAGE_MCS ||
info->aux_usage == ISL_AUX_USAGE_CCS_E ||
+ info->aux_usage == ISL_AUX_USAGE_GEN12_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_STC_CCS);
E(AUX_INVALID, STC_CCS, true, ASSERT);
}
+TEST(StateTransitionWrite, WritesCompressClear) {
+ E(CLEAR, GEN12_CCS_E, false, COMPRESSED_CLEAR);
+ E(CLEAR, GEN12_CCS_E, true, COMPRESSED_CLEAR);
+ E(PARTIAL_CLEAR, GEN12_CCS_E, false, COMPRESSED_CLEAR);
+ E(PARTIAL_CLEAR, GEN12_CCS_E, true, COMPRESSED_CLEAR);
+ E(COMPRESSED_CLEAR, GEN12_CCS_E, false, COMPRESSED_CLEAR);
+ E(COMPRESSED_CLEAR, GEN12_CCS_E, true, COMPRESSED_CLEAR);
+ E(COMPRESSED_NO_CLEAR, GEN12_CCS_E, false, COMPRESSED_CLEAR);
+ E(COMPRESSED_NO_CLEAR, GEN12_CCS_E, true, COMPRESSED_CLEAR);
+ E(RESOLVED, GEN12_CCS_E, false, COMPRESSED_CLEAR);
+ E(RESOLVED, GEN12_CCS_E, true, COMPRESSED_CLEAR);
+ E(PASS_THROUGH, GEN12_CCS_E, false, COMPRESSED_CLEAR);
+ E(PASS_THROUGH, GEN12_CCS_E, true, COMPRESSED_CLEAR);
+ E(AUX_INVALID, GEN12_CCS_E, false, ASSERT);
+ E(AUX_INVALID, GEN12_CCS_E, true, ASSERT);
+}
+
TEST(StateTransitionWrite, WritesResolveAmbiguate) {
E(CLEAR, CCS_D, false, PARTIAL_CLEAR);
E(CLEAR, CCS_D, true, PASS_THROUGH);