vulkan: use updated tokens from vk.xml
authorEric Engestrom <eric@igalia.com>
Fri, 1 Jul 2022 12:02:59 +0000 (13:02 +0100)
committerMarge Bot <emma+marge@anholt.net>
Tue, 12 Jul 2022 15:53:11 +0000 (15:53 +0000)
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17342>

src/vulkan/device-select-layer/device_select_layer.c
src/vulkan/overlay-layer/overlay.cpp
src/vulkan/util/vk_format.c
src/vulkan/wsi/wsi_common.c
src/vulkan/wsi/wsi_common_display.c
src/vulkan/wsi/wsi_common_drm.c
src/vulkan/wsi/wsi_common_private.h
src/vulkan/wsi/wsi_common_wayland.c
src/vulkan/wsi/wsi_common_win32.c
src/vulkan/wsi/wsi_common_x11.c

index ee8bfc1..77952cc 100644 (file)
@@ -204,8 +204,8 @@ static void print_gpu(const struct instance_info *info, unsigned index, VkPhysic
    VkPhysicalDevicePCIBusInfoPropertiesEXT ext_pci_properties = (VkPhysicalDevicePCIBusInfoPropertiesEXT) {
       .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT
    };
-   VkPhysicalDeviceProperties2KHR properties = (VkPhysicalDeviceProperties2KHR){
-      .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR
+   VkPhysicalDeviceProperties2 properties = (VkPhysicalDeviceProperties2){
+      .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2
    };
    if (info->has_vulkan11 && info->has_pci_bus)
       properties.pNext = &ext_pci_properties;
@@ -246,8 +246,8 @@ static bool fill_drm_device_info(const struct instance_info *info,
       .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT
    };
 
-   VkPhysicalDeviceProperties2KHR properties = (VkPhysicalDeviceProperties2KHR){
-      .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR
+   VkPhysicalDeviceProperties2 properties = (VkPhysicalDeviceProperties2){
+      .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2
    };
 
    if (info->has_vulkan11 && info->has_pci_bus)
@@ -575,8 +575,8 @@ static VkResult device_select_EnumeratePhysicalDeviceGroups(VkInstance instance,
       bool group_has_cpu_device = false;
       for (unsigned j = 0; j < physical_device_groups[i].physicalDeviceCount; j++) {
          VkPhysicalDevice physical_device = physical_device_groups[i].physicalDevices[j];
-         VkPhysicalDeviceProperties2KHR properties = (VkPhysicalDeviceProperties2KHR){
-            .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR
+         VkPhysicalDeviceProperties2 properties = (VkPhysicalDeviceProperties2){
+            .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2
          };
          info->GetPhysicalDeviceProperties(physical_device, &properties.properties);
          group_has_cpu_device = properties.properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU;
index 55d745d..ab74226 100644 (file)
@@ -2182,7 +2182,7 @@ static void overlay_CmdBindPipeline(
    switch (pipelineBindPoint) {
    case VK_PIPELINE_BIND_POINT_GRAPHICS: cmd_buffer_data->stats.stats[OVERLAY_PARAM_ENABLED_pipeline_graphics]++; break;
    case VK_PIPELINE_BIND_POINT_COMPUTE: cmd_buffer_data->stats.stats[OVERLAY_PARAM_ENABLED_pipeline_compute]++; break;
-   case VK_PIPELINE_BIND_POINT_RAY_TRACING_NV: cmd_buffer_data->stats.stats[OVERLAY_PARAM_ENABLED_pipeline_raytracing]++; break;
+   case VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR: cmd_buffer_data->stats.stats[OVERLAY_PARAM_ENABLED_pipeline_raytracing]++; break;
    default: break;
    }
    struct device_data *device_data = cmd_buffer_data->device;
@@ -2455,7 +2455,7 @@ static VkResult overlay_QueueSubmit(
 static VkResult overlay_QueueSubmit2KHR(
     VkQueue                                     queue,
     uint32_t                                    submitCount,
-    const VkSubmitInfo2KHR*                     pSubmits,
+    const VkSubmitInfo2*                        pSubmits,
     VkFence                                     fence)
 {
    struct queue_data *queue_data = FIND(struct queue_data, queue);
index 51a6171..27b65d4 100644 (file)
@@ -273,9 +273,9 @@ vk_format_to_pipe_format(enum VkFormat vkformat)
          return PIPE_FORMAT_Y16_U16V16_422_UNORM;
       case VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:
          return PIPE_FORMAT_Y16_U16_V16_444_UNORM;
-      case VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT:
+      case VK_FORMAT_A4R4G4B4_UNORM_PACK16:
          return PIPE_FORMAT_B4G4R4A4_UNORM;
-      case VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT:
+      case VK_FORMAT_A4B4G4R4_UNORM_PACK16:
          return PIPE_FORMAT_R4G4B4A4_UNORM;
       default:
          return PIPE_FORMAT_NONE;
index 7a8a95b..108f65a 100644 (file)
@@ -473,11 +473,11 @@ wsi_configure_image(const struct wsi_swapchain *chain,
 
    if (pCreateInfo->flags & VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR) {
       info->create.flags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT |
-                            VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR;
+                            VK_IMAGE_CREATE_EXTENDED_USAGE_BIT;
 
-      const VkImageFormatListCreateInfoKHR *format_list_in =
+      const VkImageFormatListCreateInfo *format_list_in =
          vk_find_struct_const(pCreateInfo->pNext,
-                              IMAGE_FORMAT_LIST_CREATE_INFO_KHR);
+                              IMAGE_FORMAT_LIST_CREATE_INFO);
 
       assume(format_list_in && format_list_in->viewFormatCount > 0);
 
@@ -496,8 +496,8 @@ wsi_configure_image(const struct wsi_swapchain *chain,
       }
       assert(format_found);
 
-      info->format_list = (VkImageFormatListCreateInfoKHR) {
-         .sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR,
+      info->format_list = (VkImageFormatListCreateInfo) {
+         .sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO,
          .viewFormatCount = view_format_count,
          .pViewFormats = view_formats,
       };
index 5ad1566..418ef6e 100644 (file)
@@ -927,7 +927,7 @@ wsi_display_surface_get_surface_counters(
    VkIcdSurfaceBase *surface_base,
    VkSurfaceCounterFlagsEXT *counters)
 {
-   *counters = VK_SURFACE_COUNTER_VBLANK_EXT;
+   *counters = VK_SURFACE_COUNTER_VBLANK_BIT_EXT;
    return VK_SUCCESS;
 }
 
@@ -997,7 +997,7 @@ wsi_display_surface_get_formats(VkIcdSurfaceBase *icd_surface,
    for (unsigned i = 0; i < ARRAY_SIZE(sorted_formats); i++) {
       vk_outarray_append_typed(VkSurfaceFormatKHR, &out, f) {
          f->format = sorted_formats[i];
-         f->colorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR;
+         f->colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
       }
    }
 
@@ -1021,7 +1021,7 @@ wsi_display_surface_get_formats2(VkIcdSurfaceBase *surface,
       vk_outarray_append_typed(VkSurfaceFormat2KHR, &out, f) {
          assert(f->sType == VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR);
          f->surfaceFormat.format = sorted_formats[i];
-         f->surfaceFormat.colorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR;
+         f->surfaceFormat.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
       }
    }
 
index f41268a..a767cb4 100644 (file)
@@ -385,7 +385,7 @@ wsi_configure_native_image(const struct wsi_swapchain *chain,
             .flags = info->create.flags,
          };
 
-         VkImageFormatListCreateInfoKHR format_list;
+         VkImageFormatListCreateInfo format_list;
          if (info->create.flags & VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT) {
             format_list = info->format_list;
             format_list.pNext = NULL;
index 1d1d5a9..6315e6c 100644 (file)
@@ -41,7 +41,7 @@ struct wsi_image_info {
    VkImageCreateInfo create;
    struct wsi_image_create_info wsi;
    VkExternalMemoryImageCreateInfo ext_mem;
-   VkImageFormatListCreateInfoKHR format_list;
+   VkImageFormatListCreateInfo format_list;
    VkImageDrmFormatModifierListCreateInfoEXT drm_mod_list;
 
    bool prime_use_linear_modifier;
index 2ba6cb1..882f2f7 100644 (file)
@@ -183,22 +183,22 @@ wsi_wl_display_add_drm_format_modifier(struct wsi_wl_display *display,
     * we probably need to make their use conditional on this extension. */
    case DRM_FORMAT_ARGB4444:
       wsi_wl_display_add_vk_format_modifier(display, formats,
-                                            VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT,
+                                            VK_FORMAT_A4R4G4B4_UNORM_PACK16,
                                             WSI_WL_FMT_ALPHA, modifier);
       break;
    case DRM_FORMAT_XRGB4444:
       wsi_wl_display_add_vk_format_modifier(display, formats,
-                                            VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT,
+                                            VK_FORMAT_A4R4G4B4_UNORM_PACK16,
                                             WSI_WL_FMT_OPAQUE, modifier);
       break;
    case DRM_FORMAT_ABGR4444:
       wsi_wl_display_add_vk_format_modifier(display, formats,
-                                            VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT,
+                                            VK_FORMAT_A4B4G4R4_UNORM_PACK16,
                                             WSI_WL_FMT_ALPHA, modifier);
       break;
    case DRM_FORMAT_XBGR4444:
       wsi_wl_display_add_vk_format_modifier(display, formats,
-                                            VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT,
+                                            VK_FORMAT_A4B4G4R4_UNORM_PACK16,
                                             WSI_WL_FMT_OPAQUE, modifier);
       break;
 #endif
@@ -381,9 +381,9 @@ wl_drm_format_for_vk_format(VkFormat vk_format, bool alpha)
 {
    switch (vk_format) {
 #if 0
-   case VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT:
+   case VK_FORMAT_A4R4G4B4_UNORM_PACK16:
       return alpha ? DRM_FORMAT_ARGB4444 : DRM_FORMAT_XRGB4444;
-   case VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT:
+   case VK_FORMAT_A4B4G4R4_UNORM_PACK16:
       return alpha ? DRM_FORMAT_ABGR4444 : DRM_FORMAT_XBGR4444;
 #endif
 #if MESA_LITTLE_ENDIAN
@@ -794,7 +794,7 @@ wsi_wl_surface_get_formats(VkIcdSurfaceBase *icd_surface,
 
       vk_outarray_append_typed(VkSurfaceFormatKHR, &out, out_fmt) {
          out_fmt->format = disp_fmt->vk_format;
-         out_fmt->colorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR;
+         out_fmt->colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
       }
    }
 
@@ -833,7 +833,7 @@ wsi_wl_surface_get_formats2(VkIcdSurfaceBase *icd_surface,
 
       vk_outarray_append_typed(VkSurfaceFormat2KHR, &out, out_fmt) {
          out_fmt->surfaceFormat.format = disp_fmt->vk_format;
-         out_fmt->surfaceFormat.colorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR;
+         out_fmt->surfaceFormat.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
       }
    }
 
index 140c8a9..2192bb2 100644 (file)
@@ -228,7 +228,7 @@ wsi_win32_surface_get_formats(VkIcdSurfaceBase *icd_surface,
    for (unsigned i = 0; i < ARRAY_SIZE(sorted_formats); i++) {
       vk_outarray_append_typed(VkSurfaceFormatKHR, &out, f) {
          f->format = sorted_formats[i];
-         f->colorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR;
+         f->colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
       }
    }
 
@@ -251,7 +251,7 @@ wsi_win32_surface_get_formats2(VkIcdSurfaceBase *icd_surface,
       vk_outarray_append_typed(VkSurfaceFormat2KHR, &out, f) {
          assert(f->sType == VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR);
          f->surfaceFormat.format = sorted_formats[i];
-         f->surfaceFormat.colorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR;
+         f->surfaceFormat.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
       }
    }
 
index f0f3d78..d3add51 100644 (file)
@@ -780,7 +780,7 @@ x11_surface_get_formats(VkIcdSurfaceBase *surface,
    for (unsigned i = 0; i < count; i++) {
       vk_outarray_append_typed(VkSurfaceFormatKHR, &out, f) {
          f->format = sorted_formats[i];
-         f->colorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR;
+         f->colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
       }
    }
 
@@ -806,7 +806,7 @@ x11_surface_get_formats2(VkIcdSurfaceBase *surface,
       vk_outarray_append_typed(VkSurfaceFormat2KHR, &out, f) {
          assert(f->sType == VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR);
          f->surfaceFormat.format = sorted_formats[i];
-         f->surfaceFormat.colorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR;
+         f->surfaceFormat.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
       }
    }