anv/cmd_buffer: Handle MCS identical to CCS_E in compute_aux_usage
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 24 Feb 2018 04:45:26 +0000 (20:45 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 1 Mar 2018 22:07:58 +0000 (14:07 -0800)
This doesn't actually do anything because att_state->fast_clear is
determined based on the return value of anv_layout_to_fast_clear_type
which currently returns NONE for multisampled images.

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
src/intel/vulkan/genX_cmd_buffer.c

index ce546249b34bff7d0134228221c4b782e94c4590..3d886b06eb173353932f0a4bbdbe2ba86ab58d8b 100644 (file)
@@ -235,14 +235,9 @@ color_attachment_compute_aux_usage(struct anv_device * device,
     */
    assert(att_state->aux_usage != ISL_AUX_USAGE_NONE);
 
-   if (att_state->aux_usage == ISL_AUX_USAGE_MCS) {
-      att_state->input_aux_usage = ISL_AUX_USAGE_MCS;
-      att_state->fast_clear = false;
-      return;
-   }
-
-   if (att_state->aux_usage == ISL_AUX_USAGE_CCS_E) {
-      att_state->input_aux_usage = ISL_AUX_USAGE_CCS_E;
+   if (att_state->aux_usage == ISL_AUX_USAGE_CCS_E ||
+       att_state->aux_usage == ISL_AUX_USAGE_MCS) {
+      att_state->input_aux_usage = att_state->aux_usage;
    } else {
       /* From the Sky Lake PRM, RENDER_SURFACE_STATE::AuxiliarySurfaceMode:
        *
@@ -274,7 +269,8 @@ color_attachment_compute_aux_usage(struct anv_device * device,
       }
    }
 
-   assert(iview->image->planes[0].aux_surface.isl.usage & ISL_SURF_USAGE_CCS_BIT);
+   assert(iview->image->planes[0].aux_surface.isl.usage &
+          (ISL_SURF_USAGE_CCS_BIT | ISL_SURF_USAGE_MCS_BIT));
 
    const struct isl_format_layout *view_fmtl =
       isl_format_get_layout(iview->planes[0].isl.format);