diff options
author | Dave Airlie <[email protected]> | 2016-10-14 12:57:44 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2016-10-19 09:05:25 +1000 |
commit | 8df014c01a41012a983bd0be164600ab50300e5c (patch) | |
tree | fdb82b1d6497f407d2222d20323d84c5f43ee4d0 /src/intel/vulkan/anv_wsi_wayland.c | |
parent | 008f54f63af51638ce36e47ca971714953f142f8 (diff) |
anv: port to using new u_vector shared helper.
This just removes the anv vector code and uses the new helper.
Acked-by: Jason Ekstrand <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_wsi_wayland.c')
-rw-r--r-- | src/intel/vulkan/anv_wsi_wayland.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/intel/vulkan/anv_wsi_wayland.c b/src/intel/vulkan/anv_wsi_wayland.c index 71527d36d5f..5b1a6759ac6 100644 --- a/src/intel/vulkan/anv_wsi_wayland.c +++ b/src/intel/vulkan/anv_wsi_wayland.c @@ -37,7 +37,7 @@ struct wsi_wl_display { struct wl_drm * drm; /* Vector of VkFormats supported */ - struct anv_vector formats; + struct u_vector formats; uint32_t capabilities; }; @@ -57,7 +57,7 @@ wsi_wl_display_add_vk_format(struct wsi_wl_display *display, VkFormat format) { /* Don't add a format that's already in the list */ VkFormat *f; - anv_vector_foreach(f, &display->formats) + u_vector_foreach(f, &display->formats) if (*f == format) return; @@ -68,7 +68,7 @@ wsi_wl_display_add_vk_format(struct wsi_wl_display *display, VkFormat format) if (!(props.optimalTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT)) return; - f = anv_vector_add(&display->formats); + f = u_vector_add(&display->formats); if (f) *f = format; } @@ -230,7 +230,7 @@ static const struct wl_registry_listener registry_listener = { static void wsi_wl_display_destroy(struct wsi_wayland *wsi, struct wsi_wl_display *display) { - anv_vector_finish(&display->formats); + u_vector_finish(&display->formats); if (display->drm) wl_drm_destroy(display->drm); anv_free(&wsi->physical_device->instance->alloc, display); @@ -250,7 +250,7 @@ wsi_wl_display_create(struct wsi_wayland *wsi, struct wl_display *wl_display) display->display = wl_display; display->physical_device = wsi->physical_device; - if (!anv_vector_init(&display->formats, sizeof(VkFormat), 8)) + if (!u_vector_init(&display->formats, sizeof(VkFormat), 8)) goto fail; struct wl_registry *registry = wl_display_get_registry(wl_display); @@ -383,7 +383,7 @@ wsi_wl_surface_get_formats(VkIcdSurfaceBase *icd_surface, struct wsi_wl_display *display = wsi_wl_get_display(device, surface->display); - uint32_t count = anv_vector_length(&display->formats); + uint32_t count = u_vector_length(&display->formats); if (pSurfaceFormats == NULL) { *pSurfaceFormatCount = count; @@ -394,7 +394,7 @@ wsi_wl_surface_get_formats(VkIcdSurfaceBase *icd_surface, *pSurfaceFormatCount = count; VkFormat *f; - anv_vector_foreach(f, &display->formats) { + u_vector_foreach(f, &display->formats) { *(pSurfaceFormats++) = (VkSurfaceFormatKHR) { .format = *f, /* TODO: We should get this from the compositor somehow */ |