anv: Simplify a case in layout_to_aux_usage
authorJason Ekstrand <jason@jlekstrand.net>
Sat, 7 Mar 2020 01:22:57 +0000 (19:22 -0600)
committerMarge Bot <eric+marge@anholt.net>
Fri, 24 Apr 2020 16:17:45 +0000 (16:17 +0000)
If it's depth, the only possible value of planes[plane].aux_usage is
ISL_AUX_USAGE_HIZ at least right now.

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4100>

src/intel/vulkan/anv_image.c

index ea9be68e762a9004088925ed80f90108d24309e1..3fb48d0b3cd0442ed642dca0002859716a0fbc5a 100644 (file)
@@ -1499,12 +1499,7 @@ anv_layout_to_aux_usage(const struct gen_device_info * const devinfo,
 
    case ISL_AUX_STATE_COMPRESSED_CLEAR:
    case ISL_AUX_STATE_COMPRESSED_NO_CLEAR:
-      if (aspect == VK_IMAGE_ASPECT_DEPTH_BIT) {
-         return ISL_AUX_USAGE_HIZ;
-      } else {
-         assert(image->planes[plane].aux_usage != ISL_AUX_USAGE_NONE);
-         return image->planes[plane].aux_usage;
-      }
+      return image->planes[plane].aux_usage;
 
    case ISL_AUX_STATE_RESOLVED:
       /* We can only use RESOLVED in read-only layouts because any write will