diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 1fc7a5fe954..1634771ac06 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -1219,7 +1219,7 @@ struct iris_depth_buffer_state { #if GFX_VERx10 == 120 enum iris_depth_reg_mode { IRIS_DEPTH_REG_MODE_HW_DEFAULT = 0, - IRIS_DEPTH_REG_MODE_D16, + IRIS_DEPTH_REG_MODE_D16_1X_MSAA, IRIS_DEPTH_REG_MODE_UNKNOWN, }; #endif @@ -5722,15 +5722,16 @@ genX(emit_depth_state_workarounds)(struct iris_context *ice, const struct isl_surf *surf) { #if GFX_VERx10 == 120 - const bool fmt_is_d16 = surf->format == ISL_FORMAT_R16_UNORM; + const bool is_d16_1x_msaa = surf->format == ISL_FORMAT_R16_UNORM && + surf->samples == 1; switch (ice->state.genx->depth_reg_mode) { case IRIS_DEPTH_REG_MODE_HW_DEFAULT: - if (!fmt_is_d16) + if (!is_d16_1x_msaa) return; break; - case IRIS_DEPTH_REG_MODE_D16: - if (fmt_is_d16) + case IRIS_DEPTH_REG_MODE_D16_1X_MSAA: + if (is_d16_1x_msaa) return; break; case IRIS_DEPTH_REG_MODE_UNKNOWN: @@ -5752,12 +5753,13 @@ genX(emit_depth_state_workarounds)(struct iris_context *ice, * Surface Format is D16_UNORM , surface type is not NULL & 1X_MSAA”. */ iris_emit_reg(batch, GENX(COMMON_SLICE_CHICKEN1), reg) { - reg.HIZPlaneOptimizationdisablebit = fmt_is_d16 && surf->samples == 1; + reg.HIZPlaneOptimizationdisablebit = is_d16_1x_msaa; reg.HIZPlaneOptimizationdisablebitMask = true; } ice->state.genx->depth_reg_mode = - fmt_is_d16 ? IRIS_DEPTH_REG_MODE_D16 : IRIS_DEPTH_REG_MODE_HW_DEFAULT; + is_d16_1x_msaa ? IRIS_DEPTH_REG_MODE_D16_1X_MSAA : + IRIS_DEPTH_REG_MODE_HW_DEFAULT; #endif }