diff -Nru vulkan-tools-1.2.135.0+dfsg1/build-gn/generate_vulkan_layers_json.py vulkan-tools-1.2.141.0+dfsg1/build-gn/generate_vulkan_layers_json.py --- vulkan-tools-1.2.135.0+dfsg1/build-gn/generate_vulkan_layers_json.py 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/build-gn/generate_vulkan_layers_json.py 2020-06-03 22:48:23.000000000 +0000 @@ -100,6 +100,8 @@ if platform.system() == 'Windows': relative_path_prefix = r'..\\' # json-escaped, hence two backslashes. file_type_suffix = '.dll' + elif platform.system() == 'Darwin': + file_type_suffix = '.dylib' # For each *.json.in template files in source dir generate actual json file # in target dir diff -Nru vulkan-tools-1.2.135.0+dfsg1/.clang-format vulkan-tools-1.2.141.0+dfsg1/.clang-format --- vulkan-tools-1.2.135.0+dfsg1/.clang-format 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/.clang-format 2020-06-03 22:48:23.000000000 +0000 @@ -2,6 +2,7 @@ # Use defaults from the Google style with the following exceptions: BasedOnStyle: Google IndentWidth: 4 +AccessModifierOffset: -2 ColumnLimit: 132 SortIncludes: false ... diff -Nru vulkan-tools-1.2.135.0+dfsg1/cube/CMakeLists.txt vulkan-tools-1.2.141.0+dfsg1/cube/CMakeLists.txt --- vulkan-tools-1.2.135.0+dfsg1/cube/CMakeLists.txt 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/cube/CMakeLists.txt 2020-06-03 22:48:23.000000000 +0000 @@ -135,8 +135,6 @@ "${${configuration}}") endif() endforeach() - - file(COPY cube.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/cube) endif() add_custom_command(COMMENT "Compiling cube vertex shader" diff -Nru vulkan-tools-1.2.135.0+dfsg1/cube/cube.c vulkan-tools-1.2.141.0+dfsg1/cube/cube.c --- vulkan-tools-1.2.135.0+dfsg1/cube/cube.c 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/cube/cube.c 2020-06-03 22:48:23.000000000 +0000 @@ -1974,6 +1974,8 @@ } static void demo_prepare_pipeline(struct demo *demo) { +#define NUM_DYNAMIC_STATES 2 /*Viewport + Scissor*/ + VkGraphicsPipelineCreateInfo pipeline; VkPipelineCacheCreateInfo pipelineCache; VkPipelineVertexInputStateCreateInfo vi; @@ -1983,7 +1985,7 @@ VkPipelineDepthStencilStateCreateInfo ds; VkPipelineViewportStateCreateInfo vp; VkPipelineMultisampleStateCreateInfo ms; - VkDynamicState dynamicStateEnables[VK_DYNAMIC_STATE_RANGE_SIZE]; + VkDynamicState dynamicStateEnables[NUM_DYNAMIC_STATES]; VkPipelineDynamicStateCreateInfo dynamicState; VkResult U_ASSERT_ONLY err; @@ -3412,6 +3414,24 @@ assert(!err); } +static VkSurfaceFormatKHR pick_surface_format(const VkSurfaceFormatKHR *surfaceFormats, uint32_t count) { + // Prefer non-SRGB formats... + for (uint32_t i = 0; i < count; i++) { + const VkFormat format = surfaceFormats[i].format; + + if (format == VK_FORMAT_R8G8B8A8_UNORM || format == VK_FORMAT_B8G8R8A8_UNORM || + format == VK_FORMAT_A2B10G10R10_UNORM_PACK32 || format == VK_FORMAT_A2R10G10B10_UNORM_PACK32 || + format == VK_FORMAT_R16G16B16A16_SFLOAT) { + return surfaceFormats[i]; + } + } + + printf("Can't find our preferred formats... Falling back to first exposed format. Rendering may be incorrect.\n"); + + assert(count >= 1); + return surfaceFormats[0]; +} + static void demo_init_vk_swapchain(struct demo *demo) { VkResult U_ASSERT_ONLY err; @@ -3489,16 +3509,9 @@ VkSurfaceFormatKHR *surfFormats = (VkSurfaceFormatKHR *)malloc(formatCount * sizeof(VkSurfaceFormatKHR)); err = demo->fpGetPhysicalDeviceSurfaceFormatsKHR(demo->gpu, demo->surface, &formatCount, surfFormats); assert(!err); - // If the format list includes just one entry of VK_FORMAT_UNDEFINED, - // the surface has no preferred format. Otherwise, at least one - // supported format will be returned. - if (formatCount == 1 && surfFormats[0].format == VK_FORMAT_UNDEFINED) { - demo->format = VK_FORMAT_B8G8R8A8_UNORM; - } else { - assert(formatCount >= 1); - demo->format = surfFormats[0].format; - } - demo->color_space = surfFormats[0].colorSpace; + VkSurfaceFormatKHR surfaceFormat = pick_surface_format(surfFormats, formatCount); + demo->format = surfaceFormat.format; + demo->color_space = surfaceFormat.colorSpace; free(surfFormats); demo->quit = false; diff -Nru vulkan-tools-1.2.135.0+dfsg1/cube/cube.cpp vulkan-tools-1.2.141.0+dfsg1/cube/cube.cpp --- vulkan-tools-1.2.135.0+dfsg1/cube/cube.cpp 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/cube/cube.cpp 2020-06-03 22:48:23.000000000 +0000 @@ -34,7 +34,6 @@ #include #include -#define VULKAN_HPP_NO_SMART_HANDLE #define VULKAN_HPP_NO_EXCEPTIONS #define VULKAN_HPP_TYPESAFE_CONVERSION #include @@ -645,7 +644,7 @@ for (uint32_t i = 0; i < swapchainImageCount; i++) { device.destroyImageView(swapchain_image_resources[i].view, nullptr); - device.freeCommandBuffers(cmd_pool, 1, &swapchain_image_resources[i].cmd); + device.freeCommandBuffers(cmd_pool, {swapchain_image_resources[i].cmd}); device.destroyBuffer(swapchain_image_resources[i].uniform_buffer, nullptr); device.unmapMemory(swapchain_image_resources[i].uniform_memory); device.freeMemory(swapchain_image_resources[i].uniform_memory, nullptr); @@ -720,7 +719,7 @@ void Demo::draw() { // Ensure no more than FRAME_LAG renderings are outstanding device.waitForFences(1, &fences[frame_index], VK_TRUE, UINT64_MAX); - device.resetFences(1, &fences[frame_index]); + device.resetFences({fences[frame_index]}); vk::Result result; do { @@ -2272,7 +2271,7 @@ for (i = 0; i < swapchainImageCount; i++) { device.destroyImageView(swapchain_image_resources[i].view, nullptr); - device.freeCommandBuffers(cmd_pool, 1, &swapchain_image_resources[i].cmd); + device.freeCommandBuffers(cmd_pool, {swapchain_image_resources[i].cmd}); device.destroyBuffer(swapchain_image_resources[i].uniform_buffer, nullptr); device.unmapMemory(swapchain_image_resources[i].uniform_memory); device.freeMemory(swapchain_image_resources[i].uniform_memory, nullptr); diff -Nru vulkan-tools-1.2.135.0+dfsg1/cube/cube.vcxproj.user vulkan-tools-1.2.141.0+dfsg1/cube/cube.vcxproj.user --- vulkan-tools-1.2.135.0+dfsg1/cube/cube.vcxproj.user 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/cube/cube.vcxproj.user 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ - - - - VK_LAYER_PATH=..\layers\Debug - WindowsLocalDebugger - - - VK_LAYER_PATH=..\layers\Release - WindowsLocalDebugger - - diff -Nru vulkan-tools-1.2.135.0+dfsg1/cube/object_type_string_helper.h vulkan-tools-1.2.141.0+dfsg1/cube/object_type_string_helper.h --- vulkan-tools-1.2.135.0+dfsg1/cube/object_type_string_helper.h 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/cube/object_type_string_helper.h 2020-06-03 22:48:23.000000000 +0000 @@ -20,18 +20,15 @@ * ****************************************************************************/ - #pragma once #ifdef _WIN32 -#pragma warning( disable : 4065 ) +#pragma warning(disable : 4065) #endif #include -static inline const char* string_VkObjectType(VkObjectType input_value) -{ - switch ((VkObjectType)input_value) - { +static inline const char* string_VkObjectType(VkObjectType input_value) { + switch ((VkObjectType)input_value) { case VK_OBJECT_TYPE_QUERY_POOL: return "VK_OBJECT_TYPE_QUERY_POOL"; case VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION: diff -Nru vulkan-tools-1.2.135.0+dfsg1/debian/changelog vulkan-tools-1.2.141.0+dfsg1/debian/changelog --- vulkan-tools-1.2.135.0+dfsg1/debian/changelog 2020-04-09 04:54:05.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/debian/changelog 2020-06-23 07:40:54.000000000 +0000 @@ -1,3 +1,10 @@ +vulkan-tools (1.2.141.0+dfsg1-1) unstable; urgency=medium + + * New upstream release. (Closes: #963297) + * control: Bump libvulkan-dev build-dep. + + -- Timo Aaltonen Tue, 23 Jun 2020 10:40:54 +0300 + vulkan-tools (1.2.135.0+dfsg1-1) unstable; urgency=medium * New upstream release. (LP: #1871754) diff -Nru vulkan-tools-1.2.135.0+dfsg1/debian/control vulkan-tools-1.2.141.0+dfsg1/debian/control --- vulkan-tools-1.2.135.0+dfsg1/debian/control 2020-04-09 04:48:38.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/debian/control 2020-06-23 07:38:37.000000000 +0000 @@ -4,7 +4,7 @@ Build-Depends: debhelper-compat (= 12), cmake, glslang-tools, - libvulkan-dev (>= 1.2.135.0), + libvulkan-dev (>= 1.2.141.0), libwayland-dev, libx11-dev, libxcb1-dev, diff -Nru vulkan-tools-1.2.135.0+dfsg1/.gitattributes vulkan-tools-1.2.141.0+dfsg1/.gitattributes --- vulkan-tools-1.2.135.0+dfsg1/.gitattributes 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/.gitattributes 2020-06-03 22:48:23.000000000 +0000 @@ -14,3 +14,7 @@ # Text files to always have LF (unix) line endings on checkout. *.sh text eol=lf +# Generated source files will always have LF (unix) line endings on checkout. +icd/generated/*.cpp text eol=lf +icd/generated/*.h text eol=lf +vulkaninfo/generated/*.hpp text eol=lf diff -Nru vulkan-tools-1.2.135.0+dfsg1/icd/generated/mock_icd.cpp vulkan-tools-1.2.141.0+dfsg1/icd/generated/mock_icd.cpp --- vulkan-tools-1.2.135.0+dfsg1/icd/generated/mock_icd.cpp 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/icd/generated/mock_icd.cpp 2020-06-03 22:48:23.000000000 +0000 @@ -21,6 +21,8 @@ #include "mock_icd.h" #include +#include +#include #include #include "vk_typemap_helper.h" namespace vkmock { @@ -28,12 +30,21 @@ using std::unordered_map; +static constexpr uint32_t icd_physical_device_count = 1; +static unordered_map> physical_device_map; + // Map device memory handle to any mapped allocations that we'll need to free on unmap static unordered_map> mapped_memory_map; -static VkPhysicalDevice physical_device = nullptr; +// Map device memory allocation handle to the size +static unordered_map allocated_memory_size_map; + static unordered_map>> queue_map; static unordered_map> buffer_map; +static unordered_map> image_memory_size_map; + +static constexpr uint32_t icd_swapchain_image_count = 1; +static unordered_map swapchain_image_map; // TODO: Would like to codegen this but limits aren't in XML static VkPhysicalDeviceLimits SetLimits(VkPhysicalDeviceLimits *limits) { @@ -177,6 +188,8 @@ return VK_ERROR_INCOMPATIBLE_DRIVER; } *pInstance = (VkInstance)CreateDispObjHandle(); + for (auto& physical_device : physical_device_map[*pInstance]) + physical_device = (VkPhysicalDevice)CreateDispObjHandle(); // TODO: If emulating specific device caps, will need to add intelligence here return VK_SUCCESS; } @@ -186,10 +199,12 @@ const VkAllocationCallbacks* pAllocator) { - // Destroy physical device - DestroyDispObjHandle((void*)physical_device); - - DestroyDispObjHandle((void*)instance); + if (instance) { + for (const auto physical_device : physical_device_map.at(instance)) + DestroyDispObjHandle((void*)physical_device); + physical_device_map.erase(instance); + DestroyDispObjHandle((void*)instance); + } } static VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices( @@ -197,15 +212,16 @@ uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices) { + VkResult result_code = VK_SUCCESS; if (pPhysicalDevices) { - if (!physical_device) { - physical_device = (VkPhysicalDevice)CreateDispObjHandle(); - } - *pPhysicalDevices = physical_device; + const auto return_count = (std::min)(*pPhysicalDeviceCount, icd_physical_device_count); + for (uint32_t i = 0; i < return_count; ++i) pPhysicalDevices[i] = physical_device_map.at(instance)[i]; + if (return_count < icd_physical_device_count) result_code = VK_INCOMPLETE; + *pPhysicalDeviceCount = return_count; } else { - *pPhysicalDeviceCount = 1; + *pPhysicalDeviceCount = icd_physical_device_count; } - return VK_SUCCESS; + return result_code; } static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures( @@ -357,6 +373,8 @@ } } queue_map.clear(); + buffer_map.erase(device); + image_memory_size_map.erase(device); // Now destroy device DestroyDispObjHandle((void*)device); // TODO: If emulating specific device caps, will need to add intelligence here @@ -488,6 +506,7 @@ VkDeviceMemory* pMemory) { unique_lock_t lock(global_lock); + allocated_memory_size_map[(VkDeviceMemory)global_unique_handle] = pAllocateInfo->allocationSize; *pMemory = (VkDeviceMemory)global_unique_handle++; return VK_SUCCESS; } @@ -498,6 +517,7 @@ const VkAllocationCallbacks* pAllocator) { //Destroy object + allocated_memory_size_map.erase(memory); } static VKAPI_ATTR VkResult VKAPI_CALL MapMemory( @@ -509,9 +529,12 @@ void** ppData) { unique_lock_t lock(global_lock); - // TODO: Just hard-coding 64k whole size for now - if (VK_WHOLE_SIZE == size) - size = 0x10000; + if (VK_WHOLE_SIZE == size) { + if (allocated_memory_size_map.count(memory) != 0) + size = allocated_memory_size_map[memory] - offset; + else + size = 0x10000; + } void* map_addr = malloc((size_t)size); mapped_memory_map[memory].push_back(map_addr); *ppData = map_addr; @@ -599,10 +622,16 @@ VkImage image, VkMemoryRequirements* pMemoryRequirements) { - // TODO: Just hard-coding reqs for now - pMemoryRequirements->size = 4096; + pMemoryRequirements->size = 0; pMemoryRequirements->alignment = 1; + auto d_iter = image_memory_size_map.find(device); + if(d_iter != image_memory_size_map.end()){ + auto iter = d_iter->second.find(image); + if (iter != d_iter->second.end()) { + pMemoryRequirements->size = iter->second; + } + } // Here we hard-code that the memory type at index 3 doesn't support this image. pMemoryRequirements->memoryTypeBits = 0xFFFF & ~(0x1 << 3); } @@ -829,6 +858,38 @@ { unique_lock_t lock(global_lock); *pImage = (VkImage)global_unique_handle++; + // TODO: A pixel size is 32 bytes. This accounts for the largest possible pixel size of any format. It could be changed to more accurate size if need be. + image_memory_size_map[device][*pImage] = pCreateInfo->extent.width * pCreateInfo->extent.height * pCreateInfo->extent.depth * + 32 * pCreateInfo->arrayLayers * (pCreateInfo->mipLevels > 1 ? 2 : 1); + // plane count + switch (pCreateInfo->format) { + case VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM: + case VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM: + case VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM: + case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16: + case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16: + case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16: + case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16: + case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16: + case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16: + case VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM: + case VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM: + case VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM: + image_memory_size_map[device][*pImage] *= 3; + break; + case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM: + case VK_FORMAT_G8_B8R8_2PLANE_422_UNORM: + case VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16: + case VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16: + case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16: + case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16: + case VK_FORMAT_G16_B16R16_2PLANE_420_UNORM: + case VK_FORMAT_G16_B16R16_2PLANE_422_UNORM: + image_memory_size_map[device][*pImage] *= 2; + break; + default: + break; + } return VK_SUCCESS; } @@ -837,7 +898,8 @@ VkImage image, const VkAllocationCallbacks* pAllocator) { -//Destroy object + unique_lock_t lock(global_lock); + image_memory_size_map[device].erase(image); } static VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout( @@ -846,7 +908,7 @@ const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout) { - // Need safe values. Callers are computing memory offsets from pLayout, with no return code to flag failure. + // Need safe values. Callers are computing memory offsets from pLayout, with no return code to flag failure. *pLayout = VkSubresourceLayout(); // Default constructor zero values. } @@ -2122,6 +2184,9 @@ { unique_lock_t lock(global_lock); *pSwapchain = (VkSwapchainKHR)global_unique_handle++; + for(uint32_t i = 0; i < icd_swapchain_image_count; ++i){ + swapchain_image_map[*pSwapchain][i] = (VkImage)global_unique_handle++; + } return VK_SUCCESS; } @@ -2130,7 +2195,8 @@ VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator) { -//Destroy object + unique_lock_t lock(global_lock); + swapchain_image_map.clear(); } static VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR( @@ -2140,12 +2206,15 @@ VkImage* pSwapchainImages) { if (!pSwapchainImages) { - *pSwapchainImageCount = 1; - } else if (*pSwapchainImageCount > 0) { - pSwapchainImages[0] = (VkImage)global_unique_handle++; - if (*pSwapchainImageCount != 1) { - return VK_INCOMPLETE; + *pSwapchainImageCount = icd_swapchain_image_count; + } else { + unique_lock_t lock(global_lock); + for (uint32_t img_i = 0; img_i < (std::min)(*pSwapchainImageCount, icd_swapchain_image_count); ++img_i){ + pSwapchainImages[img_i] = swapchain_image_map.at(swapchain)[img_i]; } + + if (*pSwapchainImageCount < icd_swapchain_image_count) return VK_INCOMPLETE; + else if (*pSwapchainImageCount > icd_swapchain_image_count) *pSwapchainImageCount = icd_swapchain_image_count; } return VK_SUCCESS; } @@ -2158,7 +2227,7 @@ VkFence fence, uint32_t* pImageIndex) { -//Not a CREATE or DESTROY function + *pImageIndex = 0; return VK_SUCCESS; } @@ -2202,7 +2271,7 @@ const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex) { -//Not a CREATE or DESTROY function + *pImageIndex = 0; return VK_SUCCESS; } @@ -3327,6 +3396,15 @@ return VK_SUCCESS; } +static VKAPI_ATTR VkResult VKAPI_CALL GetImageViewAddressNVX( + VkDevice device, + VkImageView imageView, + VkImageViewAddressPropertiesNVX* pProperties) +{ +//Not a CREATE or DESTROY function + return VK_SUCCESS; +} + static VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCountAMD( VkCommandBuffer commandBuffer, @@ -4015,6 +4093,7 @@ + static VKAPI_ATTR VkResult VKAPI_CALL GetMemoryHostPointerPropertiesEXT( VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, @@ -4418,6 +4497,50 @@ + + +static VKAPI_ATTR VkResult VKAPI_CALL CreatePrivateDataSlotEXT( + VkDevice device, + const VkPrivateDataSlotCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkPrivateDataSlotEXT* pPrivateDataSlot) +{ + unique_lock_t lock(global_lock); + *pPrivateDataSlot = (VkPrivateDataSlotEXT)global_unique_handle++; + return VK_SUCCESS; +} + +static VKAPI_ATTR void VKAPI_CALL DestroyPrivateDataSlotEXT( + VkDevice device, + VkPrivateDataSlotEXT privateDataSlot, + const VkAllocationCallbacks* pAllocator) +{ +//Destroy object +} + +static VKAPI_ATTR VkResult VKAPI_CALL SetPrivateDataEXT( + VkDevice device, + VkObjectType objectType, + uint64_t objectHandle, + VkPrivateDataSlotEXT privateDataSlot, + uint64_t data) +{ +//Not a CREATE or DESTROY function + return VK_SUCCESS; +} + +static VKAPI_ATTR void VKAPI_CALL GetPrivateDataEXT( + VkDevice device, + VkObjectType objectType, + uint64_t objectHandle, + VkPrivateDataSlotEXT privateDataSlot, + uint64_t* pData) +{ +//Not a CREATE or DESTROY function +} + + + #ifdef VK_ENABLE_BETA_EXTENSIONS diff -Nru vulkan-tools-1.2.135.0+dfsg1/icd/generated/mock_icd.h vulkan-tools-1.2.141.0+dfsg1/icd/generated/mock_icd.h --- vulkan-tools-1.2.135.0+dfsg1/icd/generated/mock_icd.h 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/icd/generated/mock_icd.h 2020-06-03 22:48:23.000000000 +0000 @@ -75,7 +75,7 @@ {"VK_KHR_get_display_properties2", 1}, {"VK_MVK_ios_surface", 2}, {"VK_MVK_macos_surface", 2}, - {"VK_EXT_debug_utils", 1}, + {"VK_EXT_debug_utils", 2}, {"VK_FUCHSIA_imagepipe_surface", 1}, {"VK_EXT_metal_surface", 1}, {"VK_KHR_surface_protected_capabilities", 1}, @@ -97,7 +97,7 @@ {"VK_AMD_gcn_shader", 1}, {"VK_NV_dedicated_allocation", 1}, {"VK_EXT_transform_feedback", 1}, - {"VK_NVX_image_view_handle", 1}, + {"VK_NVX_image_view_handle", 2}, {"VK_AMD_draw_indirect_count", 2}, {"VK_AMD_negative_viewport_height", 1}, {"VK_AMD_gpu_shader_half_float", 2}, @@ -185,6 +185,7 @@ {"VK_KHR_maintenance3", 1}, {"VK_KHR_draw_indirect_count", 1}, {"VK_EXT_filter_cubic", 3}, + {"VK_QCOM_render_pass_shader_resolve", 4}, {"VK_EXT_global_priority", 2}, {"VK_KHR_shader_subgroup_extended_types", 1}, {"VK_KHR_8bit_storage", 1}, @@ -247,11 +248,15 @@ {"VK_NV_device_generated_commands", 3}, {"VK_EXT_texel_buffer_alignment", 1}, {"VK_QCOM_render_pass_transform", 1}, + {"VK_EXT_robustness2", 1}, + {"VK_EXT_custom_border_color", 12}, {"VK_GOOGLE_user_type", 1}, {"VK_KHR_pipeline_library", 1}, {"VK_KHR_shader_non_semantic_info", 1}, - {"VK_EXT_pipeline_creation_cache_control", 2}, + {"VK_EXT_private_data", 1}, + {"VK_EXT_pipeline_creation_cache_control", 3}, {"VK_NV_device_diagnostics_config", 1}, + {"VK_QCOM_render_pass_store_ops", 2}, }; @@ -2006,6 +2011,11 @@ VkDevice device, const VkImageViewHandleInfoNVX* pInfo); +static VKAPI_ATTR VkResult VKAPI_CALL GetImageViewAddressNVX( + VkDevice device, + VkImageView imageView, + VkImageViewAddressPropertiesNVX* pProperties); + static VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCountAMD( VkCommandBuffer commandBuffer, @@ -2461,6 +2471,7 @@ + static VKAPI_ATTR VkResult VKAPI_CALL GetMemoryHostPointerPropertiesEXT( VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, @@ -2721,6 +2732,35 @@ + +static VKAPI_ATTR VkResult VKAPI_CALL CreatePrivateDataSlotEXT( + VkDevice device, + const VkPrivateDataSlotCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkPrivateDataSlotEXT* pPrivateDataSlot); + +static VKAPI_ATTR void VKAPI_CALL DestroyPrivateDataSlotEXT( + VkDevice device, + VkPrivateDataSlotEXT privateDataSlot, + const VkAllocationCallbacks* pAllocator); + +static VKAPI_ATTR VkResult VKAPI_CALL SetPrivateDataEXT( + VkDevice device, + VkObjectType objectType, + uint64_t objectHandle, + VkPrivateDataSlotEXT privateDataSlot, + uint64_t data); + +static VKAPI_ATTR void VKAPI_CALL GetPrivateDataEXT( + VkDevice device, + VkObjectType objectType, + uint64_t objectHandle, + VkPrivateDataSlotEXT privateDataSlot, + uint64_t* pData); + + + + #ifdef VK_ENABLE_BETA_EXTENSIONS static VKAPI_ATTR VkResult VKAPI_CALL CreateAccelerationStructureKHR( @@ -3167,6 +3207,7 @@ {"vkCmdEndQueryIndexedEXT", (void*)CmdEndQueryIndexedEXT}, {"vkCmdDrawIndirectByteCountEXT", (void*)CmdDrawIndirectByteCountEXT}, {"vkGetImageViewHandleNVX", (void*)GetImageViewHandleNVX}, + {"vkGetImageViewAddressNVX", (void*)GetImageViewAddressNVX}, {"vkCmdDrawIndirectCountAMD", (void*)CmdDrawIndirectCountAMD}, {"vkCmdDrawIndexedIndirectCountAMD", (void*)CmdDrawIndexedIndirectCountAMD}, {"vkGetShaderInfoAMD", (void*)GetShaderInfoAMD}, @@ -3299,6 +3340,10 @@ {"vkCmdBindPipelineShaderGroupNV", (void*)CmdBindPipelineShaderGroupNV}, {"vkCreateIndirectCommandsLayoutNV", (void*)CreateIndirectCommandsLayoutNV}, {"vkDestroyIndirectCommandsLayoutNV", (void*)DestroyIndirectCommandsLayoutNV}, + {"vkCreatePrivateDataSlotEXT", (void*)CreatePrivateDataSlotEXT}, + {"vkDestroyPrivateDataSlotEXT", (void*)DestroyPrivateDataSlotEXT}, + {"vkSetPrivateDataEXT", (void*)SetPrivateDataEXT}, + {"vkGetPrivateDataEXT", (void*)GetPrivateDataEXT}, #ifdef VK_ENABLE_BETA_EXTENSIONS {"vkCreateAccelerationStructureKHR", (void*)CreateAccelerationStructureKHR}, #endif diff -Nru vulkan-tools-1.2.135.0+dfsg1/icd/generated/vk_typemap_helper.h vulkan-tools-1.2.141.0+dfsg1/icd/generated/vk_typemap_helper.h --- vulkan-tools-1.2.135.0+dfsg1/icd/generated/vk_typemap_helper.h 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/icd/generated/vk_typemap_helper.h 2020-06-03 22:48:23.000000000 +0000 @@ -2210,6 +2210,15 @@ typedef VkImageViewHandleInfoNVX Type; }; +// Map type VkImageViewAddressPropertiesNVX to id VK_STRUCTURE_TYPE_IMAGE_VIEW_ADDRESS_PROPERTIES_NVX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IMAGE_VIEW_ADDRESS_PROPERTIES_NVX; +}; + +template <> struct LvlSTypeMap { + typedef VkImageViewAddressPropertiesNVX Type; +}; + // Map type VkTextureLODGatherFormatPropertiesAMD to id VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD template <> struct LvlTypeMap { static const VkStructureType kSType = VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD; @@ -2530,24 +2539,6 @@ }; #endif // VK_USE_PLATFORM_MACOS_MVK -// Map type VkDebugUtilsObjectNameInfoEXT to id VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT -template <> struct LvlTypeMap { - static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT; -}; - -template <> struct LvlSTypeMap { - typedef VkDebugUtilsObjectNameInfoEXT Type; -}; - -// Map type VkDebugUtilsObjectTagInfoEXT to id VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT -template <> struct LvlTypeMap { - static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT; -}; - -template <> struct LvlSTypeMap { - typedef VkDebugUtilsObjectTagInfoEXT Type; -}; - // Map type VkDebugUtilsLabelEXT to id VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT template <> struct LvlTypeMap { static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT; @@ -2557,6 +2548,15 @@ typedef VkDebugUtilsLabelEXT Type; }; +// Map type VkDebugUtilsObjectNameInfoEXT to id VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkDebugUtilsObjectNameInfoEXT Type; +}; + // Map type VkDebugUtilsMessengerCallbackDataEXT to id VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT template <> struct LvlTypeMap { static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT; @@ -2566,6 +2566,15 @@ typedef VkDebugUtilsMessengerCallbackDataEXT Type; }; +// Map type VkDebugUtilsObjectTagInfoEXT to id VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkDebugUtilsObjectTagInfoEXT Type; +}; + // Map type VkDebugUtilsMessengerCreateInfoEXT to id VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT template <> struct LvlTypeMap { static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT; @@ -3237,12 +3246,12 @@ typedef VkInitializePerformanceApiInfoINTEL Type; }; -// Map type VkQueryPoolPerformanceQueryCreateInfoINTEL to id VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL +// Map type VkQueryPoolPerformanceQueryCreateInfoINTEL to id VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL template <> struct LvlTypeMap { - static const VkStructureType kSType = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL; + static const VkStructureType kSType = VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL; }; -template <> struct LvlSTypeMap { +template <> struct LvlSTypeMap { typedef VkQueryPoolPerformanceQueryCreateInfoINTEL Type; }; @@ -3742,6 +3751,78 @@ typedef VkCommandBufferInheritanceRenderPassTransformInfoQCOM Type; }; +// Map type VkPhysicalDeviceRobustness2FeaturesEXT to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceRobustness2FeaturesEXT Type; +}; + +// Map type VkPhysicalDeviceRobustness2PropertiesEXT to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceRobustness2PropertiesEXT Type; +}; + +// Map type VkSamplerCustomBorderColorCreateInfoEXT to id VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkSamplerCustomBorderColorCreateInfoEXT Type; +}; + +// Map type VkPhysicalDeviceCustomBorderColorPropertiesEXT to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceCustomBorderColorPropertiesEXT Type; +}; + +// Map type VkPhysicalDeviceCustomBorderColorFeaturesEXT to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceCustomBorderColorFeaturesEXT Type; +}; + +// Map type VkPhysicalDevicePrivateDataFeaturesEXT to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDevicePrivateDataFeaturesEXT Type; +}; + +// Map type VkDevicePrivateDataCreateInfoEXT to id VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkDevicePrivateDataCreateInfoEXT Type; +}; + +// Map type VkPrivateDataSlotCreateInfoEXT to id VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkPrivateDataSlotCreateInfoEXT Type; +}; + // Map type VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT template <> struct LvlTypeMap { static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT; diff -Nru vulkan-tools-1.2.135.0+dfsg1/README.md vulkan-tools-1.2.141.0+dfsg1/README.md --- vulkan-tools-1.2.135.0+dfsg1/README.md 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/README.md 2020-06-03 22:48:23.000000000 +0000 @@ -18,7 +18,7 @@ - [*Mock ICD*](icd/) - [*Vkcube and Vkcube++ Demo*](cube/) - [*VulkanInfo*](vulkaninfo/) -- [*Windows Runtime*](winrt/) +- [*Windows Runtime*](windows-runtime-installer/) ## Contact Information * [Tobin Ehlis](mailto:tobine@google.com) diff -Nru vulkan-tools-1.2.135.0+dfsg1/scripts/generate_source.py vulkan-tools-1.2.141.0+dfsg1/scripts/generate_source.py --- vulkan-tools-1.2.135.0+dfsg1/scripts/generate_source.py 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/scripts/generate_source.py 2020-06-03 22:48:23.000000000 +0000 @@ -39,52 +39,72 @@ group.add_argument('-v', '--verify', action='store_true', help='verify repo files match generator output') args = parser.parse_args(argv) - gen_cmds = [[common_codegen.repo_relative('scripts/kvt_genvk.py'), - '-registry', os.path.abspath(os.path.join(args.registry, 'vk.xml')), - '-quiet', - filename] for filename in ['vk_typemap_helper.h', + # output paths and the list of files in the path + files_to_gen = {str(os.path.join('icd','generated')) : ['vk_typemap_helper.h', 'mock_icd.h', - 'mock_icd.cpp']] + 'mock_icd.cpp'], + str(os.path.join('vulkaninfo','generated')): ['vulkaninfo.hpp']} - repo_dir = common_codegen.repo_relative('icd/generated') + #base directory for the source repository + repo_dir = common_codegen.repo_relative('') - # get directory where generators will run + # get directory where generators will run if needed if args.verify or args.incremental: # generate in temp directory so we can compare or copy later temp_obj = tempfile.TemporaryDirectory(prefix='VulkanLoader_generated_source_') temp_dir = temp_obj.name - gen_dir = temp_dir - else: - # generate directly in the repo - gen_dir = repo_dir + for path in files_to_gen.keys(): + os.makedirs(os.path.join(temp_dir, path)) # run each code generator - for cmd in gen_cmds: - print(' '.join(cmd)) - try: - subprocess.check_call([sys.executable] + cmd, cwd=gen_dir) - except Exception as e: - print('ERROR:', str(e)) - return 1 + for path, filenames in files_to_gen.items(): + for filename in filenames: + if args.verify or args.incremental: + output_path = os.path.join(temp_dir, path) + else: + output_path = common_codegen.repo_relative(path) + + cmd = [common_codegen.repo_relative(os.path.join('scripts','kvt_genvk.py')), + '-registry', os.path.abspath(os.path.join(args.registry, 'vk.xml')), + '-quiet', '-directory', output_path, filename] + print(' '.join(cmd)) + try: + if args.verify or args.incremental: + subprocess.check_call([sys.executable] + cmd, cwd=temp_dir) + else: + subprocess.check_call([sys.executable] + cmd, cwd=repo_dir) + + except Exception as e: + print('ERROR:', str(e)) + return 1 # optional post-generation steps if args.verify: # compare contents of temp dir and repo - temp_files = set(os.listdir(temp_dir)) - repo_files = set(os.listdir(repo_dir)) + temp_files = {} + for path in files_to_gen.keys(): + temp_files[path] = set() + temp_files[path].update(set(os.listdir(os.path.join(temp_dir, path)))) + + repo_files = {} + for path in files_to_gen.keys(): + repo_files[path] = set() + repo_files[path].update(set(os.listdir(os.path.join(repo_dir, path))) - set(verify_exclude)) + files_match = True - for filename in sorted((temp_files | repo_files) - set(verify_exclude)): - if filename not in repo_files: - print('ERROR: Missing repo file', filename) - files_match = False - elif filename not in temp_files: - print('ERROR: Missing generator for', filename) - files_match = False - elif not filecmp.cmp(os.path.join(temp_dir, filename), - os.path.join(repo_dir, filename), - shallow=False): - print('ERROR: Repo files do not match generator output for', filename) - files_match = False + for path in files_to_gen.keys(): + for filename in sorted((temp_files[path] | repo_files[path])): + if filename not in repo_files[path]: + print('ERROR: Missing repo file', filename) + files_match = False + elif filename not in temp_files[path]: + print('ERROR: Missing generator for', filename) + files_match = False + elif not filecmp.cmp(os.path.join(temp_dir, path, filename), + os.path.join(repo_dir, path, filename), + shallow=False): + print('ERROR: Repo files do not match generator output for', filename) + files_match = False # return code for test scripts if files_match: @@ -94,13 +114,14 @@ elif args.incremental: # copy missing or differing files from temp directory to repo - for filename in os.listdir(temp_dir): - temp_filename = os.path.join(temp_dir, filename) - repo_filename = os.path.join(repo_dir, filename) - if not os.path.exists(repo_filename) or \ - not filecmp.cmp(temp_filename, repo_filename, shallow=False): - print('update', repo_filename) - shutil.copyfile(temp_filename, repo_filename) + for path in files_to_gen.keys(): + for filename in os.listdir(os.path.join(temp_dir,path)): + temp_filename = os.path.join(temp_dir, path, filename) + repo_filename = os.path.join(repo_dir, path, filename) + if not os.path.exists(repo_filename) or \ + not filecmp.cmp(temp_filename, repo_filename, shallow=False): + print('update', repo_filename) + shutil.copyfile(temp_filename, repo_filename) return 0 diff -Nru vulkan-tools-1.2.135.0+dfsg1/scripts/known_good.json vulkan-tools-1.2.141.0+dfsg1/scripts/known_good.json --- vulkan-tools-1.2.135.0+dfsg1/scripts/known_good.json 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/scripts/known_good.json 2020-06-03 22:48:23.000000000 +0000 @@ -1,23 +1,12 @@ { "repos" : [ { - "name" : "glslang", - "url" : "https://github.com/KhronosGroup/glslang.git", - "sub_dir" : "glslang", - "build_dir" : "glslang/build", - "install_dir" : "glslang/build/install", - "commit" : "e157435c1e777aa1052f446dafed162b4a722e03", - "prebuild" : [ - "python update_glslang_sources.py" - ] - }, - { "name" : "Vulkan-Headers", "url" : "https://github.com/KhronosGroup/Vulkan-Headers.git", "sub_dir" : "Vulkan-Headers", "build_dir" : "Vulkan-Headers/build", "install_dir" : "Vulkan-Headers/build/install", - "commit" : "v1.2.135" + "commit" : "v1.2.141" }, { "name" : "MoltenVK", @@ -25,9 +14,9 @@ "sub_dir" : "MoltenVK", "build_dir" : "MoltenVK", "install_dir" : "MoltenVK", - "commit" : "v1.0.40", + "commit" : "v1.0.41", "custom_build" : [ - "./fetchDependencies --glslang-root {0[glslang][repo_dir]}", + "./fetchDependencies", "xcodebuild -project MoltenVKPackaging.xcodeproj GCC_PREPROCESSOR_DEFINITIONS='$GCC_PREPROCESSOR_DEFINITIONS MVK_CONFIG_LOG_LEVEL=1' -scheme \"MoltenVK Package\" build" ], "build_step" : "custom", @@ -41,7 +30,7 @@ "sub_dir" : "Vulkan-Loader", "build_dir" : "Vulkan-Loader/build", "install_dir" : "Vulkan-Loader/build/install", - "commit" : "v1.2.135", + "commit" : "v1.2.141", "deps" : [ { "var_name" : "VULKAN_HEADERS_INSTALL_DIR", @@ -58,7 +47,6 @@ } ], "install_names" : { - "glslang" : "GLSLANG_INSTALL_DIR", "Vulkan-Headers" : "VULKAN_HEADERS_INSTALL_DIR", "Vulkan-Loader" : "VULKAN_LOADER_INSTALL_DIR", "MoltenVK" : "MOLTENVK_REPO_ROOT" diff -Nru vulkan-tools-1.2.135.0+dfsg1/scripts/kvt_genvk.py vulkan-tools-1.2.141.0+dfsg1/scripts/kvt_genvk.py --- vulkan-tools-1.2.135.0+dfsg1/scripts/kvt_genvk.py 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/scripts/kvt_genvk.py 2020-06-03 22:48:23.000000000 +0000 @@ -247,33 +247,23 @@ if not args.quiet: write('* Building', options.filename, file=sys.stderr) - write('* options.versions =', - options.versions, file=sys.stderr) - write('* options.emitversions =', - options.emitversions, file=sys.stderr) - write('* options.defaultExtensions =', - options.defaultExtensions, file=sys.stderr) - write('* options.addExtensions =', - options.addExtensions, file=sys.stderr) - write('* options.removeExtensions =', - options.removeExtensions, file=sys.stderr) - write('* options.emitExtensions =', - options.emitExtensions, file=sys.stderr) + write('* options.versions =', options.versions, file=sys.stderr) + write('* options.emitversions =', options.emitversions, file=sys.stderr) + write('* options.defaultExtensions =', options.defaultExtensions, file=sys.stderr) + write('* options.addExtensions =', options.addExtensions, file=sys.stderr) + write('* options.removeExtensions =', options.removeExtensions, file=sys.stderr) + write('* options.emitExtensions =', options.emitExtensions, file=sys.stderr) - startTimer(args.time) gen = createGenerator(errFile=errWarn, warnFile=errWarn, diagFile=diag) - reg.setGenerator(gen) - reg.apiGen(options) - if not args.quiet: write('* Generated', options.filename, file=sys.stderr) - endTimer(args.time, '* Time to generate ' + options.filename + ' =') + return (gen, options) else: write('No generator options for unknown target:', args.target, file=sys.stderr) - + return none # -feature name # -extension name @@ -285,6 +275,8 @@ parser.add_argument('-defaultExtensions', action='store', default='vulkan', help='Specify a single class of extensions to add to targets') + parser.add_argument('-directory', action='store', default='.', + help='Specify where the built file is place') parser.add_argument('-extension', action='append', default=[], help='Specify an extension or extensions to add to targets') @@ -359,45 +351,46 @@ args.feature = [name for arg in args.feature for name in arg.split()] args.extension = [name for arg in args.extension for name in arg.split()] - # Load & parse registry - reg = Registry() + # create error/warning & diagnostic files + if (args.errfile): + errWarn = open(args.errfile, 'w', encoding='utf-8') + else: + errWarn = sys.stderr + + if (args.diagfile): + diag = open(args.diagfile, 'w', encoding='utf-8') + else: + diag = None + + # Create the API generator & generator options + (gen, options) = genTarget(args) + + # Create the registry object with the specified generator and generator + # options. The options are set before XML loading as they may affect it. + reg = Registry(gen, options) + # Parse the specified registry XML into an ElementTree object startTimer(args.time) tree = etree.parse(args.registry) endTimer(args.time, '* Time to make ElementTree =') - if args.debug: - pdb.run('reg.loadElementTree(tree)') - else: - startTimer(args.time) - reg.loadElementTree(tree) - endTimer(args.time, '* Time to parse ElementTree =') + # Load the XML tree into the registry object + startTimer(args.time) + reg.loadElementTree(tree) + endTimer(args.time, '* Time to parse ElementTree =') if (args.validate): reg.validateGroups() if (args.dump): write('* Dumping registry to regdump.txt', file=sys.stderr) - reg.dumpReg(filehandle=open('regdump.txt', 'w', encoding='utf-8')) - - # create error/warning & diagnostic files - if (args.errfile): - errWarn = open(args.errfile, 'w', encoding='utf-8') - else: - errWarn = sys.stderr - - if (args.diagfile): - diag = open(args.diagfile, 'w', encoding='utf-8') - else: - diag = None + reg.dumpReg(filehandle = open('regdump.txt', 'w', encoding='utf-8')) + # Finally, use the output generator to create the requested target if (args.debug): - pdb.run('genTarget(args)') - elif (args.profile): - import cProfile - import pstats - cProfile.run('genTarget(args)', 'profile.txt') - p = pstats.Stats('profile.txt') - p.strip_dirs().sort_stats('time').print_stats(50) + pdb.run('reg.apiGen()') else: - genTarget(args) + startTimer(args.time) + reg.apiGen() + endTimer(args.time, '* Time to generate ' + options.filename + ' =') + genTarget(args) \ No newline at end of file diff -Nru vulkan-tools-1.2.135.0+dfsg1/scripts/mock_icd_generator.py vulkan-tools-1.2.141.0+dfsg1/scripts/mock_icd_generator.py --- vulkan-tools-1.2.135.0+dfsg1/scripts/mock_icd_generator.py 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/scripts/mock_icd_generator.py 2020-06-03 22:48:23.000000000 +0000 @@ -54,12 +54,21 @@ SOURCE_CPP_PREFIX = ''' using std::unordered_map; +static constexpr uint32_t icd_physical_device_count = 1; +static unordered_map> physical_device_map; + // Map device memory handle to any mapped allocations that we'll need to free on unmap static unordered_map> mapped_memory_map; -static VkPhysicalDevice physical_device = nullptr; +// Map device memory allocation handle to the size +static unordered_map allocated_memory_size_map; + static unordered_map>> queue_map; static unordered_map> buffer_map; +static unordered_map> image_memory_size_map; + +static constexpr uint32_t icd_swapchain_image_count = 1; +static unordered_map swapchain_image_map; // TODO: Would like to codegen this but limits aren't in XML static VkPhysicalDeviceLimits SetLimits(VkPhysicalDeviceLimits *limits) { @@ -421,25 +430,30 @@ return VK_ERROR_INCOMPATIBLE_DRIVER; } *pInstance = (VkInstance)CreateDispObjHandle(); + for (auto& physical_device : physical_device_map[*pInstance]) + physical_device = (VkPhysicalDevice)CreateDispObjHandle(); // TODO: If emulating specific device caps, will need to add intelligence here return VK_SUCCESS; ''', 'vkDestroyInstance': ''' - // Destroy physical device - DestroyDispObjHandle((void*)physical_device); - - DestroyDispObjHandle((void*)instance); + if (instance) { + for (const auto physical_device : physical_device_map.at(instance)) + DestroyDispObjHandle((void*)physical_device); + physical_device_map.erase(instance); + DestroyDispObjHandle((void*)instance); + } ''', 'vkEnumeratePhysicalDevices': ''' + VkResult result_code = VK_SUCCESS; if (pPhysicalDevices) { - if (!physical_device) { - physical_device = (VkPhysicalDevice)CreateDispObjHandle(); - } - *pPhysicalDevices = physical_device; + const auto return_count = (std::min)(*pPhysicalDeviceCount, icd_physical_device_count); + for (uint32_t i = 0; i < return_count; ++i) pPhysicalDevices[i] = physical_device_map.at(instance)[i]; + if (return_count < icd_physical_device_count) result_code = VK_INCOMPLETE; + *pPhysicalDeviceCount = return_count; } else { - *pPhysicalDeviceCount = 1; + *pPhysicalDeviceCount = icd_physical_device_count; } - return VK_SUCCESS; + return result_code; ''', 'vkCreateDevice': ''' *pDevice = (VkDevice)CreateDispObjHandle(); @@ -458,6 +472,8 @@ } } queue_map.clear(); + buffer_map.erase(device); + image_memory_size_map.erase(device); // Now destroy device DestroyDispObjHandle((void*)device); // TODO: If emulating specific device caps, will need to add intelligence here @@ -848,10 +864,16 @@ GetBufferMemoryRequirements(device, pInfo->buffer, &pMemoryRequirements->memoryRequirements); ''', 'vkGetImageMemoryRequirements': ''' - // TODO: Just hard-coding reqs for now - pMemoryRequirements->size = 4096; + pMemoryRequirements->size = 0; pMemoryRequirements->alignment = 1; + auto d_iter = image_memory_size_map.find(device); + if(d_iter != image_memory_size_map.end()){ + auto iter = d_iter->second.find(image); + if (iter != d_iter->second.end()) { + pMemoryRequirements->size = iter->second; + } + } // Here we hard-code that the memory type at index 3 doesn't support this image. pMemoryRequirements->memoryTypeBits = 0xFFFF & ~(0x1 << 3); ''', @@ -860,9 +882,12 @@ ''', 'vkMapMemory': ''' unique_lock_t lock(global_lock); - // TODO: Just hard-coding 64k whole size for now - if (VK_WHOLE_SIZE == size) - size = 0x10000; + if (VK_WHOLE_SIZE == size) { + if (allocated_memory_size_map.count(memory) != 0) + size = allocated_memory_size_map[memory] - offset; + else + size = 0x10000; + } void* map_addr = malloc((size_t)size); mapped_memory_map[memory].push_back(map_addr); *ppData = map_addr; @@ -876,21 +901,40 @@ mapped_memory_map.erase(memory); ''', 'vkGetImageSubresourceLayout': ''' - // Need safe values. Callers are computing memory offsets from pLayout, with no return code to flag failure. + // Need safe values. Callers are computing memory offsets from pLayout, with no return code to flag failure. *pLayout = VkSubresourceLayout(); // Default constructor zero values. ''', +'vkCreateSwapchainKHR': ''' + unique_lock_t lock(global_lock); + *pSwapchain = (VkSwapchainKHR)global_unique_handle++; + for(uint32_t i = 0; i < icd_swapchain_image_count; ++i){ + swapchain_image_map[*pSwapchain][i] = (VkImage)global_unique_handle++; + } + return VK_SUCCESS; +''', +'vkDestroySwapchainKHR': ''' + unique_lock_t lock(global_lock); + swapchain_image_map.clear(); +''', 'vkGetSwapchainImagesKHR': ''' if (!pSwapchainImages) { - *pSwapchainImageCount = 1; - } else if (*pSwapchainImageCount > 0) { - pSwapchainImages[0] = (VkImage)global_unique_handle++; - if (*pSwapchainImageCount != 1) { - return VK_INCOMPLETE; + *pSwapchainImageCount = icd_swapchain_image_count; + } else { + unique_lock_t lock(global_lock); + for (uint32_t img_i = 0; img_i < (std::min)(*pSwapchainImageCount, icd_swapchain_image_count); ++img_i){ + pSwapchainImages[img_i] = swapchain_image_map.at(swapchain)[img_i]; } + + if (*pSwapchainImageCount < icd_swapchain_image_count) return VK_INCOMPLETE; + else if (*pSwapchainImageCount > icd_swapchain_image_count) *pSwapchainImageCount = icd_swapchain_image_count; } return VK_SUCCESS; ''', -'vkAcquireNextImagesKHR': ''' +'vkAcquireNextImageKHR': ''' + *pImageIndex = 0; + return VK_SUCCESS; +''', +'vkAcquireNextImage2KHR': ''' *pImageIndex = 0; return VK_SUCCESS; ''', @@ -904,6 +948,47 @@ unique_lock_t lock(global_lock); buffer_map[device].erase(buffer); ''', +'vkCreateImage': ''' + unique_lock_t lock(global_lock); + *pImage = (VkImage)global_unique_handle++; + // TODO: A pixel size is 32 bytes. This accounts for the largest possible pixel size of any format. It could be changed to more accurate size if need be. + image_memory_size_map[device][*pImage] = pCreateInfo->extent.width * pCreateInfo->extent.height * pCreateInfo->extent.depth * + 32 * pCreateInfo->arrayLayers * (pCreateInfo->mipLevels > 1 ? 2 : 1); + // plane count + switch (pCreateInfo->format) { + case VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM: + case VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM: + case VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM: + case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16: + case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16: + case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16: + case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16: + case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16: + case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16: + case VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM: + case VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM: + case VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM: + image_memory_size_map[device][*pImage] *= 3; + break; + case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM: + case VK_FORMAT_G8_B8R8_2PLANE_422_UNORM: + case VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16: + case VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16: + case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16: + case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16: + case VK_FORMAT_G16_B16R16_2PLANE_420_UNORM: + case VK_FORMAT_G16_B16R16_2PLANE_422_UNORM: + image_memory_size_map[device][*pImage] *= 2; + break; + default: + break; + } + return VK_SUCCESS; +''', +'vkDestroyImage': ''' + unique_lock_t lock(global_lock); + image_memory_size_map[device].erase(image); +''', } # MockICDGeneratorOptions - subclass of GeneratorOptions. @@ -1070,6 +1155,8 @@ else: write('#include "mock_icd.h"', file=self.outFile) write('#include ', file=self.outFile) + write('#include ', file=self.outFile) + write('#include ', file=self.outFile) write('#include ', file=self.outFile) write('#include "vk_typemap_helper.h"', file=self.outFile) @@ -1299,9 +1386,15 @@ self.appendSection('command', ' }') else: #print("Single %s last param is '%s' w/ type '%s'" % (handle_type, lp_txt, lp_type)) + if 'AllocateMemory' in api_function_name: + # Store allocation size in case it's mapped + self.appendSection('command', ' allocated_memory_size_map[(VkDeviceMemory)global_unique_handle] = pAllocateInfo->allocationSize;') self.appendSection('command', ' *%s = (%s)%s;' % (lp_txt, lp_type, allocator_txt)) elif True in [ftxt in api_function_name for ftxt in ['Destroy', 'Free']]: self.appendSection('command', '//Destroy object') + if 'FreeMemory' in api_function_name: + # Remove from allocation map + self.appendSection('command', ' allocated_memory_size_map.erase(memory);') else: self.appendSection('command', '//Not a CREATE or DESTROY function') diff -Nru vulkan-tools-1.2.135.0+dfsg1/scripts/vulkaninfo_generator.py vulkan-tools-1.2.141.0+dfsg1/scripts/vulkaninfo_generator.py --- vulkan-tools-1.2.135.0+dfsg1/scripts/vulkaninfo_generator.py 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/scripts/vulkaninfo_generator.py 2020-06-03 22:48:23.000000000 +0000 @@ -80,6 +80,7 @@ else return to_hex_str(i); } + ''' @@ -104,14 +105,12 @@ 'float', 'uint64_t', 'size_t', 'VkDeviceSize'] # Types that need pNext Chains built. 'extends' is the xml tag used in the structextends member. 'type' can be device, instance, or both -EXTENSION_CATEGORIES = {'phys_device_props2': {'extends': 'VkPhysicalDeviceProperties2', 'type': 'both'}, - 'phys_device_mem_props2': {'extends': 'VkPhysicalDeviceMemoryProperties2', 'type': 'device'}, - 'phys_device_features2': {'extends': 'VkPhysicalDeviceFeatures2,VkDeviceCreateInfo', 'type': 'device'}, - 'surface_capabilities2': {'extends': 'VkSurfaceCapabilities2KHR', 'type': 'both'}, - 'format_properties2': {'extends': 'VkFormatProperties2', 'type': 'device'} - } - - +EXTENSION_CATEGORIES = OrderedDict((('phys_device_props2', {'extends': 'VkPhysicalDeviceProperties2', 'type': 'both'}), + ('phys_device_mem_props2', {'extends': 'VkPhysicalDeviceMemoryProperties2', 'type': 'device'}), + ('phys_device_features2', {'extends': 'VkPhysicalDeviceFeatures2,VkDeviceCreateInfo', 'type': 'device'}), + ('surface_capabilities2', {'extends': 'VkSurfaceCapabilities2KHR', 'type': 'both'}), + ('format_properties2', {'extends': 'VkFormatProperties2', 'type': 'device'}) + )) class VulkanInfoGeneratorOptions(GeneratorOptions): def __init__(self, conventions=None, diff -Nru vulkan-tools-1.2.135.0+dfsg1/vulkaninfo/CMakeLists.txt vulkan-tools-1.2.141.0+dfsg1/vulkaninfo/CMakeLists.txt --- vulkan-tools-1.2.135.0+dfsg1/vulkaninfo/CMakeLists.txt 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/vulkaninfo/CMakeLists.txt 2020-06-03 22:48:23.000000000 +0000 @@ -17,22 +17,6 @@ # CMakeLists.txt file for building Vulkaninfo -find_package(PythonInterp 3 QUIET) -set (PYTHON_CMD ${PYTHON_EXECUTABLE}) - -set(VKINFO_DIR ${CMAKE_CURRENT_SOURCE_DIR}) -set(KVULKANTOOLS_SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/scripts) - -if(PYTHONINTERP_FOUND) - add_custom_target(generate_vulkaninfo_hpp - COMMAND ${PYTHON_CMD} ${KVULKANTOOLS_SCRIPTS_DIR}/kvt_genvk.py -registry ${VulkanRegistry_DIR}/vk.xml -scripts ${VulkanRegistry_DIR} vulkaninfo.hpp - DEPENDS ${VulkanRegistry_DIR}/vk.xml ${VulkanRegistry_DIR}/generator.py ${KVULKANTOOLS_SCRIPTS_DIR}/vulkaninfo_generator.py ${KVULKANTOOLS_SCRIPTS_DIR}/kvt_genvk.py ${VulkanRegistry_DIR}/reg.py - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/vulkaninfo/generated - ) - else() - message("WARNING: generate_vulkaninfo_hpp target requires python 3") -endif() - if(WIN32) add_executable(vulkaninfo vulkaninfo.cpp vulkaninfo.rc) elseif(APPLE) @@ -121,8 +105,6 @@ "${${configuration}}") endif() endforeach() - - file(COPY vulkaninfo.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/vulkaninfo) elseif(APPLE) add_definitions(-DVK_USE_PLATFORM_MACOS_MVK -DVK_USE_PLATFORM_METAL_EXT) endif() diff -Nru vulkan-tools-1.2.135.0+dfsg1/vulkaninfo/generated/vulkaninfo.hpp vulkan-tools-1.2.141.0+dfsg1/vulkaninfo/generated/vulkaninfo.hpp --- vulkan-tools-1.2.135.0+dfsg1/vulkaninfo/generated/vulkaninfo.hpp 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/vulkaninfo/generated/vulkaninfo.hpp 2020-06-03 22:48:23.000000000 +0000 @@ -48,6 +48,7 @@ else return to_hex_str(i); } + static const char *VkResultString(VkResult value) { switch (value) { case (0): return "SUCCESS"; @@ -88,7 +89,7 @@ case (1000268001): return "THREAD_DONE_KHR"; case (1000268002): return "OPERATION_DEFERRED_KHR"; case (1000268003): return "OPERATION_NOT_DEFERRED_KHR"; - case (1000297000): return "ERROR_PIPELINE_COMPILE_REQUIRED_EXT"; + case (1000297000): return "PIPELINE_COMPILE_REQUIRED_EXT"; default: return "UNKNOWN_VkResult"; } } @@ -412,6 +413,7 @@ case (10): return "DRIVER_ID_GOOGLE_SWIFTSHADER"; case (11): return "DRIVER_ID_GGP_PROPRIETARY"; case (12): return "DRIVER_ID_BROADCOM_PROPRIETARY"; + case (13): return "DRIVER_ID_MESA_LLVMPIPE"; default: return "UNKNOWN_VkDriverId"; } } @@ -437,6 +439,24 @@ p.PrintKeyString(name, VkShaderFloatControlsIndependenceString(value), width); } } +static const char *VkPresentModeKHRString(VkPresentModeKHR value) { + switch (value) { + case (0): return "PRESENT_MODE_IMMEDIATE_KHR"; + case (1): return "PRESENT_MODE_MAILBOX_KHR"; + case (2): return "PRESENT_MODE_FIFO_KHR"; + case (3): return "PRESENT_MODE_FIFO_RELAXED_KHR"; + case (1000111000): return "PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR"; + case (1000111001): return "PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR"; + default: return "UNKNOWN_VkPresentModeKHR"; + } +} +void DumpVkPresentModeKHR(Printer &p, std::string name, VkPresentModeKHR value, int width = 0) { + if (p.Type() == OutputType::json) { + p.PrintKeyValue(name, value, width); + } else { + p.PrintKeyString(name, VkPresentModeKHRString(value), width); + } +} static const char *VkColorSpaceKHRString(VkColorSpaceKHR value) { switch (value) { case (0): return "COLOR_SPACE_SRGB_NONLINEAR_KHR"; @@ -465,24 +485,6 @@ p.PrintKeyString(name, VkColorSpaceKHRString(value), width); } } -static const char *VkPresentModeKHRString(VkPresentModeKHR value) { - switch (value) { - case (0): return "PRESENT_MODE_IMMEDIATE_KHR"; - case (1): return "PRESENT_MODE_MAILBOX_KHR"; - case (2): return "PRESENT_MODE_FIFO_KHR"; - case (3): return "PRESENT_MODE_FIFO_RELAXED_KHR"; - case (1000111000): return "PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR"; - case (1000111001): return "PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR"; - default: return "UNKNOWN_VkPresentModeKHR"; - } -} -void DumpVkPresentModeKHR(Printer &p, std::string name, VkPresentModeKHR value, int width = 0) { - if (p.Type() == OutputType::json) { - p.PrintKeyValue(name, value, width); - } else { - p.PrintKeyString(name, VkPresentModeKHRString(value), width); - } -} std::vectorVkFormatFeatureFlagBitsGetStrings(VkFormatFeatureFlagBits value) { std::vector strings; if (value == 0) strings.push_back("None"); @@ -861,22 +863,16 @@ p.PrintKeyString(name, strings.at(0), width); } -std::vectorVkToolPurposeFlagBitsEXTGetStrings(VkToolPurposeFlagBitsEXT value) { +std::vectorVkSurfaceCounterFlagBitsEXTGetStrings(VkSurfaceCounterFlagBitsEXT value) { std::vector strings; if (value == 0) strings.push_back("None"); - if (0x1 & value) strings.push_back("TOOL_PURPOSE_VALIDATION_BIT_EXT"); - if (0x2 & value) strings.push_back("TOOL_PURPOSE_PROFILING_BIT_EXT"); - if (0x4 & value) strings.push_back("TOOL_PURPOSE_TRACING_BIT_EXT"); - if (0x8 & value) strings.push_back("TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT"); - if (0x10 & value) strings.push_back("TOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT"); - if (0x20 & value) strings.push_back("TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT"); - if (0x40 & value) strings.push_back("TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT"); + if (0x1 & value) strings.push_back("SURFACE_COUNTER_VBLANK_EXT"); return strings; } -void DumpVkToolPurposeFlagsEXT(Printer &p, std::string name, VkToolPurposeFlagsEXT value, int width = 0) { +void DumpVkSurfaceCounterFlagsEXT(Printer &p, std::string name, VkSurfaceCounterFlagsEXT value, int width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } - auto strings = VkToolPurposeFlagBitsEXTGetStrings(static_cast(value)); - if (static_cast(value) == 0) { + auto strings = VkSurfaceCounterFlagBitsEXTGetStrings(static_cast(value)); + if (static_cast(value) == 0) { ArrayWrapper arr(p, name, 0); p.SetAsType().PrintString("None"); return; @@ -886,21 +882,27 @@ p.SetAsType().PrintString(str); } } -void DumpVkToolPurposeFlagBitsEXT(Printer &p, std::string name, VkToolPurposeFlagBitsEXT value, int width = 0) { - auto strings = VkToolPurposeFlagBitsEXTGetStrings(value); +void DumpVkSurfaceCounterFlagBitsEXT(Printer &p, std::string name, VkSurfaceCounterFlagBitsEXT value, int width = 0) { + auto strings = VkSurfaceCounterFlagBitsEXTGetStrings(value); p.PrintKeyString(name, strings.at(0), width); } -std::vectorVkSurfaceCounterFlagBitsEXTGetStrings(VkSurfaceCounterFlagBitsEXT value) { +std::vectorVkToolPurposeFlagBitsEXTGetStrings(VkToolPurposeFlagBitsEXT value) { std::vector strings; if (value == 0) strings.push_back("None"); - if (0x1 & value) strings.push_back("SURFACE_COUNTER_VBLANK_EXT"); + if (0x1 & value) strings.push_back("TOOL_PURPOSE_VALIDATION_BIT_EXT"); + if (0x2 & value) strings.push_back("TOOL_PURPOSE_PROFILING_BIT_EXT"); + if (0x4 & value) strings.push_back("TOOL_PURPOSE_TRACING_BIT_EXT"); + if (0x8 & value) strings.push_back("TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT"); + if (0x10 & value) strings.push_back("TOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT"); + if (0x20 & value) strings.push_back("TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT"); + if (0x40 & value) strings.push_back("TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT"); return strings; } -void DumpVkSurfaceCounterFlagsEXT(Printer &p, std::string name, VkSurfaceCounterFlagsEXT value, int width = 0) { +void DumpVkToolPurposeFlagsEXT(Printer &p, std::string name, VkToolPurposeFlagsEXT value, int width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } - auto strings = VkSurfaceCounterFlagBitsEXTGetStrings(static_cast(value)); - if (static_cast(value) == 0) { + auto strings = VkToolPurposeFlagBitsEXTGetStrings(static_cast(value)); + if (static_cast(value) == 0) { ArrayWrapper arr(p, name, 0); p.SetAsType().PrintString("None"); return; @@ -910,8 +912,8 @@ p.SetAsType().PrintString(str); } } -void DumpVkSurfaceCounterFlagBitsEXT(Printer &p, std::string name, VkSurfaceCounterFlagBitsEXT value, int width = 0) { - auto strings = VkSurfaceCounterFlagBitsEXTGetStrings(value); +void DumpVkToolPurposeFlagBitsEXT(Printer &p, std::string name, VkToolPurposeFlagBitsEXT value, int width = 0) { + auto strings = VkToolPurposeFlagBitsEXTGetStrings(value); p.PrintKeyString(name, strings.at(0), width); } @@ -1503,6 +1505,67 @@ DumpVkFormat(p, "format", obj.format, 0); DumpVkColorSpaceKHR(p, "colorSpace", obj.colorSpace, 0); } +void DumpVkPhysicalDevicePushDescriptorPropertiesKHR(Printer &p, std::string name, VkPhysicalDevicePushDescriptorPropertiesKHR &obj) { + ObjectWrapper object{p, name}; + p.PrintKeyValue("maxPushDescriptors", obj.maxPushDescriptors, 18); +} +void DumpVkSharedPresentSurfaceCapabilitiesKHR(Printer &p, std::string name, VkSharedPresentSurfaceCapabilitiesKHR &obj) { + ObjectWrapper object{p, name}; + DumpVkImageUsageFlags(p, "sharedPresentSupportedUsageFlags", obj.sharedPresentSupportedUsageFlags, 0); +} +void DumpVkPhysicalDevicePerformanceQueryFeaturesKHR(Printer &p, std::string name, VkPhysicalDevicePerformanceQueryFeaturesKHR &obj) { + ObjectWrapper object{p, name}; + p.PrintKeyBool("performanceCounterQueryPools", static_cast(obj.performanceCounterQueryPools), 36); + p.PrintKeyBool("performanceCounterMultipleQueryPools", static_cast(obj.performanceCounterMultipleQueryPools), 36); +} +void DumpVkPhysicalDevicePerformanceQueryPropertiesKHR(Printer &p, std::string name, VkPhysicalDevicePerformanceQueryPropertiesKHR &obj) { + ObjectWrapper object{p, name}; + p.PrintKeyBool("allowCommandBufferQueryCopies", static_cast(obj.allowCommandBufferQueryCopies), 29); +} +void DumpVkPhysicalDeviceShaderClockFeaturesKHR(Printer &p, std::string name, VkPhysicalDeviceShaderClockFeaturesKHR &obj) { + ObjectWrapper object{p, name}; + p.PrintKeyBool("shaderSubgroupClock", static_cast(obj.shaderSubgroupClock), 19); + p.PrintKeyBool("shaderDeviceClock", static_cast(obj.shaderDeviceClock), 19); +} +void DumpVkSurfaceProtectedCapabilitiesKHR(Printer &p, std::string name, VkSurfaceProtectedCapabilitiesKHR &obj) { + ObjectWrapper object{p, name}; + p.PrintKeyBool("supportsProtected", static_cast(obj.supportsProtected), 17); +} +void DumpVkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR(Printer &p, std::string name, VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR &obj) { + ObjectWrapper object{p, name}; + p.PrintKeyBool("pipelineExecutableInfo", static_cast(obj.pipelineExecutableInfo), 22); +} +void DumpVkPhysicalDeviceTransformFeedbackFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceTransformFeedbackFeaturesEXT &obj) { + ObjectWrapper object{p, name}; + p.PrintKeyBool("transformFeedback", static_cast(obj.transformFeedback), 17); + p.PrintKeyBool("geometryStreams", static_cast(obj.geometryStreams), 17); +} +void DumpVkPhysicalDeviceTransformFeedbackPropertiesEXT(Printer &p, std::string name, VkPhysicalDeviceTransformFeedbackPropertiesEXT &obj) { + ObjectWrapper object{p, name}; + p.PrintKeyValue("maxTransformFeedbackStreams", obj.maxTransformFeedbackStreams, 42); + p.PrintKeyValue("maxTransformFeedbackBuffers", obj.maxTransformFeedbackBuffers, 42); + p.PrintKeyValue("maxTransformFeedbackBufferSize", to_hex_str(p, obj.maxTransformFeedbackBufferSize), 42); + p.PrintKeyValue("maxTransformFeedbackStreamDataSize", obj.maxTransformFeedbackStreamDataSize, 42); + p.PrintKeyValue("maxTransformFeedbackBufferDataSize", obj.maxTransformFeedbackBufferDataSize, 42); + p.PrintKeyValue("maxTransformFeedbackBufferDataStride", obj.maxTransformFeedbackBufferDataStride, 42); + p.PrintKeyBool("transformFeedbackQueries", static_cast(obj.transformFeedbackQueries), 42); + p.PrintKeyBool("transformFeedbackStreamsLinesTriangles", static_cast(obj.transformFeedbackStreamsLinesTriangles), 42); + p.PrintKeyBool("transformFeedbackRasterizationStreamSelect", static_cast(obj.transformFeedbackRasterizationStreamSelect), 42); + p.PrintKeyBool("transformFeedbackDraw", static_cast(obj.transformFeedbackDraw), 42); +} +void DumpVkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT &obj) { + ObjectWrapper object{p, name}; + p.PrintKeyBool("textureCompressionASTC_HDR", static_cast(obj.textureCompressionASTC_HDR), 26); +} +void DumpVkPhysicalDeviceASTCDecodeFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceASTCDecodeFeaturesEXT &obj) { + ObjectWrapper object{p, name}; + p.PrintKeyBool("decodeModeSharedExponent", static_cast(obj.decodeModeSharedExponent), 24); +} +void DumpVkPhysicalDeviceConditionalRenderingFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceConditionalRenderingFeaturesEXT &obj) { + ObjectWrapper object{p, name}; + p.PrintKeyBool("conditionalRendering", static_cast(obj.conditionalRendering), 29); + p.PrintKeyBool("inheritedConditionalRendering", static_cast(obj.inheritedConditionalRendering), 29); +} void DumpVkPhysicalDeviceDiscardRectanglePropertiesEXT(Printer &p, std::string name, VkPhysicalDeviceDiscardRectanglePropertiesEXT &obj) { ObjectWrapper object{p, name}; p.PrintKeyValue("maxDiscardRectangles", obj.maxDiscardRectangles, 20); @@ -1523,19 +1586,6 @@ ObjectWrapper object{p, name}; p.PrintKeyBool("depthClipEnable", static_cast(obj.depthClipEnable), 15); } -void DumpVkSharedPresentSurfaceCapabilitiesKHR(Printer &p, std::string name, VkSharedPresentSurfaceCapabilitiesKHR &obj) { - ObjectWrapper object{p, name}; - DumpVkImageUsageFlags(p, "sharedPresentSupportedUsageFlags", obj.sharedPresentSupportedUsageFlags, 0); -} -void DumpVkPhysicalDevicePerformanceQueryFeaturesKHR(Printer &p, std::string name, VkPhysicalDevicePerformanceQueryFeaturesKHR &obj) { - ObjectWrapper object{p, name}; - p.PrintKeyBool("performanceCounterQueryPools", static_cast(obj.performanceCounterQueryPools), 36); - p.PrintKeyBool("performanceCounterMultipleQueryPools", static_cast(obj.performanceCounterMultipleQueryPools), 36); -} -void DumpVkPhysicalDevicePerformanceQueryPropertiesKHR(Printer &p, std::string name, VkPhysicalDevicePerformanceQueryPropertiesKHR &obj) { - ObjectWrapper object{p, name}; - p.PrintKeyBool("allowCommandBufferQueryCopies", static_cast(obj.allowCommandBufferQueryCopies), 29); -} void DumpVkPhysicalDeviceInlineUniformBlockFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceInlineUniformBlockFeaturesEXT &obj) { ObjectWrapper object{p, name}; p.PrintKeyBool("inlineUniformBlock", static_cast(obj.inlineUniformBlock), 50); @@ -1573,34 +1623,6 @@ p.PrintKeyBool("advancedBlendCorrelatedOverlap", static_cast(obj.advancedBlendCorrelatedOverlap), 37); p.PrintKeyBool("advancedBlendAllOperations", static_cast(obj.advancedBlendAllOperations), 37); } -#ifdef VK_ENABLE_BETA_EXTENSIONS -void DumpVkPhysicalDeviceRayTracingFeaturesKHR(Printer &p, std::string name, VkPhysicalDeviceRayTracingFeaturesKHR &obj) { - ObjectWrapper object{p, name}; - p.PrintKeyBool("rayTracing", static_cast(obj.rayTracing), 45); - p.PrintKeyBool("rayTracingShaderGroupHandleCaptureReplay", static_cast(obj.rayTracingShaderGroupHandleCaptureReplay), 45); - p.PrintKeyBool("rayTracingShaderGroupHandleCaptureReplayMixed", static_cast(obj.rayTracingShaderGroupHandleCaptureReplayMixed), 45); - p.PrintKeyBool("rayTracingAccelerationStructureCaptureReplay", static_cast(obj.rayTracingAccelerationStructureCaptureReplay), 45); - p.PrintKeyBool("rayTracingIndirectTraceRays", static_cast(obj.rayTracingIndirectTraceRays), 45); - p.PrintKeyBool("rayTracingIndirectAccelerationStructureBuild", static_cast(obj.rayTracingIndirectAccelerationStructureBuild), 45); - p.PrintKeyBool("rayTracingHostAccelerationStructureCommands", static_cast(obj.rayTracingHostAccelerationStructureCommands), 45); - p.PrintKeyBool("rayQuery", static_cast(obj.rayQuery), 45); - p.PrintKeyBool("rayTracingPrimitiveCulling", static_cast(obj.rayTracingPrimitiveCulling), 45); -} -#endif // VK_ENABLE_BETA_EXTENSIONS -#ifdef VK_ENABLE_BETA_EXTENSIONS -void DumpVkPhysicalDeviceRayTracingPropertiesKHR(Printer &p, std::string name, VkPhysicalDeviceRayTracingPropertiesKHR &obj) { - ObjectWrapper object{p, name}; - p.PrintKeyValue("shaderGroupHandleSize", obj.shaderGroupHandleSize, 38); - p.PrintKeyValue("maxRecursionDepth", obj.maxRecursionDepth, 38); - p.PrintKeyValue("maxShaderGroupStride", obj.maxShaderGroupStride, 38); - p.PrintKeyValue("shaderGroupBaseAlignment", obj.shaderGroupBaseAlignment, 38); - p.PrintKeyValue("maxGeometryCount", obj.maxGeometryCount, 38); - p.PrintKeyValue("maxInstanceCount", obj.maxInstanceCount, 38); - p.PrintKeyValue("maxPrimitiveCount", obj.maxPrimitiveCount, 38); - p.PrintKeyValue("maxDescriptorSetAccelerationStructures", obj.maxDescriptorSetAccelerationStructures, 38); - p.PrintKeyValue("shaderGroupHandleCaptureReplaySize", obj.shaderGroupHandleCaptureReplaySize, 38); -} -#endif // VK_ENABLE_BETA_EXTENSIONS void DumpVkDrmFormatModifierPropertiesEXT(Printer &p, std::string name, VkDrmFormatModifierPropertiesEXT &obj) { ObjectWrapper object{p, name}; p.PrintKeyValue("drmFormatModifier", obj.drmFormatModifier, 27); @@ -1622,11 +1644,6 @@ ObjectWrapper object{p, name}; p.PrintKeyValue("minImportedHostPointerAlignment", to_hex_str(p, obj.minImportedHostPointerAlignment), 31); } -void DumpVkPhysicalDeviceShaderClockFeaturesKHR(Printer &p, std::string name, VkPhysicalDeviceShaderClockFeaturesKHR &obj) { - ObjectWrapper object{p, name}; - p.PrintKeyBool("shaderSubgroupClock", static_cast(obj.shaderSubgroupClock), 19); - p.PrintKeyBool("shaderDeviceClock", static_cast(obj.shaderDeviceClock), 19); -} void DumpVkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(Printer &p, std::string name, VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT &obj) { ObjectWrapper object{p, name}; p.PrintKeyValue("maxVertexAttribDivisor", obj.maxVertexAttribDivisor, 22); @@ -1710,10 +1727,6 @@ ObjectWrapper object{p, name}; p.PrintKeyBool("memoryPriority", static_cast(obj.memoryPriority), 14); } -void DumpVkSurfaceProtectedCapabilitiesKHR(Printer &p, std::string name, VkSurfaceProtectedCapabilitiesKHR &obj) { - ObjectWrapper object{p, name}; - p.PrintKeyBool("supportsProtected", static_cast(obj.supportsProtected), 17); -} void DumpVkPhysicalDeviceBufferDeviceAddressFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceBufferDeviceAddressFeaturesEXT &obj) { ObjectWrapper object{p, name}; p.PrintKeyBool("bufferDeviceAddress", static_cast(obj.bufferDeviceAddress), 32); @@ -1761,10 +1774,6 @@ ObjectWrapper object{p, name}; p.PrintKeyBool("indexTypeUint8", static_cast(obj.indexTypeUint8), 14); } -void DumpVkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR(Printer &p, std::string name, VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR &obj) { - ObjectWrapper object{p, name}; - p.PrintKeyBool("pipelineExecutableInfo", static_cast(obj.pipelineExecutableInfo), 22); -} void DumpVkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT &obj) { ObjectWrapper object{p, name}; p.PrintKeyBool("shaderDemoteToHelperInvocation", static_cast(obj.shaderDemoteToHelperInvocation), 30); @@ -1780,50 +1789,64 @@ p.PrintKeyValue("uniformTexelBufferOffsetAlignmentBytes", to_hex_str(p, obj.uniformTexelBufferOffsetAlignmentBytes), 44); p.PrintKeyBool("uniformTexelBufferOffsetSingleTexelAlignment", static_cast(obj.uniformTexelBufferOffsetSingleTexelAlignment), 44); } -void DumpVkPhysicalDeviceTransformFeedbackFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceTransformFeedbackFeaturesEXT &obj) { +void DumpVkPhysicalDeviceRobustness2FeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceRobustness2FeaturesEXT &obj) { ObjectWrapper object{p, name}; - p.PrintKeyBool("transformFeedback", static_cast(obj.transformFeedback), 17); - p.PrintKeyBool("geometryStreams", static_cast(obj.geometryStreams), 17); + p.PrintKeyBool("robustBufferAccess2", static_cast(obj.robustBufferAccess2), 19); + p.PrintKeyBool("robustImageAccess2", static_cast(obj.robustImageAccess2), 19); + p.PrintKeyBool("nullDescriptor", static_cast(obj.nullDescriptor), 19); } -void DumpVkPhysicalDeviceTransformFeedbackPropertiesEXT(Printer &p, std::string name, VkPhysicalDeviceTransformFeedbackPropertiesEXT &obj) { +void DumpVkPhysicalDeviceRobustness2PropertiesEXT(Printer &p, std::string name, VkPhysicalDeviceRobustness2PropertiesEXT &obj) { ObjectWrapper object{p, name}; - p.PrintKeyValue("maxTransformFeedbackStreams", obj.maxTransformFeedbackStreams, 42); - p.PrintKeyValue("maxTransformFeedbackBuffers", obj.maxTransformFeedbackBuffers, 42); - p.PrintKeyValue("maxTransformFeedbackBufferSize", to_hex_str(p, obj.maxTransformFeedbackBufferSize), 42); - p.PrintKeyValue("maxTransformFeedbackStreamDataSize", obj.maxTransformFeedbackStreamDataSize, 42); - p.PrintKeyValue("maxTransformFeedbackBufferDataSize", obj.maxTransformFeedbackBufferDataSize, 42); - p.PrintKeyValue("maxTransformFeedbackBufferDataStride", obj.maxTransformFeedbackBufferDataStride, 42); - p.PrintKeyBool("transformFeedbackQueries", static_cast(obj.transformFeedbackQueries), 42); - p.PrintKeyBool("transformFeedbackStreamsLinesTriangles", static_cast(obj.transformFeedbackStreamsLinesTriangles), 42); - p.PrintKeyBool("transformFeedbackRasterizationStreamSelect", static_cast(obj.transformFeedbackRasterizationStreamSelect), 42); - p.PrintKeyBool("transformFeedbackDraw", static_cast(obj.transformFeedbackDraw), 42); + p.PrintKeyValue("robustStorageBufferAccessSizeAlignment", to_hex_str(p, obj.robustStorageBufferAccessSizeAlignment), 38); + p.PrintKeyValue("robustUniformBufferAccessSizeAlignment", to_hex_str(p, obj.robustUniformBufferAccessSizeAlignment), 38); } -void DumpVkPhysicalDevicePipelineCreationCacheControlFeaturesEXT(Printer &p, std::string name, VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT &obj) { +void DumpVkPhysicalDeviceCustomBorderColorPropertiesEXT(Printer &p, std::string name, VkPhysicalDeviceCustomBorderColorPropertiesEXT &obj) { ObjectWrapper object{p, name}; - p.PrintKeyBool("pipelineCreationCacheControl", static_cast(obj.pipelineCreationCacheControl), 28); + p.PrintKeyValue("maxCustomBorderColorSamplers", obj.maxCustomBorderColorSamplers, 28); } -void DumpVkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT &obj) { +void DumpVkPhysicalDeviceCustomBorderColorFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceCustomBorderColorFeaturesEXT &obj) { ObjectWrapper object{p, name}; - p.PrintKeyBool("textureCompressionASTC_HDR", static_cast(obj.textureCompressionASTC_HDR), 26); + p.PrintKeyBool("customBorderColors", static_cast(obj.customBorderColors), 30); + p.PrintKeyBool("customBorderColorWithoutFormat", static_cast(obj.customBorderColorWithoutFormat), 30); } -void DumpVkPhysicalDeviceASTCDecodeFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceASTCDecodeFeaturesEXT &obj) { +void DumpVkPhysicalDevicePipelineCreationCacheControlFeaturesEXT(Printer &p, std::string name, VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT &obj) { ObjectWrapper object{p, name}; - p.PrintKeyBool("decodeModeSharedExponent", static_cast(obj.decodeModeSharedExponent), 24); + p.PrintKeyBool("pipelineCreationCacheControl", static_cast(obj.pipelineCreationCacheControl), 28); } -void DumpVkPhysicalDevicePushDescriptorPropertiesKHR(Printer &p, std::string name, VkPhysicalDevicePushDescriptorPropertiesKHR &obj) { +#ifdef VK_ENABLE_BETA_EXTENSIONS +void DumpVkPhysicalDeviceRayTracingFeaturesKHR(Printer &p, std::string name, VkPhysicalDeviceRayTracingFeaturesKHR &obj) { ObjectWrapper object{p, name}; - p.PrintKeyValue("maxPushDescriptors", obj.maxPushDescriptors, 18); + p.PrintKeyBool("rayTracing", static_cast(obj.rayTracing), 45); + p.PrintKeyBool("rayTracingShaderGroupHandleCaptureReplay", static_cast(obj.rayTracingShaderGroupHandleCaptureReplay), 45); + p.PrintKeyBool("rayTracingShaderGroupHandleCaptureReplayMixed", static_cast(obj.rayTracingShaderGroupHandleCaptureReplayMixed), 45); + p.PrintKeyBool("rayTracingAccelerationStructureCaptureReplay", static_cast(obj.rayTracingAccelerationStructureCaptureReplay), 45); + p.PrintKeyBool("rayTracingIndirectTraceRays", static_cast(obj.rayTracingIndirectTraceRays), 45); + p.PrintKeyBool("rayTracingIndirectAccelerationStructureBuild", static_cast(obj.rayTracingIndirectAccelerationStructureBuild), 45); + p.PrintKeyBool("rayTracingHostAccelerationStructureCommands", static_cast(obj.rayTracingHostAccelerationStructureCommands), 45); + p.PrintKeyBool("rayQuery", static_cast(obj.rayQuery), 45); + p.PrintKeyBool("rayTracingPrimitiveCulling", static_cast(obj.rayTracingPrimitiveCulling), 45); } -void DumpVkPhysicalDeviceConditionalRenderingFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceConditionalRenderingFeaturesEXT &obj) { +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS +void DumpVkPhysicalDeviceRayTracingPropertiesKHR(Printer &p, std::string name, VkPhysicalDeviceRayTracingPropertiesKHR &obj) { ObjectWrapper object{p, name}; - p.PrintKeyBool("conditionalRendering", static_cast(obj.conditionalRendering), 29); - p.PrintKeyBool("inheritedConditionalRendering", static_cast(obj.inheritedConditionalRendering), 29); + p.PrintKeyValue("shaderGroupHandleSize", obj.shaderGroupHandleSize, 38); + p.PrintKeyValue("maxRecursionDepth", obj.maxRecursionDepth, 38); + p.PrintKeyValue("maxShaderGroupStride", obj.maxShaderGroupStride, 38); + p.PrintKeyValue("shaderGroupBaseAlignment", obj.shaderGroupBaseAlignment, 38); + p.PrintKeyValue("maxGeometryCount", obj.maxGeometryCount, 38); + p.PrintKeyValue("maxInstanceCount", obj.maxInstanceCount, 38); + p.PrintKeyValue("maxPrimitiveCount", obj.maxPrimitiveCount, 38); + p.PrintKeyValue("maxDescriptorSetAccelerationStructures", obj.maxDescriptorSetAccelerationStructures, 38); + p.PrintKeyValue("shaderGroupHandleCaptureReplaySize", obj.shaderGroupHandleCaptureReplaySize, 38); } +#endif // VK_ENABLE_BETA_EXTENSIONS pNextChainInfos get_chain_infos() { pNextChainInfos infos; infos.phys_device_props2 = { {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT, sizeof(VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT)}, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT, sizeof(VkPhysicalDeviceConservativeRasterizationPropertiesEXT)}, + {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT, sizeof(VkPhysicalDeviceCustomBorderColorPropertiesEXT)}, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES, sizeof(VkPhysicalDeviceDepthStencilResolveProperties)}, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES, sizeof(VkPhysicalDeviceDescriptorIndexingProperties)}, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT, sizeof(VkPhysicalDeviceDiscardRectanglePropertiesEXT)}, @@ -1844,6 +1867,7 @@ #ifdef VK_ENABLE_BETA_EXTENSIONS {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_KHR, sizeof(VkPhysicalDeviceRayTracingPropertiesKHR)}, #endif // VK_ENABLE_BETA_EXTENSIONS + {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT, sizeof(VkPhysicalDeviceRobustness2PropertiesEXT)}, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT, sizeof(VkPhysicalDeviceSampleLocationsPropertiesEXT)}, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES, sizeof(VkPhysicalDeviceSamplerFilterMinmaxProperties)}, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES, sizeof(VkPhysicalDeviceSubgroupProperties)}, @@ -1866,6 +1890,7 @@ {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES, sizeof(VkPhysicalDeviceBufferDeviceAddressFeatures)}, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT, sizeof(VkPhysicalDeviceBufferDeviceAddressFeaturesEXT)}, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT, sizeof(VkPhysicalDeviceConditionalRenderingFeaturesEXT)}, + {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT, sizeof(VkPhysicalDeviceCustomBorderColorFeaturesEXT)}, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT, sizeof(VkPhysicalDeviceDepthClipEnableFeaturesEXT)}, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES, sizeof(VkPhysicalDeviceDescriptorIndexingFeatures)}, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT, sizeof(VkPhysicalDeviceFragmentDensityMapFeaturesEXT)}, @@ -1884,6 +1909,7 @@ #ifdef VK_ENABLE_BETA_EXTENSIONS {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_FEATURES_KHR, sizeof(VkPhysicalDeviceRayTracingFeaturesKHR)}, #endif // VK_ENABLE_BETA_EXTENSIONS + {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT, sizeof(VkPhysicalDeviceRobustness2FeaturesEXT)}, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES, sizeof(VkPhysicalDeviceSamplerYcbcrConversionFeatures)}, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES, sizeof(VkPhysicalDeviceScalarBlockLayoutFeatures)}, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES, sizeof(VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures)}, @@ -2016,6 +2042,24 @@ DumpVkPhysicalDeviceTimelineSemaphoreProperties(p, version.minor >= 2 ?"VkPhysicalDeviceTimelineSemaphoreProperties":"VkPhysicalDeviceTimelineSemaphorePropertiesKHR", *props); p.AddNewline(); } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME))) { + VkPhysicalDevicePushDescriptorPropertiesKHR* props = (VkPhysicalDevicePushDescriptorPropertiesKHR*)structure; + DumpVkPhysicalDevicePushDescriptorPropertiesKHR(p, "VkPhysicalDevicePushDescriptorPropertiesKHR", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME))) { + VkPhysicalDevicePerformanceQueryPropertiesKHR* props = (VkPhysicalDevicePerformanceQueryPropertiesKHR*)structure; + DumpVkPhysicalDevicePerformanceQueryPropertiesKHR(p, "VkPhysicalDevicePerformanceQueryPropertiesKHR", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME))) { + VkPhysicalDeviceTransformFeedbackPropertiesEXT* props = (VkPhysicalDeviceTransformFeedbackPropertiesEXT*)structure; + DumpVkPhysicalDeviceTransformFeedbackPropertiesEXT(p, "VkPhysicalDeviceTransformFeedbackPropertiesEXT", *props); + p.AddNewline(); + } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT && (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME))) { VkPhysicalDeviceDiscardRectanglePropertiesEXT* props = (VkPhysicalDeviceDiscardRectanglePropertiesEXT*)structure; @@ -2028,12 +2072,6 @@ DumpVkPhysicalDeviceConservativeRasterizationPropertiesEXT(p, "VkPhysicalDeviceConservativeRasterizationPropertiesEXT", *props); p.AddNewline(); } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME))) { - VkPhysicalDevicePerformanceQueryPropertiesKHR* props = (VkPhysicalDevicePerformanceQueryPropertiesKHR*)structure; - DumpVkPhysicalDevicePerformanceQueryPropertiesKHR(p, "VkPhysicalDevicePerformanceQueryPropertiesKHR", *props); - p.AddNewline(); - } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT && (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME))) { VkPhysicalDeviceInlineUniformBlockPropertiesEXT* props = (VkPhysicalDeviceInlineUniformBlockPropertiesEXT*)structure; @@ -2052,14 +2090,6 @@ DumpVkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(p, "VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT", *props); p.AddNewline(); } -#ifdef VK_ENABLE_BETA_EXTENSIONS - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_KHR && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_RAY_TRACING_EXTENSION_NAME))) { - VkPhysicalDeviceRayTracingPropertiesKHR* props = (VkPhysicalDeviceRayTracingPropertiesKHR*)structure; - DumpVkPhysicalDeviceRayTracingPropertiesKHR(p, "VkPhysicalDeviceRayTracingPropertiesKHR", *props); - p.AddNewline(); - } -#endif // VK_ENABLE_BETA_EXTENSIONS if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT && (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME))) { VkPhysicalDeviceExternalMemoryHostPropertiesEXT* props = (VkPhysicalDeviceExternalMemoryHostPropertiesEXT*)structure; @@ -2102,18 +2132,26 @@ DumpVkPhysicalDeviceTexelBufferAlignmentPropertiesEXT(p, "VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT", *props); p.AddNewline(); } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME))) { - VkPhysicalDeviceTransformFeedbackPropertiesEXT* props = (VkPhysicalDeviceTransformFeedbackPropertiesEXT*)structure; - DumpVkPhysicalDeviceTransformFeedbackPropertiesEXT(p, "VkPhysicalDeviceTransformFeedbackPropertiesEXT", *props); + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_ROBUSTNESS_2_EXTENSION_NAME))) { + VkPhysicalDeviceRobustness2PropertiesEXT* props = (VkPhysicalDeviceRobustness2PropertiesEXT*)structure; + DumpVkPhysicalDeviceRobustness2PropertiesEXT(p, "VkPhysicalDeviceRobustness2PropertiesEXT", *props); p.AddNewline(); } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME))) { - VkPhysicalDevicePushDescriptorPropertiesKHR* props = (VkPhysicalDevicePushDescriptorPropertiesKHR*)structure; - DumpVkPhysicalDevicePushDescriptorPropertiesKHR(p, "VkPhysicalDevicePushDescriptorPropertiesKHR", *props); + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME))) { + VkPhysicalDeviceCustomBorderColorPropertiesEXT* props = (VkPhysicalDeviceCustomBorderColorPropertiesEXT*)structure; + DumpVkPhysicalDeviceCustomBorderColorPropertiesEXT(p, "VkPhysicalDeviceCustomBorderColorPropertiesEXT", *props); + p.AddNewline(); + } +#ifdef VK_ENABLE_BETA_EXTENSIONS + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_KHR && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_RAY_TRACING_EXTENSION_NAME))) { + VkPhysicalDeviceRayTracingPropertiesKHR* props = (VkPhysicalDeviceRayTracingPropertiesKHR*)structure; + DumpVkPhysicalDeviceRayTracingPropertiesKHR(p, "VkPhysicalDeviceRayTracingPropertiesKHR", *props); p.AddNewline(); } +#endif // VK_ENABLE_BETA_EXTENSIONS place = structure->pNext; } } @@ -2277,18 +2315,54 @@ DumpVkPhysicalDeviceBufferDeviceAddressFeatures(p, version.minor >= 2 ?"VkPhysicalDeviceBufferDeviceAddressFeatures":"VkPhysicalDeviceBufferDeviceAddressFeaturesKHR", *props); p.AddNewline(); } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME))) { - VkPhysicalDeviceDepthClipEnableFeaturesEXT* props = (VkPhysicalDeviceDepthClipEnableFeaturesEXT*)structure; - DumpVkPhysicalDeviceDepthClipEnableFeaturesEXT(p, "VkPhysicalDeviceDepthClipEnableFeaturesEXT", *props); - p.AddNewline(); - } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR && (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME))) { VkPhysicalDevicePerformanceQueryFeaturesKHR* props = (VkPhysicalDevicePerformanceQueryFeaturesKHR*)structure; DumpVkPhysicalDevicePerformanceQueryFeaturesKHR(p, "VkPhysicalDevicePerformanceQueryFeaturesKHR", *props); p.AddNewline(); } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_CLOCK_EXTENSION_NAME))) { + VkPhysicalDeviceShaderClockFeaturesKHR* props = (VkPhysicalDeviceShaderClockFeaturesKHR*)structure; + DumpVkPhysicalDeviceShaderClockFeaturesKHR(p, "VkPhysicalDeviceShaderClockFeaturesKHR", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME))) { + VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR* props = (VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR*)structure; + DumpVkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR(p, "VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME))) { + VkPhysicalDeviceTransformFeedbackFeaturesEXT* props = (VkPhysicalDeviceTransformFeedbackFeaturesEXT*)structure; + DumpVkPhysicalDeviceTransformFeedbackFeaturesEXT(p, "VkPhysicalDeviceTransformFeedbackFeaturesEXT", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_EXTENSION_NAME))) { + VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT* props = (VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT*)structure; + DumpVkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT(p, "VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_ASTC_DECODE_MODE_EXTENSION_NAME))) { + VkPhysicalDeviceASTCDecodeFeaturesEXT* props = (VkPhysicalDeviceASTCDecodeFeaturesEXT*)structure; + DumpVkPhysicalDeviceASTCDecodeFeaturesEXT(p, "VkPhysicalDeviceASTCDecodeFeaturesEXT", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME))) { + VkPhysicalDeviceConditionalRenderingFeaturesEXT* props = (VkPhysicalDeviceConditionalRenderingFeaturesEXT*)structure; + DumpVkPhysicalDeviceConditionalRenderingFeaturesEXT(p, "VkPhysicalDeviceConditionalRenderingFeaturesEXT", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME))) { + VkPhysicalDeviceDepthClipEnableFeaturesEXT* props = (VkPhysicalDeviceDepthClipEnableFeaturesEXT*)structure; + DumpVkPhysicalDeviceDepthClipEnableFeaturesEXT(p, "VkPhysicalDeviceDepthClipEnableFeaturesEXT", *props); + p.AddNewline(); + } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT && (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME))) { VkPhysicalDeviceInlineUniformBlockFeaturesEXT* props = (VkPhysicalDeviceInlineUniformBlockFeaturesEXT*)structure; @@ -2301,20 +2375,6 @@ DumpVkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(p, "VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT", *props); p.AddNewline(); } -#ifdef VK_ENABLE_BETA_EXTENSIONS - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_FEATURES_KHR && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_RAY_TRACING_EXTENSION_NAME))) { - VkPhysicalDeviceRayTracingFeaturesKHR* props = (VkPhysicalDeviceRayTracingFeaturesKHR*)structure; - DumpVkPhysicalDeviceRayTracingFeaturesKHR(p, "VkPhysicalDeviceRayTracingFeaturesKHR", *props); - p.AddNewline(); - } -#endif // VK_ENABLE_BETA_EXTENSIONS - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_CLOCK_EXTENSION_NAME))) { - VkPhysicalDeviceShaderClockFeaturesKHR* props = (VkPhysicalDeviceShaderClockFeaturesKHR*)structure; - DumpVkPhysicalDeviceShaderClockFeaturesKHR(p, "VkPhysicalDeviceShaderClockFeaturesKHR", *props); - p.AddNewline(); - } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT && (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME))) { VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT* props = (VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT*)structure; @@ -2369,12 +2429,6 @@ DumpVkPhysicalDeviceIndexTypeUint8FeaturesEXT(p, "VkPhysicalDeviceIndexTypeUint8FeaturesEXT", *props); p.AddNewline(); } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME))) { - VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR* props = (VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR*)structure; - DumpVkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR(p, "VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR", *props); - p.AddNewline(); - } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT && (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME))) { VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT* props = (VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT*)structure; @@ -2387,10 +2441,16 @@ DumpVkPhysicalDeviceTexelBufferAlignmentFeaturesEXT(p, "VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT", *props); p.AddNewline(); } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME))) { - VkPhysicalDeviceTransformFeedbackFeaturesEXT* props = (VkPhysicalDeviceTransformFeedbackFeaturesEXT*)structure; - DumpVkPhysicalDeviceTransformFeedbackFeaturesEXT(p, "VkPhysicalDeviceTransformFeedbackFeaturesEXT", *props); + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_ROBUSTNESS_2_EXTENSION_NAME))) { + VkPhysicalDeviceRobustness2FeaturesEXT* props = (VkPhysicalDeviceRobustness2FeaturesEXT*)structure; + DumpVkPhysicalDeviceRobustness2FeaturesEXT(p, "VkPhysicalDeviceRobustness2FeaturesEXT", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME))) { + VkPhysicalDeviceCustomBorderColorFeaturesEXT* props = (VkPhysicalDeviceCustomBorderColorFeaturesEXT*)structure; + DumpVkPhysicalDeviceCustomBorderColorFeaturesEXT(p, "VkPhysicalDeviceCustomBorderColorFeaturesEXT", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT && @@ -2399,24 +2459,14 @@ DumpVkPhysicalDevicePipelineCreationCacheControlFeaturesEXT(p, "VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT", *props); p.AddNewline(); } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_EXTENSION_NAME))) { - VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT* props = (VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT*)structure; - DumpVkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT(p, "VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_ASTC_DECODE_MODE_EXTENSION_NAME))) { - VkPhysicalDeviceASTCDecodeFeaturesEXT* props = (VkPhysicalDeviceASTCDecodeFeaturesEXT*)structure; - DumpVkPhysicalDeviceASTCDecodeFeaturesEXT(p, "VkPhysicalDeviceASTCDecodeFeaturesEXT", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME))) { - VkPhysicalDeviceConditionalRenderingFeaturesEXT* props = (VkPhysicalDeviceConditionalRenderingFeaturesEXT*)structure; - DumpVkPhysicalDeviceConditionalRenderingFeaturesEXT(p, "VkPhysicalDeviceConditionalRenderingFeaturesEXT", *props); +#ifdef VK_ENABLE_BETA_EXTENSIONS + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_FEATURES_KHR && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_RAY_TRACING_EXTENSION_NAME))) { + VkPhysicalDeviceRayTracingFeaturesKHR* props = (VkPhysicalDeviceRayTracingFeaturesKHR*)structure; + DumpVkPhysicalDeviceRayTracingFeaturesKHR(p, "VkPhysicalDeviceRayTracingFeaturesKHR", *props); p.AddNewline(); } +#endif // VK_ENABLE_BETA_EXTENSIONS place = structure->pNext; } } diff -Nru vulkan-tools-1.2.135.0+dfsg1/vulkaninfo/outputprinter.h vulkan-tools-1.2.141.0+dfsg1/vulkaninfo/outputprinter.h --- vulkan-tools-1.2.135.0+dfsg1/vulkaninfo/outputprinter.h 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/vulkaninfo/outputprinter.h 2020-06-03 22:48:23.000000000 +0000 @@ -66,7 +66,7 @@ enum class OutputType { text, html, json, vkconfig_output }; class Printer { - public: + public: Printer(OutputType output_type, std::ostream &out, const uint32_t selected_gpu, const VulkanVersion vulkan_version) : output_type(output_type), out(out) { switch (output_type) { @@ -654,7 +654,7 @@ return input; } - protected: + protected: OutputType output_type; std::ostream &out; int indents = 0; @@ -696,7 +696,7 @@ // always desired, requiring a manual decrease of indention. This wrapper facilitates that while also // automatically re-indenting the output to the previous indent level on scope exit. class IndentWrapper { - public: + public: IndentWrapper(Printer &p) : p(p) { if (p.Type() == OutputType::text) p.IndentDecrease(); } @@ -704,26 +704,29 @@ if (p.Type() == OutputType::text) p.IndentIncrease(); } - private: + private: Printer &p; }; class ObjectWrapper { - public: - ObjectWrapper(Printer &p, std::string object_name, int32_t count_subobjects = -1) : p(p) { - p.ObjectStart(object_name, count_subobjects); + public: + ObjectWrapper(Printer &p, std::string object_name) : p(p) { p.ObjectStart(object_name); } + ObjectWrapper(Printer &p, std::string object_name, size_t count_subobjects) : p(p) { + p.ObjectStart(object_name, static_cast(count_subobjects)); } ~ObjectWrapper() { p.ObjectEnd(); } - private: + private: Printer &p; }; class ArrayWrapper { - public: - ArrayWrapper(Printer &p, std::string array_name, int32_t element_count = 0) : p(p) { p.ArrayStart(array_name, element_count); } + public: + ArrayWrapper(Printer &p, std::string array_name, size_t element_count = 0) : p(p) { + p.ArrayStart(array_name, static_cast(element_count)); + } ~ArrayWrapper() { p.ArrayEnd(); } - private: + private: Printer &p; }; \ No newline at end of file diff -Nru vulkan-tools-1.2.135.0+dfsg1/vulkaninfo/vulkaninfo.cpp vulkan-tools-1.2.141.0+dfsg1/vulkaninfo/vulkaninfo.cpp --- vulkan-tools-1.2.135.0+dfsg1/vulkaninfo/vulkaninfo.cpp 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/vulkaninfo/vulkaninfo.cpp 2020-06-03 22:48:23.000000000 +0000 @@ -377,7 +377,7 @@ p.PrintKeyValue("timestampValidBits", queue.props.timestampValidBits, 27); if (queue.is_present_platform_agnostic) { - p.PrintKeyString("present support", queue.platforms_support_present ? "true" : "false"); + p.PrintKeyString("present support", queue.platforms_support_present ? "true" : "false", 27); } else { size_t width = 0; for (auto &surface : surfaces) { @@ -463,54 +463,45 @@ const uint32_t memtype_bit = 1U << i; // only linear and optimal tiling considered - for (uint32_t tiling = VK_IMAGE_TILING_OPTIMAL; tiling < gpu.mem_type_res_support.image.size(); ++tiling) { - std::string usable; - usable += std::string(VkImageTilingString(VkImageTiling(tiling))) + ": "; - size_t orig_usable_str_size = usable.size(); - bool first = true; - for (size_t fmt_i = 0; fmt_i < gpu.mem_type_res_support.image[tiling].size(); ++fmt_i) { - const MemImageSupport *image_support = &gpu.mem_type_res_support.image[tiling][fmt_i]; - const bool regular_compatible = - image_support->regular_supported && (image_support->regular_memtypes & memtype_bit); - const bool sparse_compatible = - image_support->sparse_supported && (image_support->sparse_memtypes & memtype_bit); - const bool transient_compatible = - image_support->transient_supported && (image_support->transient_memtypes & memtype_bit); - - if (regular_compatible || sparse_compatible || transient_compatible) { - if (!first) usable += ", "; - first = false; - - if (fmt_i == 0) { - usable += "color images"; - } else { - usable += VkFormatString(gpu.mem_type_res_support.image[tiling][fmt_i].format); + std::vector tiling_optimal_formats; + std::vector tiling_linear_formats; + for (auto &image_tiling : gpu.memory_image_support_types) { + ArrayWrapper arr(p, VkImageTilingString(VkImageTiling(image_tiling.tiling)), -1); + bool has_any_support_types = false; + bool regular = false; + bool transient = false; + bool sparse = false; + for (auto &image_format : image_tiling.formats) { + if (image_format.type_support.size() > 0) { + bool has_a_support_type = false; + for (auto &img_type : image_format.type_support) { + if (img_type.Compatible(memtype_bit)) { + has_a_support_type = true; + has_any_support_types = true; + if (img_type.type == ImageTypeSupport::Type::regular) regular = true; + if (img_type.type == ImageTypeSupport::Type::transient) transient = true; + if (img_type.type == ImageTypeSupport::Type::sparse) sparse = true; + } } - - if (regular_compatible && !sparse_compatible && !transient_compatible && image_support->sparse_supported && - image_support->transient_supported) { - usable += "(non-sparse, non-transient)"; - } else if (regular_compatible && !sparse_compatible && image_support->sparse_supported) { - if (image_support->sparse_supported) usable += "(non-sparse)"; - } else if (regular_compatible && !transient_compatible && image_support->transient_supported) { - if (image_support->transient_supported) usable += "(non-transient)"; - } else if (!regular_compatible && sparse_compatible && !transient_compatible && - image_support->sparse_supported) { - if (image_support->sparse_supported) usable += "(sparse only)"; - } else if (!regular_compatible && !sparse_compatible && transient_compatible && - image_support->transient_supported) { - if (image_support->transient_supported) usable += "(transient only)"; - } else if (!regular_compatible && sparse_compatible && transient_compatible && - image_support->sparse_supported && image_support->transient_supported) { - usable += "(sparse and transient only)"; + if (has_a_support_type) { + if (image_format.format == color_format) { + p.PrintString("color images"); + } else { + p.PrintString(VkFormatString(image_format.format)); + } } } } - if (usable.size() == orig_usable_str_size) // not usable for anything - { - usable += "None"; + if (!has_any_support_types) { + p.PrintString("None"); + } else { + if (regular && !transient && sparse) p.PrintString("(non-transient)"); + if (regular && transient && !sparse) p.PrintString("(non-sparse)"); + if (regular && !transient && !sparse) p.PrintString("(non-sparse, non-transient)"); + if (!regular && transient && sparse) p.PrintString("(sparse and transient only)"); + if (!regular && !transient && sparse) p.PrintString("(sparse only)"); + if (!regular && transient && !sparse) p.PrintString("(transient only)"); } - p.PrintString(usable); } } } diff -Nru vulkan-tools-1.2.135.0+dfsg1/vulkaninfo/vulkaninfo.h vulkan-tools-1.2.141.0+dfsg1/vulkaninfo/vulkaninfo.h --- vulkan-tools-1.2.135.0+dfsg1/vulkaninfo/vulkaninfo.h 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/vulkaninfo/vulkaninfo.h 2020-06-03 22:48:23.000000000 +0000 @@ -84,7 +84,7 @@ ~FileLineException() throw() {} const char *what() const throw() { return msg.c_str(); } - private: + private: std::string msg; }; #define THROW_ERR(arg) throw FileLineException(arg, __FILE__, __LINE__); @@ -97,7 +97,7 @@ ~VulkanException() throw() {} const char *what() const throw() { return msg.c_str(); } - private: + private: std::string msg; }; #define THROW_VK_ERR(func_name, err) throw VulkanException(func_name, __FILE__, __LINE__, err); @@ -424,7 +424,7 @@ #endif // VK_USE_PLATFORM_METAL_EXT } - private: + private: template void Load(T &func_dest, const char *func_name) { #if defined(__linux__) @@ -478,7 +478,7 @@ Load(vkGetPhysicalDeviceToolPropertiesEXT, "vkGetPhysicalDeviceToolPropertiesEXT"); } - private: + private: PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr; VkInstance instance; template @@ -622,7 +622,7 @@ DbgCallback}; const VkApplicationInfo app_info = { - VK_STRUCTURE_TYPE_APPLICATION_INFO, nullptr, app_short_name, 1, nullptr, 0, VK_API_VERSION_1_0}; + VK_STRUCTURE_TYPE_APPLICATION_INFO, nullptr, app_short_name, 1, nullptr, 0, instance_version}; AppCompileInstanceExtensionsToEnable(); @@ -1108,7 +1108,7 @@ // ---------- Surfaces -------------- // class AppSurface { - public: + public: AppInstance &inst; VkPhysicalDevice phys_device; SurfaceExtension surface_extension; @@ -1246,17 +1246,72 @@ // -------------------- Device Setup ------------------- // -struct MemImageSupport { - bool regular_supported, sparse_supported, transient_supported; +const VkFormat color_format = VK_FORMAT_R8G8B8A8_UNORM; + +struct ImageTypeSupport { + enum class Type { regular, sparse, transient } type = Type::regular; + bool supported = false; + uint32_t memoryTypeBits = 0; + + bool Compatible(uint32_t memtype_bit) { return supported && (memoryTypeBits & memtype_bit); } +}; + +struct ImageTypeFormatInfo { VkFormat format; - uint32_t regular_memtypes, sparse_memtypes, transient_memtypes; + std::vector type_support; }; -struct MemResSupport { - std::array, 2> image; - // TODO: buffers +struct ImageTypeInfos { + VkImageTiling tiling; + std::vector formats; }; +VkImageCreateInfo GetImageCreateInfo(VkFormat format, VkImageTiling tiling, VkImageCreateFlags flags, VkImageUsageFlags usages) { + return {VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, + nullptr, + flags, + VK_IMAGE_TYPE_2D, + format, + {8, 8, 1}, + 1, + 1, + VK_SAMPLE_COUNT_1_BIT, + tiling, + usages, + VK_SHARING_MODE_EXCLUSIVE, + 0, + nullptr, + VK_IMAGE_LAYOUT_UNDEFINED}; +} + +ImageTypeSupport FillImageTypeSupport(AppInstance &inst, VkPhysicalDevice phys_device, VkDevice device, + ImageTypeSupport::Type img_type, VkImageCreateInfo image_ci) { + VkImageFormatProperties img_props; + VkResult res = inst.dll.fp_vkGetPhysicalDeviceImageFormatProperties( + phys_device, image_ci.format, image_ci.imageType, image_ci.tiling, image_ci.usage, image_ci.flags, &img_props); + + if (res == VK_SUCCESS) { + ImageTypeSupport img_type_support{}; + img_type_support.type = img_type; + img_type_support.supported = true; + + VkImage dummy_img; + res = inst.dll.fp_vkCreateImage(device, &image_ci, nullptr, &dummy_img); + if (res) THROW_VK_ERR("vkCreateImage", res); + + VkMemoryRequirements mem_req; + inst.dll.fp_vkGetImageMemoryRequirements(device, dummy_img, &mem_req); + img_type_support.memoryTypeBits = mem_req.memoryTypeBits; + + inst.dll.fp_vkDestroyImage(device, dummy_img, nullptr); + return img_type_support; + } else if (res == VK_ERROR_FORMAT_NOT_SUPPORTED) { + return {}; // default initialization has supported being false + } + THROW_VK_ERR("vkGetPhysicalDeviceImageFormatProperties", res); + return {}; +} + struct pNextChainInfos { std::vector phys_device_props2; std::vector phys_device_mem_props2; @@ -1294,7 +1349,7 @@ VkPhysicalDeviceMemoryProperties memory_props; VkPhysicalDeviceMemoryProperties2KHR memory_props2; - MemResSupport mem_type_res_support; + std::vector memory_image_support_types; VkPhysicalDeviceFeatures features; VkPhysicalDeviceFeatures2KHR features2; @@ -1374,108 +1429,71 @@ VkResult err = inst.dll.fp_vkCreateDevice(phys_device, &device_ci, nullptr, &dev); if (err) THROW_VK_ERR("vkCreateDevice", err); - const VkFormat color_format = VK_FORMAT_R8G8B8A8_UNORM; + const std::vector tilings = {VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_TILING_LINEAR}; const std::vector formats = { color_format, VK_FORMAT_D16_UNORM, VK_FORMAT_X8_D24_UNORM_PACK32, VK_FORMAT_D32_SFLOAT, VK_FORMAT_S8_UINT, VK_FORMAT_D16_UNORM_S8_UINT, VK_FORMAT_D24_UNORM_S8_UINT, VK_FORMAT_D32_SFLOAT_S8_UINT}; - assert(mem_type_res_support.image[0].size() == formats.size()); - const std::array usages = {0, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT}; - const std::array flagss = {0, VK_IMAGE_CREATE_SPARSE_BINDING_BIT}; - - for (size_t fmt_i = 0; fmt_i < formats.size(); ++fmt_i) { - // only iterate over VK_IMAGE_TILING_OPTIMAL and VK_IMAGE_TILING_LINEAR (0 and 1) - for (size_t tiling = VK_IMAGE_TILING_OPTIMAL; tiling <= VK_IMAGE_TILING_LINEAR; ++tiling) { - mem_type_res_support.image[tiling][fmt_i].format = formats[fmt_i]; - mem_type_res_support.image[tiling][fmt_i].regular_supported = true; - mem_type_res_support.image[tiling][fmt_i].sparse_supported = true; - mem_type_res_support.image[tiling][fmt_i].transient_supported = true; + + for (VkImageTiling tiling : tilings) { + ImageTypeInfos image_type_infos; + image_type_infos.tiling = tiling; + + for (VkFormat format : formats) { + ImageTypeFormatInfo image_type_format_info; + image_type_format_info.format = format; VkFormatProperties fmt_props; - inst.dll.fp_vkGetPhysicalDeviceFormatProperties(phys_device, formats[fmt_i], &fmt_props); + inst.dll.fp_vkGetPhysicalDeviceFormatProperties(phys_device, format, &fmt_props); if ((tiling == VK_IMAGE_TILING_OPTIMAL && fmt_props.optimalTilingFeatures == 0) || (tiling == VK_IMAGE_TILING_LINEAR && fmt_props.linearTilingFeatures == 0)) { - mem_type_res_support.image[tiling][fmt_i].regular_supported = false; - mem_type_res_support.image[tiling][fmt_i].sparse_supported = false; - mem_type_res_support.image[tiling][fmt_i].transient_supported = false; continue; } - for (size_t u_i = 0; u_i < usages.size(); ++u_i) { - for (size_t flg_i = 0; flg_i < flagss.size(); ++flg_i) { - VkImageCreateInfo image_ci = {VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, - nullptr, - flagss[flg_i], - VK_IMAGE_TYPE_2D, - formats[fmt_i], - {8, 8, 1}, - 1, - 1, - VK_SAMPLE_COUNT_1_BIT, - static_cast(tiling), - usages[u_i], - VK_SHARING_MODE_EXCLUSIVE, - 0, - nullptr, - VK_IMAGE_LAYOUT_UNDEFINED}; - - if ((image_ci.flags & VK_IMAGE_CREATE_SPARSE_BINDING_BIT) && - (image_ci.usage & VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT)) { - continue; - } - - if (image_ci.usage == 0 || (image_ci.usage & VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT)) { - if (image_ci.format == color_format) - image_ci.usage |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; - else - image_ci.usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT; - } - - if (!enabled_features.sparseBinding && (image_ci.flags & VK_IMAGE_CREATE_SPARSE_BINDING_BIT)) { - mem_type_res_support.image[tiling][fmt_i].sparse_supported = false; - continue; - } - - VkImageFormatProperties img_props; - err = inst.dll.fp_vkGetPhysicalDeviceImageFormatProperties(phys_device, image_ci.format, image_ci.imageType, - image_ci.tiling, image_ci.usage, image_ci.flags, - &img_props); - - uint32_t *memtypes; - bool *support; - - if (image_ci.flags == 0 && !(image_ci.usage & VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT)) { - memtypes = &mem_type_res_support.image[tiling][fmt_i].regular_memtypes; - support = &mem_type_res_support.image[tiling][fmt_i].regular_supported; - } else if ((image_ci.flags & VK_IMAGE_CREATE_SPARSE_BINDING_BIT) && - !(image_ci.usage & VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT)) { - memtypes = &mem_type_res_support.image[tiling][fmt_i].sparse_memtypes; - support = &mem_type_res_support.image[tiling][fmt_i].sparse_supported; - } else if (image_ci.flags == 0 && (image_ci.usage & VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT)) { - memtypes = &mem_type_res_support.image[tiling][fmt_i].transient_memtypes; - support = &mem_type_res_support.image[tiling][fmt_i].transient_supported; - } else { - assert(false); - return; - } - - if (err == VK_ERROR_FORMAT_NOT_SUPPORTED) { - *support = false; - } else { - if (err != VK_SUCCESS) THROW_VK_ERR("vkGetPhysicalDeviceImageFormatProperties", err); - - VkImage dummy_img; - err = inst.dll.fp_vkCreateImage(dev, &image_ci, nullptr, &dummy_img); - if (err) THROW_VK_ERR("vkCreateImage", err); - - VkMemoryRequirements mem_req; - inst.dll.fp_vkGetImageMemoryRequirements(dev, dummy_img, &mem_req); - *memtypes = mem_req.memoryTypeBits; + VkImageCreateInfo image_ci_regular = GetImageCreateInfo(format, tiling, 0, 0); + VkImageCreateInfo image_ci_transient = + GetImageCreateInfo(format, tiling, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, 0); + VkImageCreateInfo image_ci_sparse = GetImageCreateInfo(format, tiling, 0, VK_IMAGE_CREATE_SPARSE_BINDING_BIT); + + if (tiling == VK_IMAGE_TILING_LINEAR) { + if (format == color_format) { + image_ci_regular.usage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT; + image_ci_transient.usage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT; + } else { + // linear tiling is only applicable to color image types + continue; + } + } else { + if (format == color_format) { + image_ci_regular.usage |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; + image_ci_transient.usage |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; + + } else { + image_ci_regular.usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT; + image_ci_transient.usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT; + } + } + + auto image_ts_regular = + FillImageTypeSupport(inst, phys_device, dev, ImageTypeSupport::Type::regular, image_ci_regular); + if (image_ts_regular.supported) { + image_type_format_info.type_support.push_back(image_ts_regular); + } + auto image_ts_transient = + FillImageTypeSupport(inst, phys_device, dev, ImageTypeSupport::Type::transient, image_ci_transient); + if (image_ts_transient.supported) { + image_type_format_info.type_support.push_back(image_ts_transient); + } - inst.dll.fp_vkDestroyImage(dev, dummy_img, nullptr); - } + if (enabled_features.sparseBinding) { + auto image_ts_sparse = + FillImageTypeSupport(inst, phys_device, dev, ImageTypeSupport::Type::sparse, image_ci_sparse); + if (image_ts_sparse.supported) { + image_type_format_info.type_support.push_back(image_ts_sparse); } } + image_type_infos.formats.push_back(image_type_format_info); } + memory_image_support_types.push_back(image_type_infos); } // Memory // @@ -1603,9 +1621,8 @@ const bool first = (surface_ext == gpu.inst.surface_extensions.at(0)); if (!first && platforms_support_present != surface_ext.supports_present) { is_present_platform_agnostic = false; - - platforms_support_present = surface_ext.supports_present; } + platforms_support_present = surface_ext.supports_present; } } }; @@ -1639,8 +1656,8 @@ } // namespace std // Used to sort the formats into buckets by their properties. -std::unordered_map > FormatPropMap(AppGpu &gpu) { - std::unordered_map > map; +std::unordered_map> FormatPropMap(AppGpu &gpu) { + std::unordered_map> map; for (auto fmtRange : gpu.supported_format_ranges) { for (int32_t fmt = fmtRange.first_format; fmt <= fmtRange.last_format; ++fmt) { VkFormatProperties props; diff -Nru vulkan-tools-1.2.135.0+dfsg1/vulkaninfo/vulkaninfo.vcxproj.user vulkan-tools-1.2.141.0+dfsg1/vulkaninfo/vulkaninfo.vcxproj.user --- vulkan-tools-1.2.135.0+dfsg1/vulkaninfo/vulkaninfo.vcxproj.user 2020-04-08 02:52:46.000000000 +0000 +++ vulkan-tools-1.2.141.0+dfsg1/vulkaninfo/vulkaninfo.vcxproj.user 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ - - - - VK_LAYER_PATH=..\layers\Debug - WindowsLocalDebugger - - - VK_LAYER_PATH=..\layers\Release - WindowsLocalDebugger - -