anv: Add an anv_physical_device field to anv_device
[mesa.git] / src / intel / vulkan / anv_private.h
index dd47df9a09d4cc87f092040aebac0f76d455578f..8b7725821909c345d335a75c0d8b5a443fd1412b 100644 (file)
@@ -1209,6 +1209,7 @@ struct anv_device {
     VkAllocationCallbacks                       alloc;
 
     struct anv_instance *                       instance;
+    struct anv_physical_device *                physical;
     uint32_t                                    chipset_id;
     bool                                        no_hw;
     struct gen_device_info                      info;
@@ -1272,7 +1273,7 @@ struct anv_device {
 static inline struct anv_state_pool *
 anv_binding_table_pool(struct anv_device *device)
 {
-   if (device->instance->physicalDevice.use_softpin)
+   if (device->physical->use_softpin)
       return &device->binding_table_pool;
    else
       return &device->surface_state_pool;
@@ -1280,7 +1281,7 @@ anv_binding_table_pool(struct anv_device *device)
 
 static inline struct anv_state
 anv_binding_table_pool_alloc(struct anv_device *device) {
-   if (device->instance->physicalDevice.use_softpin)
+   if (device->physical->use_softpin)
       return anv_state_pool_alloc(&device->binding_table_pool,
                                   device->binding_table_pool.block_size, 0);
    else
@@ -3287,6 +3288,12 @@ anv_get_isl_format(const struct gen_device_info *devinfo, VkFormat vk_format,
    return anv_get_format_plane(devinfo, vk_format, aspect, tiling).isl_format;
 }
 
+bool anv_formats_ccs_e_compatible(const struct gen_device_info *devinfo,
+                                  VkImageCreateFlags create_flags,
+                                  VkFormat vk_format,
+                                  VkImageTiling vk_tiling,
+                                  const VkImageFormatListCreateInfoKHR *fmt_list);
+
 static inline struct isl_swizzle
 anv_swizzle_for_render(struct isl_swizzle swizzle)
 {