Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package vulkan-tools for openSUSE:Factory checked in at 2021-01-30 13:56:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/vulkan-tools (Old) and /work/SRC/openSUSE:Factory/.vulkan-tools.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vulkan-tools" Sat Jan 30 13:56:51 2021 rev:27 rq:867836 version:1.2.166 Changes: -------- --- /work/SRC/openSUSE:Factory/vulkan-tools/vulkan-tools.changes 2021-01-21 21:54:16.493768433 +0100 +++ /work/SRC/openSUSE:Factory/.vulkan-tools.new.28504/vulkan-tools.changes 2021-01-30 13:57:51.590406409 +0100 @@ -1,0 +2,8 @@ +Sat Jan 23 00:48:01 UTC 2021 - Dirk M??ller <dmuel...@suse.com> + +- update to 1.2.166: + * build: Update known-good files for 1.2.166 header + * vkcube: Updated to support portability extension properly + * vkcube: portabilty extension as text so it builds on all platforms + +------------------------------------------------------------------- Old: ---- v1.2.165.tar.gz New: ---- v1.2.166.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ vulkan-tools.spec ++++++ --- /var/tmp/diff_new_pack.9W0vt9/_old 2021-01-30 13:57:52.118407300 +0100 +++ /var/tmp/diff_new_pack.9W0vt9/_new 2021-01-30 13:57:52.118407300 +0100 @@ -17,7 +17,7 @@ Name: vulkan-tools -Version: 1.2.165 +Version: 1.2.166 Release: 0 Summary: Diagnostic utilities for Vulkan License: Apache-2.0 ++++++ v1.2.165.tar.gz -> v1.2.166.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Tools-1.2.165/build-android/vulkan-headers_revision_android new/Vulkan-Tools-1.2.166/build-android/vulkan-headers_revision_android --- old/Vulkan-Tools-1.2.165/build-android/vulkan-headers_revision_android 2020-12-28 22:13:43.000000000 +0100 +++ new/Vulkan-Tools-1.2.166/build-android/vulkan-headers_revision_android 2021-01-13 18:49:52.000000000 +0100 @@ -1 +1 @@ -v1.2.165 +v1.2.166 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Tools-1.2.165/cube/cube.c new/Vulkan-Tools-1.2.166/cube/cube.c --- old/Vulkan-Tools-1.2.165/cube/cube.c 2020-12-28 22:13:43.000000000 +0100 +++ new/Vulkan-Tools-1.2.166/cube/cube.c 2021-01-13 18:49:52.000000000 +0100 @@ -343,7 +343,7 @@ bool use_staging_buffer; bool separate_present_queue; bool is_minimized; - uint32_t gpu_number; + int32_t gpu_number; bool VK_KHR_incremental_present_enabled; @@ -1364,10 +1364,10 @@ .format = demo->format, .components = { - .r = VK_COMPONENT_SWIZZLE_R, - .g = VK_COMPONENT_SWIZZLE_G, - .b = VK_COMPONENT_SWIZZLE_B, - .a = VK_COMPONENT_SWIZZLE_A, + .r = VK_COMPONENT_SWIZZLE_IDENTITY, + .g = VK_COMPONENT_SWIZZLE_IDENTITY, + .b = VK_COMPONENT_SWIZZLE_IDENTITY, + .a = VK_COMPONENT_SWIZZLE_IDENTITY, }, .subresourceRange = {.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, .baseMipLevel = 0, .levelCount = 1, .baseArrayLayer = 0, .layerCount = 1}, @@ -1729,10 +1729,10 @@ .format = tex_format, .components = { - VK_COMPONENT_SWIZZLE_R, - VK_COMPONENT_SWIZZLE_G, - VK_COMPONENT_SWIZZLE_B, - VK_COMPONENT_SWIZZLE_A, + VK_COMPONENT_SWIZZLE_IDENTITY, + VK_COMPONENT_SWIZZLE_IDENTITY, + VK_COMPONENT_SWIZZLE_IDENTITY, + VK_COMPONENT_SWIZZLE_IDENTITY, }, .subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}, .flags = 0, @@ -3136,6 +3136,9 @@ demo->extension_names[demo->enabled_extension_count++] = VK_EXT_METAL_SURFACE_EXTENSION_NAME; } #endif + if (!strcmp(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, instance_extensions[i].extensionName)) { + demo->extension_names[demo->enabled_extension_count++] = VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME; + } if (!strcmp(VK_EXT_DEBUG_UTILS_EXTENSION_NAME, instance_extensions[i].extensionName)) { if (demo->validate) { demo->extension_names[demo->enabled_extension_count++] = VK_EXT_DEBUG_UTILS_EXTENSION_NAME; @@ -3245,8 +3248,6 @@ inst_info.pNext = &dbg_messenger_create_info; } - uint32_t gpu_count; - err = vkCreateInstance(&inst_info, NULL, &demo->inst); if (err == VK_ERROR_INCOMPATIBLE_DRIVER) { ERR_EXIT( @@ -3266,22 +3267,12 @@ "vkCreateInstance Failure"); } - /* Make initial call to query gpu_count, then second call for gpu info*/ + /* Make initial call to query gpu_count, then second call for gpu info */ + uint32_t gpu_count = 0; err = vkEnumeratePhysicalDevices(demo->inst, &gpu_count, NULL); assert(!err); - if (gpu_count > 0) { - VkPhysicalDevice *physical_devices = malloc(sizeof(VkPhysicalDevice) * gpu_count); - err = vkEnumeratePhysicalDevices(demo->inst, &gpu_count, physical_devices); - assert(!err); - if (demo->gpu_number > gpu_count - 1) { - fprintf(stderr, "Gpu %u specified is not present, gpu count = %u\n", demo->gpu_number, gpu_count); - fprintf(stderr, "Continuing with gpu 0\n"); - demo->gpu_number = 0; - } - demo->gpu = physical_devices[demo->gpu_number]; - free(physical_devices); - } else { + if (gpu_count <= 0) { ERR_EXIT( "vkEnumeratePhysicalDevices reported zero accessible devices.\n\n" "Do you have a compatible Vulkan installable client driver (ICD) installed?\n" @@ -3289,6 +3280,57 @@ "vkEnumeratePhysicalDevices Failure"); } + VkPhysicalDevice *physical_devices = malloc(sizeof(VkPhysicalDevice) * gpu_count); + err = vkEnumeratePhysicalDevices(demo->inst, &gpu_count, physical_devices); + assert(!err); + if (demo->gpu_number >= 0 && !((uint32_t)demo->gpu_number < gpu_count)) { + fprintf(stderr, "GPU %d specified is not present, GPU count = %u\n", demo->gpu_number, gpu_count); + ERR_EXIT("Specified GPU number is not present", "User Error"); + } + + /* Try to auto select most suitable device */ + if (demo->gpu_number == -1) { + uint32_t count_device_type[VK_PHYSICAL_DEVICE_TYPE_CPU + 1]; + memset(count_device_type, 0, sizeof(count_device_type)); + + VkPhysicalDeviceProperties physicalDeviceProperties; + for (uint32_t i = 0; i < gpu_count; i++) { + vkGetPhysicalDeviceProperties(physical_devices[i], &physicalDeviceProperties); + assert(physicalDeviceProperties.deviceType <= VK_PHYSICAL_DEVICE_TYPE_CPU); + count_device_type[physicalDeviceProperties.deviceType]++; + } + + VkPhysicalDeviceType search_for_device_type = VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU; + if (count_device_type[VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU]) { + search_for_device_type = VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU; + } else if (count_device_type[VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU]) { + search_for_device_type = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU; + } else if (count_device_type[VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU]) { + search_for_device_type = VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU; + } else if (count_device_type[VK_PHYSICAL_DEVICE_TYPE_CPU]) { + search_for_device_type = VK_PHYSICAL_DEVICE_TYPE_CPU; + } else if (count_device_type[VK_PHYSICAL_DEVICE_TYPE_OTHER]) { + search_for_device_type = VK_PHYSICAL_DEVICE_TYPE_OTHER; + } + + for (uint32_t i = 0; i < gpu_count; i++) { + vkGetPhysicalDeviceProperties(physical_devices[i], &physicalDeviceProperties); + if (physicalDeviceProperties.deviceType == search_for_device_type) { + demo->gpu_number = i; + break; + } + } + } + assert(demo->gpu_number >= 0); + demo->gpu = physical_devices[demo->gpu_number]; + { + VkPhysicalDeviceProperties physicalDeviceProperties; + vkGetPhysicalDeviceProperties(demo->gpu, &physicalDeviceProperties); + fprintf(stderr, "Selected GPU %d: %s, type: %u\n", demo->gpu_number, physicalDeviceProperties.deviceName, + physicalDeviceProperties.deviceType); + } + free(physical_devices); + /* Look for device extensions */ uint32_t device_extension_count = 0; VkBool32 swapchainExtFound = 0; @@ -3308,6 +3350,9 @@ swapchainExtFound = 1; demo->extension_names[demo->enabled_extension_count++] = VK_KHR_SWAPCHAIN_EXTENSION_NAME; } + if (!strcmp("VK_KHR_portability_subset", device_extensions[i].extensionName)) { + demo->extension_names[demo->enabled_extension_count++] = "VK_KHR_portability_subset"; + } assert(demo->enabled_extension_count < 64); } @@ -3810,8 +3855,8 @@ memset(demo, 0, sizeof(*demo)); demo->presentMode = VK_PRESENT_MODE_FIFO_KHR; demo->frameCount = INT32_MAX; - /* For cube demo we just grab the first physical device by default */ - demo->gpu_number = 0; + /* Autodetect suitable / best GPU by default */ + demo->gpu_number = -1; for (int i = 1; i < argc; i++) { if (strcmp(argv[i], "--use_staging") == 0) { @@ -3859,6 +3904,7 @@ } if ((strcmp(argv[i], "--gpu_number") == 0) && (i < argc - 1)) { demo->gpu_number = atoi(argv[i + 1]); + assert(demo->gpu_number >= 0); i++; continue; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Tools-1.2.165/cube/cube.cpp new/Vulkan-Tools-1.2.166/cube/cube.cpp --- old/Vulkan-Tools-1.2.165/cube/cube.cpp 2020-12-28 22:13:43.000000000 +0100 +++ new/Vulkan-Tools-1.2.166/cube/cube.cpp 2021-01-13 18:49:52.000000000 +0100 @@ -311,7 +311,7 @@ bool use_staging_buffer; bool use_xlib; bool separate_present_queue; - uint32_t gpu_number; + int32_t gpu_number; vk::Instance inst; vk::PhysicalDevice gpu; @@ -940,8 +940,8 @@ presentMode = vk::PresentModeKHR::eFifo; frameCount = UINT32_MAX; use_xlib = false; - /* For cube demo we just grab the first physical device by default */ - gpu_number = 0; + /* Autodetect suitable / best GPU by default */ + gpu_number = -1; for (int i = 1; i < argc; i++) { if (strcmp(argv[i], "--use_staging") == 0) { @@ -976,6 +976,7 @@ } if ((strcmp(argv[i], "--gpu_number") == 0) && (i < argc - 1)) { gpu_number = atoi(argv[i + 1]); + assert(gpu_number >= 0); i++; continue; } @@ -988,7 +989,7 @@ << "\t\tVK_PRESENT_MODE_IMMEDIATE_KHR = " << VK_PRESENT_MODE_IMMEDIATE_KHR << "\n" << "\t\tVK_PRESENT_MODE_MAILBOX_KHR = " << VK_PRESENT_MODE_MAILBOX_KHR << "\n" << "\t\tVK_PRESENT_MODE_FIFO_KHR = " << VK_PRESENT_MODE_FIFO_KHR << "\n" - << "\t\tVK_PRESENT_MODE_FIFO_RELAXED_KHR = " << VK_PRESENT_MODE_FIFO_RELAXED_KHR; + << "\t\tVK_PRESENT_MODE_FIFO_RELAXED_KHR = " << VK_PRESENT_MODE_FIFO_RELAXED_KHR << "\n"; #if defined(_WIN32) if (!suppress_popups) MessageBox(NULL, usage.str().c_str(), "Usage Error", MB_OK); @@ -1110,6 +1111,9 @@ VERIFY(result == vk::Result::eSuccess); for (uint32_t i = 0; i < instance_extension_count; i++) { + if (!strcmp(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, instance_extensions[i].extensionName)) { + extension_names[enabled_extension_count++] = VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME; + } if (!strcmp(VK_KHR_SURFACE_EXTENSION_NAME, instance_extensions[i].extensionName)) { surfaceExtFound = 1; extension_names[enabled_extension_count++] = VK_KHR_SURFACE_EXTENSION_NAME; @@ -1149,7 +1153,6 @@ platformSurfaceExtFound = 1; extension_names[enabled_extension_count++] = VK_EXT_METAL_SURFACE_EXTENSION_NAME; } - #endif assert(enabled_extension_count < 64); } @@ -1241,22 +1244,12 @@ "vkCreateInstance Failure"); } - /* Make initial call to query gpu_count, then second call for gpu info*/ - uint32_t gpu_count; + /* Make initial call to query gpu_count, then second call for gpu info */ + uint32_t gpu_count = 0; result = inst.enumeratePhysicalDevices(&gpu_count, static_cast<vk::PhysicalDevice *>(nullptr)); VERIFY(result == vk::Result::eSuccess); - if (gpu_count > 0) { - std::unique_ptr<vk::PhysicalDevice[]> physical_devices(new vk::PhysicalDevice[gpu_count]); - result = inst.enumeratePhysicalDevices(&gpu_count, physical_devices.get()); - VERIFY(result == vk::Result::eSuccess); - if (gpu_number > gpu_count - 1) { - fprintf(stderr, "Gpu %u specified is not present, gpu count = %u\n", gpu_number, gpu_count); - fprintf(stderr, "Continuing with gpu 0\n"); - gpu_number = 0; - } - gpu = physical_devices[gpu_number]; - } else { + if (gpu_count <= 0) { ERR_EXIT( "vkEnumeratePhysicalDevices reported zero accessible devices.\n\n" "Do you have a compatible Vulkan installable client driver (ICD) installed?\n" @@ -1264,6 +1257,54 @@ "vkEnumeratePhysicalDevices Failure"); } + std::unique_ptr<vk::PhysicalDevice[]> physical_devices(new vk::PhysicalDevice[gpu_count]); + result = inst.enumeratePhysicalDevices(&gpu_count, physical_devices.get()); + VERIFY(result == vk::Result::eSuccess); + + if (gpu_number >= 0 && !((uint32_t)gpu_number < gpu_count)) { + fprintf(stderr, "GPU %d specified is not present, GPU count = %u\n", gpu_number, gpu_count); + ERR_EXIT("Specified GPU number is not present", "User Error"); + } + + /* Try to auto select most suitable device */ + if (gpu_number == -1) { + uint32_t count_device_type[VK_PHYSICAL_DEVICE_TYPE_CPU + 1]; + memset(count_device_type, 0, sizeof(count_device_type)); + + for (uint32_t i = 0; i < gpu_count; i++) { + const auto physicalDeviceProperties = physical_devices[i].getProperties(); + assert(static_cast<int>(physicalDeviceProperties.deviceType) <= VK_PHYSICAL_DEVICE_TYPE_CPU); + count_device_type[static_cast<int>(physicalDeviceProperties.deviceType)]++; + } + + const vk::PhysicalDeviceType device_type_preference[] = { + vk::PhysicalDeviceType::eDiscreteGpu, vk::PhysicalDeviceType::eIntegratedGpu, vk::PhysicalDeviceType::eVirtualGpu, + vk::PhysicalDeviceType::eCpu, vk::PhysicalDeviceType::eOther}; + vk::PhysicalDeviceType search_for_device_type = vk::PhysicalDeviceType::eDiscreteGpu; + for (uint32_t i = 0; i < sizeof(device_type_preference) / sizeof(vk::PhysicalDeviceType); i++) { + if (count_device_type[static_cast<int>(device_type_preference[i])]) { + search_for_device_type = device_type_preference[i]; + break; + } + } + + for (uint32_t i = 0; i < gpu_count; i++) { + const auto physicalDeviceProperties = physical_devices[i].getProperties(); + if (physicalDeviceProperties.deviceType == search_for_device_type) { + gpu_number = i; + break; + } + } + } + assert(gpu_number >= 0); + gpu = physical_devices[gpu_number]; + { + auto physicalDeviceProperties = gpu.getProperties(); + fprintf(stderr, "Selected GPU %d: %s, type: %s\n", gpu_number, physicalDeviceProperties.deviceName.data(), + to_string(physicalDeviceProperties.deviceType).c_str()); + } + physical_devices.reset(); + /* Look for device extensions */ uint32_t device_extension_count = 0; vk::Bool32 swapchainExtFound = VK_FALSE; @@ -1284,6 +1325,9 @@ swapchainExtFound = 1; extension_names[enabled_extension_count++] = VK_KHR_SWAPCHAIN_EXTENSION_NAME; } + if (!strcmp("VK_KHR_portability_subset", device_extensions[i].extensionName)) { + extension_names[enabled_extension_count++] = "VK_KHR_portability_subset"; + } assert(enabled_extension_count < 64); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Tools-1.2.165/scripts/known_good.json new/Vulkan-Tools-1.2.166/scripts/known_good.json --- old/Vulkan-Tools-1.2.165/scripts/known_good.json 2020-12-28 22:13:43.000000000 +0100 +++ new/Vulkan-Tools-1.2.166/scripts/known_good.json 2021-01-13 18:49:52.000000000 +0100 @@ -6,7 +6,7 @@ "sub_dir" : "Vulkan-Headers", "build_dir" : "Vulkan-Headers/build", "install_dir" : "Vulkan-Headers/build/install", - "commit" : "v1.2.165" + "commit" : "v1.2.166" }, { "name" : "MoltenVK", @@ -30,7 +30,7 @@ "sub_dir" : "Vulkan-Loader", "build_dir" : "Vulkan-Loader/build", "install_dir" : "Vulkan-Loader/build/install", - "commit" : "v1.2.165", + "commit" : "v1.2.166", "deps" : [ { "var_name" : "VULKAN_HEADERS_INSTALL_DIR", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Tools-1.2.165/vulkaninfo/vulkaninfo.md new/Vulkan-Tools-1.2.166/vulkaninfo/vulkaninfo.md --- old/Vulkan-Tools-1.2.165/vulkaninfo/vulkaninfo.md 2020-12-28 22:13:43.000000000 +0100 +++ new/Vulkan-Tools-1.2.166/vulkaninfo/vulkaninfo.md 2021-01-13 18:49:52.000000000 +0100 @@ -83,3 +83,15 @@ Note: In order to review and/or save the output produced when using Visual Studio execute `vulkaninfo` with the JSON option, you will have to redirect output to a file by modifying the command line arguments in the debug options. Note: The Vulkan Info binary found in the Vulkan SDK is renamed to `vulkaninfoSDK.exe`. This was done to demark any Vulkan Info version installed by the Vulkan Runtime Package, which is from an IHV distribution. When using command line on Windows, the Vulkan info version used will be from the IHV distribution, not the SDK. To run the SDK version, either use the start menu shortcuts or navigate to the `VulkanSDK/Bin` directory and run `vulkaninfoSDK.exe` directly. + +### iOS Devices + +Vulkan Info is now avaialble for iOS devices, but must be built manually. + +The Vulkan Info project contains a folder at [vulkaninfo/ios](https://github.com/KhronosGroup/Vulkan-Tools/tree/master/vulkaninfo/iOS) that contains an XCode project that will build Vulkan Info for iOS devices. In order to deploy to an iOS device, the developer must be a member of the [Apple Developer Program](https://developer.apple.com/programs/). In addition, Vulkan Info makes use of the [MoltenVK](https://github.com/KhronosGroup/MoltenVK) libraries, which is a seperate project from Vulkan-Tools and you will need to add the MoltenVK libraries to your XCode project manually. See the [LunarG Getting Started with the macOS SDK](https://vulkan.lunarg.com/doc/sdk/latest/mac/getting_started.html) guide for more information about using MoltenVK in the Vulkan SDK. + +When Vulkan Info is run on an iOS device, it will create the standard vulkaninfo.json file and also a portability.json file. An HTML file is also created, and is displayed in a webview on the iOS device when the application is run. These files are located on the iOS device, and are available via the [iOS application file sharing mechanism](https://support.apple.com/en-us/HT201301) via iTunes for Windows or macOS. You can also access these files using the macOS Finder or Windows Explorer when the device is attached to the host computer via a USB cable. Select the device, and navigate to the "vulkaninfo" folder to access these files. There is currently no supported means to access these files on an iOS device from a Linux host computer. + + + +