vulkan: use updated tokens from vk.xml

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>
This commit is contained in:
Eric Engestrom 2022-07-01 13:02:59 +01:00 committed by Marge Bot
parent c3d8395a14
commit e706a915b0
10 changed files with 32 additions and 32 deletions

View File

@ -204,8 +204,8 @@ static void print_gpu(const struct instance_info *info, unsigned index, VkPhysic
VkPhysicalDevicePCIBusInfoPropertiesEXT ext_pci_properties = (VkPhysicalDevicePCIBusInfoPropertiesEXT) { VkPhysicalDevicePCIBusInfoPropertiesEXT ext_pci_properties = (VkPhysicalDevicePCIBusInfoPropertiesEXT) {
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT
}; };
VkPhysicalDeviceProperties2KHR properties = (VkPhysicalDeviceProperties2KHR){ VkPhysicalDeviceProperties2 properties = (VkPhysicalDeviceProperties2){
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2
}; };
if (info->has_vulkan11 && info->has_pci_bus) if (info->has_vulkan11 && info->has_pci_bus)
properties.pNext = &ext_pci_properties; 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 .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT
}; };
VkPhysicalDeviceProperties2KHR properties = (VkPhysicalDeviceProperties2KHR){ VkPhysicalDeviceProperties2 properties = (VkPhysicalDeviceProperties2){
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2
}; };
if (info->has_vulkan11 && info->has_pci_bus) 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; bool group_has_cpu_device = false;
for (unsigned j = 0; j < physical_device_groups[i].physicalDeviceCount; j++) { for (unsigned j = 0; j < physical_device_groups[i].physicalDeviceCount; j++) {
VkPhysicalDevice physical_device = physical_device_groups[i].physicalDevices[j]; VkPhysicalDevice physical_device = physical_device_groups[i].physicalDevices[j];
VkPhysicalDeviceProperties2KHR properties = (VkPhysicalDeviceProperties2KHR){ VkPhysicalDeviceProperties2 properties = (VkPhysicalDeviceProperties2){
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2
}; };
info->GetPhysicalDeviceProperties(physical_device, &properties.properties); info->GetPhysicalDeviceProperties(physical_device, &properties.properties);
group_has_cpu_device = properties.properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU; group_has_cpu_device = properties.properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU;

View File

@ -2182,7 +2182,7 @@ static void overlay_CmdBindPipeline(
switch (pipelineBindPoint) { switch (pipelineBindPoint) {
case VK_PIPELINE_BIND_POINT_GRAPHICS: cmd_buffer_data->stats.stats[OVERLAY_PARAM_ENABLED_pipeline_graphics]++; break; 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_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; default: break;
} }
struct device_data *device_data = cmd_buffer_data->device; struct device_data *device_data = cmd_buffer_data->device;
@ -2455,7 +2455,7 @@ static VkResult overlay_QueueSubmit(
static VkResult overlay_QueueSubmit2KHR( static VkResult overlay_QueueSubmit2KHR(
VkQueue queue, VkQueue queue,
uint32_t submitCount, uint32_t submitCount,
const VkSubmitInfo2KHR* pSubmits, const VkSubmitInfo2* pSubmits,
VkFence fence) VkFence fence)
{ {
struct queue_data *queue_data = FIND(struct queue_data, queue); struct queue_data *queue_data = FIND(struct queue_data, queue);

View File

@ -273,9 +273,9 @@ vk_format_to_pipe_format(enum VkFormat vkformat)
return PIPE_FORMAT_Y16_U16V16_422_UNORM; return PIPE_FORMAT_Y16_U16V16_422_UNORM;
case VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM: case VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:
return PIPE_FORMAT_Y16_U16_V16_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; return PIPE_FORMAT_B4G4R4A4_UNORM;
case VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT: case VK_FORMAT_A4B4G4R4_UNORM_PACK16:
return PIPE_FORMAT_R4G4B4A4_UNORM; return PIPE_FORMAT_R4G4B4A4_UNORM;
default: default:
return PIPE_FORMAT_NONE; return PIPE_FORMAT_NONE;

View File

@ -473,11 +473,11 @@ wsi_configure_image(const struct wsi_swapchain *chain,
if (pCreateInfo->flags & VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR) { if (pCreateInfo->flags & VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR) {
info->create.flags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT | 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, 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); assume(format_list_in && format_list_in->viewFormatCount > 0);
@ -496,8 +496,8 @@ wsi_configure_image(const struct wsi_swapchain *chain,
} }
assert(format_found); assert(format_found);
info->format_list = (VkImageFormatListCreateInfoKHR) { info->format_list = (VkImageFormatListCreateInfo) {
.sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR, .sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO,
.viewFormatCount = view_format_count, .viewFormatCount = view_format_count,
.pViewFormats = view_formats, .pViewFormats = view_formats,
}; };

View File

@ -927,7 +927,7 @@ wsi_display_surface_get_surface_counters(
VkIcdSurfaceBase *surface_base, VkIcdSurfaceBase *surface_base,
VkSurfaceCounterFlagsEXT *counters) VkSurfaceCounterFlagsEXT *counters)
{ {
*counters = VK_SURFACE_COUNTER_VBLANK_EXT; *counters = VK_SURFACE_COUNTER_VBLANK_BIT_EXT;
return VK_SUCCESS; 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++) { for (unsigned i = 0; i < ARRAY_SIZE(sorted_formats); i++) {
vk_outarray_append_typed(VkSurfaceFormatKHR, &out, f) { vk_outarray_append_typed(VkSurfaceFormatKHR, &out, f) {
f->format = sorted_formats[i]; 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) { vk_outarray_append_typed(VkSurfaceFormat2KHR, &out, f) {
assert(f->sType == VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR); assert(f->sType == VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR);
f->surfaceFormat.format = sorted_formats[i]; f->surfaceFormat.format = sorted_formats[i];
f->surfaceFormat.colorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR; f->surfaceFormat.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
} }
} }

View File

@ -385,7 +385,7 @@ wsi_configure_native_image(const struct wsi_swapchain *chain,
.flags = info->create.flags, .flags = info->create.flags,
}; };
VkImageFormatListCreateInfoKHR format_list; VkImageFormatListCreateInfo format_list;
if (info->create.flags & VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT) { if (info->create.flags & VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT) {
format_list = info->format_list; format_list = info->format_list;
format_list.pNext = NULL; format_list.pNext = NULL;

View File

@ -41,7 +41,7 @@ struct wsi_image_info {
VkImageCreateInfo create; VkImageCreateInfo create;
struct wsi_image_create_info wsi; struct wsi_image_create_info wsi;
VkExternalMemoryImageCreateInfo ext_mem; VkExternalMemoryImageCreateInfo ext_mem;
VkImageFormatListCreateInfoKHR format_list; VkImageFormatListCreateInfo format_list;
VkImageDrmFormatModifierListCreateInfoEXT drm_mod_list; VkImageDrmFormatModifierListCreateInfoEXT drm_mod_list;
bool prime_use_linear_modifier; bool prime_use_linear_modifier;

View 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. */ * we probably need to make their use conditional on this extension. */
case DRM_FORMAT_ARGB4444: case DRM_FORMAT_ARGB4444:
wsi_wl_display_add_vk_format_modifier(display, formats, 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); WSI_WL_FMT_ALPHA, modifier);
break; break;
case DRM_FORMAT_XRGB4444: case DRM_FORMAT_XRGB4444:
wsi_wl_display_add_vk_format_modifier(display, formats, 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); WSI_WL_FMT_OPAQUE, modifier);
break; break;
case DRM_FORMAT_ABGR4444: case DRM_FORMAT_ABGR4444:
wsi_wl_display_add_vk_format_modifier(display, formats, 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); WSI_WL_FMT_ALPHA, modifier);
break; break;
case DRM_FORMAT_XBGR4444: case DRM_FORMAT_XBGR4444:
wsi_wl_display_add_vk_format_modifier(display, formats, 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); WSI_WL_FMT_OPAQUE, modifier);
break; break;
#endif #endif
@ -381,9 +381,9 @@ wl_drm_format_for_vk_format(VkFormat vk_format, bool alpha)
{ {
switch (vk_format) { switch (vk_format) {
#if 0 #if 0
case VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT: case VK_FORMAT_A4R4G4B4_UNORM_PACK16:
return alpha ? DRM_FORMAT_ARGB4444 : DRM_FORMAT_XRGB4444; 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; return alpha ? DRM_FORMAT_ABGR4444 : DRM_FORMAT_XBGR4444;
#endif #endif
#if MESA_LITTLE_ENDIAN #if MESA_LITTLE_ENDIAN
@ -794,7 +794,7 @@ wsi_wl_surface_get_formats(VkIcdSurfaceBase *icd_surface,
vk_outarray_append_typed(VkSurfaceFormatKHR, &out, out_fmt) { vk_outarray_append_typed(VkSurfaceFormatKHR, &out, out_fmt) {
out_fmt->format = disp_fmt->vk_format; 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) { vk_outarray_append_typed(VkSurfaceFormat2KHR, &out, out_fmt) {
out_fmt->surfaceFormat.format = disp_fmt->vk_format; 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;
} }
} }

View File

@ -228,7 +228,7 @@ wsi_win32_surface_get_formats(VkIcdSurfaceBase *icd_surface,
for (unsigned i = 0; i < ARRAY_SIZE(sorted_formats); i++) { for (unsigned i = 0; i < ARRAY_SIZE(sorted_formats); i++) {
vk_outarray_append_typed(VkSurfaceFormatKHR, &out, f) { vk_outarray_append_typed(VkSurfaceFormatKHR, &out, f) {
f->format = sorted_formats[i]; 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) { vk_outarray_append_typed(VkSurfaceFormat2KHR, &out, f) {
assert(f->sType == VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR); assert(f->sType == VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR);
f->surfaceFormat.format = sorted_formats[i]; f->surfaceFormat.format = sorted_formats[i];
f->surfaceFormat.colorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR; f->surfaceFormat.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
} }
} }

View File

@ -780,7 +780,7 @@ x11_surface_get_formats(VkIcdSurfaceBase *surface,
for (unsigned i = 0; i < count; i++) { for (unsigned i = 0; i < count; i++) {
vk_outarray_append_typed(VkSurfaceFormatKHR, &out, f) { vk_outarray_append_typed(VkSurfaceFormatKHR, &out, f) {
f->format = sorted_formats[i]; 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) { vk_outarray_append_typed(VkSurfaceFormat2KHR, &out, f) {
assert(f->sType == VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR); assert(f->sType == VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR);
f->surfaceFormat.format = sorted_formats[i]; f->surfaceFormat.format = sorted_formats[i];
f->surfaceFormat.colorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR; f->surfaceFormat.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
} }
} }