anv/pipeline: Silently pass tests if depth or stencil is missing
[mesa.git] / src / intel / vulkan / anv_wsi_wayland.c
index 08eeda0a038fc9d5081ccc54bd597498598ff3dd..e95359c22c1f00cbf0a1306006615586bff04592 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "anv_wsi.h"
 
+#include "vk_format_info.h"
 #include <util/hash_table.h>
 
 #define MIN_NUM_IMAGES 2
@@ -642,7 +643,7 @@ wsi_wl_image_init(struct wsi_wl_swapchain *chain, struct wsi_wl_image *image,
       return result;
 
    image->image = anv_image_from_handle(vk_image);
-   assert(anv_format_is_color(image->image->format));
+   assert(vk_format_is_color(image->image->vk_format));
 
    struct anv_surface *surface = &image->image->color_surface;
 
@@ -781,12 +782,16 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase *icd_surface,
 
    chain->display = wsi_wl_get_display(&device->instance->physicalDevice,
                                        surface->display);
-   if (!chain->display)
+   if (!chain->display) {
+      result = vk_error(VK_ERROR_INITIALIZATION_FAILED);
       goto fail;
+   }
 
    chain->queue = wl_display_create_queue(chain->display->display);
-   if (!chain->queue)
+   if (!chain->queue) {
+      result = vk_error(VK_ERROR_INITIALIZATION_FAILED);
       goto fail;
+   }
 
    for (uint32_t i = 0; i < chain->image_count; i++) {
       result = wsi_wl_image_init(chain, &chain->images[i], pAllocator);