Bug 14522: Remove VkAttachmentView

https://cvs.khronos.org/bugzilla/show_bug.cgi?id=14522
Several parts of the driver really want an attachment view
so I've included the attachment information in the
intel_img_view structure and initialize both when the
view is created.
Parts of the meta path only need intel_att_view and
I kept that in place.
diff --git a/icd/intel/view.h b/icd/intel/view.h
index 46382da..f8a1f2b 100644
--- a/icd/intel/view.h
+++ b/icd/intel/view.h
@@ -53,21 +53,7 @@
     uint32_t cmd_len;
 };
 
-struct intel_img_view {
-    struct intel_obj obj;
-
-    struct intel_img *img;
-
-    VkChannelMapping shader_swizzles;
-
-    /* SURFACE_STATE */
-    uint32_t cmd[8];
-    uint32_t cmd_len;
-};
-
 struct intel_att_view {
-    struct intel_obj obj;
-
     struct intel_img *img;
 
     uint32_t mipLevel;
@@ -91,6 +77,20 @@
     bool has_hiz;
 };
 
+struct intel_img_view {
+    struct intel_obj obj;
+
+    struct intel_img *img;
+
+    VkChannelMapping shader_swizzles;
+
+    /* SURFACE_STATE */
+    uint32_t cmd[8];
+    uint32_t cmd_len;
+
+    struct intel_att_view att_view;
+};
+
 static inline struct intel_buf_view *intel_buf_view(VkBufferView view)
 {
     return *(struct intel_buf_view **) &view;
@@ -111,16 +111,6 @@
     return (struct intel_img_view *) obj;
 }
 
-static inline struct intel_att_view *intel_att_view(VkAttachmentView view)
-{
-    return *(struct intel_att_view **) &view;
-}
-
-static inline struct intel_att_view *intel_att_view_from_obj(struct intel_obj *obj)
-{
-    return (struct intel_att_view *) obj;
-}
-
 void intel_null_view_init(struct intel_null_view *view,
                           struct intel_dev *dev);
 
@@ -130,14 +120,17 @@
 
 void intel_buf_view_destroy(struct intel_buf_view *view);
 
+void intel_img_view_init(struct intel_dev *dev, const VkImageViewCreateInfo *info,
+                         struct intel_img_view *view);
+
 VkResult intel_img_view_create(struct intel_dev *dev,
                                  const VkImageViewCreateInfo *info,
                                  struct intel_img_view **view_ret);
 void intel_img_view_destroy(struct intel_img_view *view);
 
-VkResult intel_att_view_create(struct intel_dev *dev,
-                               const VkAttachmentViewCreateInfo *info,
-                               struct intel_att_view **view_ret);
+void intel_att_view_init(struct intel_dev *dev,
+                         const VkImageViewCreateInfo *info,
+                         struct intel_att_view *att_view);
 void intel_att_view_destroy(struct intel_att_view *view);
 
 #endif /* VIEW_H */