intel/common: Add an enum of formats of AUX mapping
authorJianxun Zhang <jianxun.zhang@intel.com>
Wed, 9 Nov 2022 22:27:36 +0000 (14:27 -0800)
committerMarge Bot <emma+marge@anholt.net>
Fri, 9 Dec 2022 09:49:42 +0000 (09:49 +0000)
The new enum allows us to support multiple formats in the future.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20167>

src/intel/common/intel_aux_map.c

index 153ab59..cc82016 100644 (file)
 
 static const bool aux_map_debug = false;
 
+/**
+ * Auxiliary surface mapping formats
+ *
+ * Several formats of AUX mapping exist. The supported formats
+ * are designated by generation and granularity here. A device
+ * can support more than one format, depending on Hardware, but
+ * we expect only one of them of a device is needed. Otherwise,
+ * we could need to change this enum into a bit map in such case
+ * later.
+ */
+enum intel_aux_map_format {
+   /**
+    * 64KB granularity format on GFX12 devices
+    */
+   INTEL_AUX_MAP_GFX12_64KB = 0,
+   INTEL_AUX_MAP_LAST,
+};
+
 struct aux_map_buffer {
    struct list_head link;
    struct intel_buffer *buffer;