if (res->mod_info) {
res->aux.possible_usages |= 1 << res->mod_info->aux_usage;
- } else if (res->surf.samples > 1) {
- if (supports_mcs(&res->surf))
- res->aux.possible_usages |= 1 << ISL_AUX_USAGE_MCS;
- } else {
- if (has_depth) {
- if (likely(!(INTEL_DEBUG & DEBUG_NO_HIZ)))
- res->aux.possible_usages |= 1 << ISL_AUX_USAGE_HIZ;
- } else if (likely(!(INTEL_DEBUG & DEBUG_NO_RBC)) &&
- supports_ccs(devinfo, &res->surf)) {
- if (isl_format_supports_ccs_e(devinfo, res->surf.format))
- res->aux.possible_usages |= 1 << ISL_AUX_USAGE_CCS_E;
-
- if (isl_format_supports_ccs_d(devinfo, res->surf.format))
- res->aux.possible_usages |= 1 << ISL_AUX_USAGE_CCS_D;
- }
+ } else if (supports_mcs(&res->surf)) {
+ res->aux.possible_usages |= 1 << ISL_AUX_USAGE_MCS;
+ } else if (has_depth) {
+ if (likely(!(INTEL_DEBUG & DEBUG_NO_HIZ)))
+ res->aux.possible_usages |= 1 << ISL_AUX_USAGE_HIZ;
+ } else if (likely(!(INTEL_DEBUG & DEBUG_NO_RBC)) &&
+ supports_ccs(devinfo, &res->surf)) {
+ if (isl_format_supports_ccs_e(devinfo, res->surf.format))
+ res->aux.possible_usages |= 1 << ISL_AUX_USAGE_CCS_E;
+
+ if (isl_format_supports_ccs_d(devinfo, res->surf.format))
+ res->aux.possible_usages |= 1 << ISL_AUX_USAGE_CCS_D;
}
res->aux.usage = util_last_bit(res->aux.possible_usages) - 1;
while (aux_modes) {
enum isl_aux_usage aux_usage = u_bit_scan(&aux_modes);
- fill_surface_state(&screen->isl_dev, map, isv->res, &isv->view,
- aux_usage);
+ /* If we have a multisampled depth buffer, do not create a sampler
+ * surface state with HiZ.
+ */
+ if (!(aux_usage == ISL_AUX_USAGE_HIZ && isv->res->surf.samples > 1)) {
+ fill_surface_state(&screen->isl_dev, map, isv->res, &isv->view,
+ aux_usage);
+ }
map += SURFACE_STATE_ALIGNMENT;
}